Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenTofu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Insights
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
components
OpenTofu
Commits
f58802c6
Unverified
Commit
f58802c6
authored
1 year ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Parallel image deploys for latest
parent
db85ba94
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+7
-4
7 additions, 4 deletions
.gitlab-ci.yml
with
7 additions
and
4 deletions
.gitlab-ci.yml
+
7
−
4
View file @
f58802c6
...
@@ -120,15 +120,18 @@ gitlab-opentofu-image:latest:deploy:
...
@@ -120,15 +120,18 @@ gitlab-opentofu-image:latest:deploy:
variables
:
variables
:
OPENTOFU_VERSION
:
$LATEST_OPENTOFU_VERSION
OPENTOFU_VERSION
:
$LATEST_OPENTOFU_VERSION
RELEASE_IMAGE_NAME
:
"
$CI_REGISTRY_IMAGE/gitlab-opentofu"
RELEASE_IMAGE_NAME
:
"
$CI_REGISTRY_IMAGE/gitlab-opentofu"
RELEASE_SEMVER
:
"
${CI_COMMIT_TAG}-opentofu"
before_script
:
before_script
:
-
crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
-
crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script
:
script
:
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE_NAME:$RELEASE_SEMVER"
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE_NAME:$RELEASE_IMAGE_TAG"
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE_NAME:$CI_COMMIT_TAG"
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE_NAME:latest"
rules
:
rules
:
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_TAG
parallel
:
matrix
:
-
RELEASE_IMAGE_TAG
:
${CI_COMMIT_TAG}
-
RELEASE_IMAGE_TAG
:
${CI_COMMIT_TAG}-opentofu
-
RELEASE_IMAGE_TAG
:
${CI_COMMIT_TAG}-opentofulatest
-
RELEASE_IMAGE_TAG
:
latest
# If the pipeline is for a new tag with a semantic version, and all previous jobs succeed,
# If the pipeline is for a new tag with a semantic version, and all previous jobs succeed,
# create the release.
# create the 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