tests: Use Nginx instead of yarn start
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
415d221073
commit
66a005b4b2
@ -31,26 +31,27 @@ steps:
|
||||
- sed -i 's/{{ DEPLOY_SSH_KEY_PASSPHRASE }}/'"$DEPLOY_SSH_KEY_PASSPHRASE"'/g' ./.ansible-items/inventory
|
||||
- sed -i 's/{{ DEPLOY_USER }}/'"$DEPLOY_USER"'/g' ./.ansible-items/inventory
|
||||
|
||||
- name: install frontend dependencies
|
||||
- name: install dependencies and build frontend
|
||||
image: node:lts-alpine3.14
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend install
|
||||
- yarn --cwd ./items/frontend build --pure-lockfile
|
||||
- rm -rf ./items/api/public/static/*
|
||||
- cp ./items/frontend/build/* ./items/api/public
|
||||
- rm ./items/api/public/index.html
|
||||
depends_on:
|
||||
- replace hosts and user variables
|
||||
|
||||
- name: frontend
|
||||
image: node:lts-alpine3.14
|
||||
image: nginx:1.21.4-alpine
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend start
|
||||
- cp ./items/frontend/build/* /usr/share/nginx/html
|
||||
detach: true
|
||||
depends_on:
|
||||
- install frontend dependencies
|
||||
- install dependencies and build frontend
|
||||
|
||||
- name: test frontend
|
||||
image: cypress/browsers:node16.5.0-chrome94-ff93
|
||||
@ -60,25 +61,7 @@ steps:
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend cy:run
|
||||
depends_on:
|
||||
- install frontend dependencies
|
||||
|
||||
- name: build frontend
|
||||
image: node:lts-alpine3.14
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend build --pure-lockfile
|
||||
- rm -rf ./items/api/public/static/*
|
||||
- mv ./items/frontend/build/* ./items/api/public
|
||||
- rm ./items/api/public/index.html
|
||||
depends_on:
|
||||
- test frontend
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
- master
|
||||
- development
|
||||
- install dependencies and build frontend
|
||||
|
||||
- name: check ansible syntax
|
||||
image: plugins/ansible:3
|
||||
@ -111,8 +94,7 @@ steps:
|
||||
SPT_ITEMS_PATH:
|
||||
from_secret: deploy_path
|
||||
depends_on:
|
||||
- check ansible syntax
|
||||
- build frontend
|
||||
- test frontend
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
@ -31,26 +31,27 @@ steps:
|
||||
- sed -i 's/{{ DEPLOY_SSH_KEY_PASSPHRASE }}/'"$DEPLOY_SSH_KEY_PASSPHRASE"'/g' ./.ansible-items/inventory
|
||||
- sed -i 's/{{ DEPLOY_USER }}/'"$DEPLOY_USER"'/g' ./.ansible-items/inventory
|
||||
|
||||
- name: install frontend dependencies
|
||||
- name: install dependencies and build frontend
|
||||
image: node:lts-alpine3.14
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend install
|
||||
- yarn --cwd ./items/frontend build --pure-lockfile
|
||||
- rm -rf ./items/api/public/static/*
|
||||
- cp ./items/frontend/build/* ./items/api/public
|
||||
- rm ./items/api/public/index.html
|
||||
depends_on:
|
||||
- replace hosts and user variables
|
||||
|
||||
- name: frontend
|
||||
image: node:lts-alpine3.14
|
||||
image: nginx:1.21.4-alpine
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend start
|
||||
- cp ./items/frontend/build/* /usr/share/nginx/html
|
||||
detach: true
|
||||
depends_on:
|
||||
- install frontend dependencies
|
||||
- install dependencies and build frontend
|
||||
|
||||
- name: test frontend
|
||||
image: cypress/browsers:node16.5.0-chrome94-ff93
|
||||
@ -60,25 +61,7 @@ steps:
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend cy:run
|
||||
depends_on:
|
||||
- install frontend dependencies
|
||||
|
||||
- name: build frontend
|
||||
image: node:lts-alpine3.14
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend build --pure-lockfile
|
||||
- rm -rf ./items/api/public/static/*
|
||||
- mv ./items/frontend/build/* ./items/api/public
|
||||
- rm ./items/api/public/index.html
|
||||
depends_on:
|
||||
- test frontend
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
- master
|
||||
- development
|
||||
- install dependencies and build frontend
|
||||
|
||||
- name: check ansible syntax
|
||||
image: plugins/ansible:3
|
||||
@ -111,8 +94,7 @@ steps:
|
||||
SPT_ITEMS_PATH:
|
||||
from_secret: deploy_path
|
||||
depends_on:
|
||||
- check ansible syntax
|
||||
- build frontend
|
||||
- test frontend
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
Loading…
x
Reference in New Issue
Block a user