Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Textgrid Repository WebDAV Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
DARIAH-DE
TextGridRep
Textgrid Repository WebDAV Server
Commits
3fb47020
Verified
Commit
3fb47020
authored
2 years ago
by
Stefan Hynek
Browse files
Options
Downloads
Patches
Plain Diff
ci(gitlab): use ash-compatible test command for version declaration
parent
d9c7255d
No related branches found
No related tags found
1 merge request
!28
Resolve "fix empty version issue in CI"
Pipeline
#343773
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+1
-2
1 addition, 2 deletions
.gitlab-ci.yml
with
1 addition
and
2 deletions
.gitlab-ci.yml
+
1
−
2
View file @
3fb47020
...
@@ -57,8 +57,7 @@ build container image:
...
@@ -57,8 +57,7 @@ build container image:
entrypoint
:
[
"
"
]
entrypoint
:
[
"
"
]
script
:
script
:
# use tag for version if not empty; else commit sha
# use tag for version if not empty; else commit sha
-
"
[[
-n
${CI_COMMIT_TAG}
]]
&&
export
version=${CI_COMMIT_TAG}
||
export
version=${CI_COMMIT_SHORT_SHA}"
-
"
test
-n
\"
$CI_COMMIT_TAG
\"
&&
export
version=$CI_COMMIT_TAG
||
export
version=$CI_COMMIT_SHORT_SHA"
-
echo $version
-
mkdir -p /kaniko/.docker
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64 | tr -d '\n')\"},\"$harbor_registry\":{\"auth\":\"$HARBOR_ROBOT_TOKEN64\"}}}" > /kaniko/.docker/config.json
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64 | tr -d '\n')\"},\"$harbor_registry\":{\"auth\":\"$HARBOR_ROBOT_TOKEN64\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor
-
/kaniko/executor
...
...
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