Skip to content
Snippets Groups Projects
Commit f87ed2b1 authored by Anders Lindh Olsson's avatar Anders Lindh Olsson :8ball:
Browse files

Merge branch 'fixfixfix' into 'main'

CE-3445: Change package deployment procedure

See merge request !200
parents ad1deb30 eb08e5c6
No related branches found
No related tags found
Loading
Checking pipeline status
......@@ -96,7 +96,7 @@ deploy-package:
- jf rt npmp
- echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> package_version.env
rules:
- if: "($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) && $CI_COMMIT_TAG"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
artifacts:
reports:
dotenv: package_version.env
......@@ -104,9 +104,15 @@ deploy-package:
deploy-package-devel:
extends: .deploy
script:
# Update the package version to include the commit SHA
- 'sed -i "s/\"version\": *\"\([^\"]*\)\"/\"version\": \"\1-${CI_COMMIT_SHORT_SHA}\"/" package.json'
- jf rt npmp
when: manual
rules:
# This is a little bit hacky; we need to first check that $CI_COMMIT_BRANCH is non-nill, else it
# will parse this to figure out if there should be a merge request pipeline, but this pipeline
# will have an invalid CI configuration, since the variable is not available in merge request pipelines
- if: $CI_COMMIT_BRANCH && ($CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH)
when: manual
release:
stage: deploy
......@@ -115,7 +121,8 @@ release:
- job: deploy-package
artifacts: true
rules:
- if: "($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) && $CI_COMMIT_TAG"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
script:
- echo "running release_job for $PACKAGE_VERSION"
release:
......
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