Skip to content
Snippets Groups Projects
Commit be4be0b4 authored by Mathias Goebel's avatar Mathias Goebel :reminder_ribbon:
Browse files

fix: dependency from missing job (main)

parent db624e6f
No related branches found
No related tags found
1 merge request!30feat: add env variables for URLs
Pipeline #214579 failed
......@@ -14,6 +14,12 @@
dependencies:
- install
script:
# overwrite vars when build from main branch. to omit a second
# job (see dependency in pages stage).
- if [[ $CI_COMMIT_REF_SLUG == "main" ]]; then
- VUE_APP_BASE_URL_VIEWER=$API_MAIN
- VUE_APP_BASE_URL_VIEWER="/ahiqar/website/"
- fi
- npm run build
- mkdir --parents public/${CI_COMMIT_REF_SLUG}
- cp --recursive src/.vuepress/dist/* public/${CI_COMMIT_REF_SLUG}/
......@@ -33,6 +39,9 @@ variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PROJECT_PATH/$CI_JOB_NAME
# ↓ reduces the amount of data transfered to the runner (shallow clone)
GIT_DEPTH: 2
API_DEV: 'https://ahikar-dev.sub.uni-goettingen.de'
API_MAIN: 'https://ahikar.sub.uni-goettingen.de'
BASE_BACKEND: '/website'
stages:
......@@ -54,12 +63,9 @@ install:
- node_modules/
build_page-develop:
except:
- main
- tags
build_page-all:
variables:
VUE_APP_BASE_URL_API: "https://ahikar-dev.sub.uni-goettingen.de"
VUE_APP_BASE_URL_API: $API_DEV
VUE_APP_BASE_URL_VIEWER: '/ahiqar/website/$CI_COMMIT_REF_SLUG'
<<: *build-defaults
......@@ -67,24 +73,16 @@ build_page-develop-backend:
only:
- develop
variables:
VUE_APP_BASE_URL_API: "https://ahikar-dev.sub.uni-goettingen.de"
VUE_APP_BASE_URL_VIEWER: '/website'
<<: *build-defaults
build_page-main:
only:
- main
variables:
VUE_APP_BASE_URL_API: "https://ahikar.sub.uni-goettingen.de"
VUE_APP_BASE_URL_VIEWER: '/ahiqar/website'
VUE_APP_BASE_URL_API: $API_DEV
VUE_APP_BASE_URL_VIEWER: $BASE_BACKEND
<<: *build-defaults
build_page-main-backend:
only:
- main
variables:
VUE_APP_BASE_URL_API: "https://ahikar.sub.uni-goettingen.de"
VUE_APP_BASE_URL_VIEWER: '/website'
VUE_APP_BASE_URL_API: $API_MAIN
VUE_APP_BASE_URL_VIEWER: $BASE_BACKEND
<<: *build-defaults
......@@ -92,11 +90,8 @@ build_page-main-backend:
pages:
image: docker.gitlab.gwdg.de/mrodzis/docker-images/alpine
stage: pages
needs:
- job: build_page-main
artifacts: true
- job: build_page-develop
artifacts: true
dependencies:
- build_page-all
script:
- ash .ci-scripts/update-artifacts.sh
- ash .ci-scripts/remove-old-artifacts.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment