fix: Apply kubernetes changes to Docker
This commit is contained in:
parent
1632412945
commit
7017c1652f
@ -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,7 +43,31 @@ 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: check ansible syntax
|
- 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
|
||||||
image: plugins/ansible:3
|
image: plugins/ansible:3
|
||||||
settings:
|
settings:
|
||||||
playbook: ./.ansible-items/playbook.yml
|
playbook: ./.ansible-items/playbook.yml
|
||||||
@ -58,7 +78,7 @@ steps:
|
|||||||
branch:
|
branch:
|
||||||
- development
|
- development
|
||||||
|
|
||||||
- name: apply ansible playbook
|
- name: apply ansible playbook
|
||||||
image: plugins/ansible:3
|
image: plugins/ansible:3
|
||||||
settings:
|
settings:
|
||||||
playbook: ./.ansible-items/playbook.yml
|
playbook: ./.ansible-items/playbook.yml
|
||||||
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user