Skip to content
Snippets Groups Projects
Commit 21cc5f45 authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

ci: split #fe build jobs

parent 4fe405f5
No related branches found
No related tags found
No related merge requests found
Pipeline #23354 passed with warnings
...@@ -114,19 +114,32 @@ test-be-node-job: ...@@ -114,19 +114,32 @@ test-be-node-job:
#--[ Frontend ]----------------------------------------------------------------- #--[ Frontend ]-----------------------------------------------------------------
build-fe-node-job: prd-build-fe-node-job:
extends: .fe-node-job extends: .fe-node-job
stage: build stage: build
variables: variables:
NODE_ENV: staging NODE_ENV: production
script: script:
- npm run build - npm run build -- --out-dir dist/prd
artifacts: artifacts:
paths: paths:
- frontend/dist/ - frontend/dist/prd
expire_in: 1 week expire_in: 1 week
only: only:
- tags - tags
stg-build-fe-node-job:
extends: .fe-node-job
stage: build
variables:
NODE_ENV: staging
script:
- npm run build -- --out-dir dist/stg
artifacts:
paths:
- frontend/dist/stg
expire_in: 1 week
only:
- development - development
#--[ Backend ]------------------------------------------------------------------ #--[ Backend ]------------------------------------------------------------------
...@@ -164,9 +177,6 @@ build-be-job: ...@@ -164,9 +177,6 @@ build-be-job:
.fe-deploy-job: .fe-deploy-job:
image: alpine:latest image: alpine:latest
stage: deploy stage: deploy
needs:
- job: build-fe-node-job
artifacts: true
tags: tags:
- commul # NOTE: we can't use shared because extended seccomp policies are needed - commul # NOTE: we can't use shared because extended seccomp policies are needed
before_script: before_script:
...@@ -174,30 +184,37 @@ build-be-job: ...@@ -174,30 +184,37 @@ build-be-job:
script: script:
- > - >
butler push butler push
frontend/dist $DIST_PATH
eurac/$GAME_NAME:html5 eurac/$GAME_NAME:html5
--userversion ${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} --userversion ${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
# TODO: we need separate build job for prd
prd-fe-deploy-job: prd-fe-deploy-job:
extends: .fe-deploy-job extends: .fe-deploy-job
needs:
- job: prd-build-fe-node-job
artifacts: true
environment: environment:
name: production/frontend name: production/frontend
deployment_tier: production deployment_tier: production
url: https://eurac.itch.io/oetzi url: https://eurac.itch.io/oetzi
variables: variables:
GAME_NAME: oetzi GAME_NAME: oetzi
DIST_PATH: frontend/dist/prd
only: only:
- tags - tags
stg-fe-deploy-job: stg-fe-deploy-job:
extends: .fe-deploy-job extends: .fe-deploy-job
needs:
- job: stg-build-fe-node-job
artifacts: true
environment: environment:
name: staging/frontend name: staging/frontend
deployment_tier: staging deployment_tier: staging
url: https://eurac.itch.io/oetzi-staging url: https://eurac.itch.io/oetzi-staging
variables: variables:
GAME_NAME: oetzi-staging GAME_NAME: oetzi-staging
DIST_PATH: frontend/dist/stg
only: only:
- development - development
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment