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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Components
Opentofu
Commits
2fac42fa
Unverified
Commit
2fac42fa
authored
1 year ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Archive images list for release
parent
6b4f5097
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+14
-23
14 additions, 23 deletions
.gitlab-ci.yml
with
14 additions
and
23 deletions
.gitlab-ci.yml
+
14
−
23
View file @
2fac42fa
...
...
@@ -110,10 +110,10 @@ gitlab-opentofu-image:deploy:with-opentofu-version:
-
crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script
:
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE"
-
'
echo
"-
\`$RELEASE_IMAGE\`
(digest:
\`$(crane
digest
$RELEASE_IMAGE)\`)"
>
image$CI_JOB_ID.
txt
'
-
'
echo
"-
\`$RELEASE_IMAGE\`
(digest:
\`$(crane
digest
$RELEASE_IMAGE)\`)"
>
image$CI_JOB_ID.
md
'
artifacts
:
paths
:
-
'
image*.
txt
'
-
'
image*.
md
'
rules
:
-
if
:
$CI_COMMIT_TAG
...
...
@@ -131,10 +131,10 @@ gitlab-opentofu-image:deploy:latest-with-opentofu-version:
-
crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script
:
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE"
-
'
echo
"-
\`$RELEASE_IMAGE\`
(digest:
\`$(crane
digest
$RELEASE_IMAGE)\`)"
>
image$CI_JOB_ID.
txt
'
-
'
echo
"-
\`$RELEASE_IMAGE\`
(digest:
\`$(crane
digest
$RELEASE_IMAGE)\`)"
>
image$CI_JOB_ID.
md
'
artifacts
:
paths
:
-
'
image*.
txt
'
-
'
image*.
md
'
rules
:
-
if
:
$CI_COMMIT_TAG
...
...
@@ -151,10 +151,10 @@ gitlab-opentofu-image:deploy:latest:
-
crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script
:
-
crane copy "$GITLAB_OPENTOFU_IMAGE_NAME" "$RELEASE_IMAGE"
-
'
echo
"-
\`$RELEASE_IMAGE\`
(digest:
\`$(crane
digest
$RELEASE_IMAGE)\`)"
>
image$CI_JOB_ID.
txt
'
-
'
echo
"-
\`$RELEASE_IMAGE\`
(digest:
\`$(crane
digest
$RELEASE_IMAGE)\`)"
>
image$CI_JOB_ID.
md
'
artifacts
:
paths
:
-
'
image*.
txt
'
-
'
image*.
md
'
rules
:
-
if
:
$CI_COMMIT_TAG
parallel
:
...
...
@@ -166,33 +166,24 @@ gitlab-opentofu-image:deploy:latest:
# If the pipeline is for a new tag with a semantic version, and all previous jobs succeed,
# create the release.
.
create-release
:
create-release
:
stage
:
release
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
rules
:
-
if
:
$CI_COMMIT_TAG =~ /\d+/
before_script
:
-
apk add --update yq envsubst
script
:
-
echo "Creating release $CI_COMMIT_TAG"
-
AVAILABLE_OPENTOFU_VERSIONS=$(yq -r '.spec.inputs.opentofu_version.options | filter((. | test("\$.*")) ==
false
) | .[] | "- [`" + . + "`](https://github.com/opentofu/opentofu/releases/tag/v" + . + ")"' templates/full-pipeline.yml)
-
export AVAILABLE_OPENTOFU_VERSIONS
-
cat image*.txt | sort
-
'
AVAILABLE_IMAGES=$(cat
image*.txt
|
sort
|
sed
-E
"s/(\(digest:
.*\))/\n
-
\1/")'
-
'
AVAILABLE_IMAGES=$(cat
image*.md
|
sort
|
tee
images.md
|
sed
-E
"s/(\(digest:
.*\))/\n
-
\1/")'
-
export AVAILABLE_IMAGES
-
cat .gitlab/release-template.md | envsubst > release-notes.md
# create-release:dry-run:
# extends: .create-release
# script:
# - !reference [.create-release, script]
# - cat release-notes.md
# artifacts:
# paths:
# - release-notes.md
create-release
:
extends
:
.create-release
rules
:
-
if
:
$CI_COMMIT_TAG =~ /\d+/
artifacts
:
paths
:
-
images.md
-
release-notes.md
release
:
tag_name
:
$CI_COMMIT_TAG
description
:
'
./release-notes.md'
...
...
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