1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

made build stages

This commit is contained in:
Fedor Katurov 2020-11-16 14:14:16 +07:00
parent 617f759d6b
commit 0353a08849

View file

@ -7,7 +7,20 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: copy-env-develop - name: build-master
image: node:10.13
when:
branch: master
environment:
ENV_CONTENT:
from_secret: env_content_master
commands:
- echo -en $${ENV_CONTENT} > ./.env
- yarn
- yarn build
- rm -rf ./app.tar.bz2
- tar -cjf ./app.tar.bz2 -C ./dist .
- name: build-develop
image: node:10.13 image: node:10.13
when: when:
branch: develop branch: develop
@ -16,14 +29,8 @@ steps:
from_secret: env_content_develop from_secret: env_content_develop
commands: commands:
- echo -en $${ENV_CONTENT} > ./.env - echo -en $${ENV_CONTENT} > ./.env
- name: build
image: node:10.13
commands:
- yarn - yarn
- yarn build - yarn build
- name: compress
image: alpine
commands:
- rm -rf ./app.tar.bz2 - rm -rf ./app.tar.bz2
- tar -cjf ./app.tar.bz2 -C ./dist . - tar -cjf ./app.tar.bz2 -C ./dist .
- name: upload - name: upload