Skip to content

Commit

Permalink
Fix docker publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
procivisAG committed Sep 18, 2024
1 parent 7676d67 commit 3aa4bed
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ stages:
- ${YARN_CACHE_FOLDER}
policy: pull

.app_settings: &app_settings
- APP_VERSION=${APP_VERSION:-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA}
- IMAGE_NAME=$CI_REGISTRY_IMAGE/storybook
- IMAGE_TAG=$IMAGE_NAME:$APP_VERSION


.install-node-modules: &install-node-modules
- >
if [ -d ./node_modules ] && [ "$(ls -A ./node_modules)" ]; then
Expand All @@ -51,6 +57,7 @@ stages:
<<: *build-cache
before_script:
- *install-node-modules
- *app_settings

.only_tag:
rules:
Expand All @@ -66,6 +73,10 @@ stages:
- if: $CI_COMMIT_REF_NAME == "main"


before_script:
- *app_settings


build_deps:
stage: prepare
extends: .modules_setup
Expand Down Expand Up @@ -113,8 +124,6 @@ publish:storybook:
needs:
- job: build:storybook
artifacts: true
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE/storybook:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
extends:
- .docker_publish
- .only_main
Expand Down

0 comments on commit 3aa4bed

Please sign in to comment.