Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-ui-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-ui-common
Commits
f87ed2b1
Commit
f87ed2b1
authored
3 months ago
by
Anders Lindh Olsson
Browse files
Options
Downloads
Plain Diff
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+10
-3
10 additions, 3 deletions
.gitlab-ci.yml
with
10 additions
and
3 deletions
.gitlab-ci.yml
+
10
−
3
View file @
f87ed2b1
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment