fix: Apply kubernetes changes to Docker
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Mangiang 2021-11-14 14:41:24 -05:00
parent 3f22030648
commit ecc5f0fb30

View File

@ -8,25 +8,21 @@ concurrency:
trigger: trigger:
event: event:
- push - push
branch:
- master
- main
- development
steps: steps:
- name: replace hosts and user variables - name: replace hosts and user variables
image: ubuntu:impish image: ubuntu:impish
environment: environment:
DEPLOY_HOSTNAME:
from_secret: deploy_hostname
SPT_ITEMS_HOSTNAME: SPT_ITEMS_HOSTNAME:
from_secret: spt_items_hostname from_secret: spt_items_hostname
DEPLOY_HOSTNAME:
from_secret: deploy_hostname
DEPLOY_USER: DEPLOY_USER:
from_secret: deploy_username from_secret: deploy_username
DEPLOY_SSH_KEY_PASSPHRASE:
from_secret: deploy_ssh_key_passphrase
DEPLOY_PRIVATE_KEY: DEPLOY_PRIVATE_KEY:
from_secret: deploy_ssh_key from_secret: deploy_ssh_key
DEPLOY_SSH_KEY_PASSPHRASE:
from_secret: deploy_ssh_key_passphrase
commands: commands:
- sed -i 's/{{ SPT_ITEMS_HOSTNAME }}/'"$SPT_ITEMS_HOSTNAME"'/g' ./items/frontend/.env.example - sed -i 's/{{ SPT_ITEMS_HOSTNAME }}/'"$SPT_ITEMS_HOSTNAME"'/g' ./items/frontend/.env.example
- mv ./items/frontend/.env.example ./items/frontend/.env - mv ./items/frontend/.env.example ./items/frontend/.env
@ -35,7 +31,7 @@ steps:
- sed -i 's/{{ DEPLOY_SSH_KEY_PASSPHRASE }}/'"$DEPLOY_SSH_KEY_PASSPHRASE"'/g' ./.ansible-items/inventory - 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 - sed -i 's/{{ DEPLOY_USER }}/'"$DEPLOY_USER"'/g' ./.ansible-items/inventory
- name: build frontend - name: install frontend dependencies
image: node:lts-alpine3.14 image: node:lts-alpine3.14
commands: commands:
- node -v - node -v
@ -47,6 +43,30 @@ steps:
- mv ./items/frontend/build/* ./items/api/public - mv ./items/frontend/build/* ./items/api/public
- rm ./items/api/public/index.html - rm ./items/api/public/index.html
- name: test frontend
image: node:lts-alpine3.14
commands:
- node -v
- npm -v
- yarn --version
- yarn --cwd ./items/frontend cy:run
- 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
when:
branch:
- main
- master
- development
- name: check ansible syntax - name: check ansible syntax
image: plugins/ansible:3 image: plugins/ansible:3
settings: settings:
@ -67,10 +87,10 @@ steps:
timeout: 60 timeout: 60
verbose: 2 verbose: 2
environment: environment:
DEPLOY_HOSTNAME:
from_secret: deploy_hostname
SPT_ITEMS_HOSTNAME: SPT_ITEMS_HOSTNAME:
from_secret: spt_items_hostname from_secret: spt_items_hostname
DEPLOY_HOSTNAME:
from_secret: deploy_hostname
DEPLOY_USER: DEPLOY_USER:
from_secret: deploy_username from_secret: deploy_username
DEPLOY_USER_GROUP: DEPLOY_USER_GROUP: