Skip to content

Commit 9f05949

Browse files
committed
Add Push to registry
1 parent f78d41f commit 9f05949

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

just.env

Lines changed: 0 additions & 5 deletions
This file was deleted.

justfile

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ clean:
7575
[group('General')]
7676
diff:
7777
#!/usr/bin/env bash
78-
set -euxo pipefail
78+
set -euo pipefail
7979
versionsPath="providers/openstack/scs/versions.yaml"
8080
currentVersions=$(cat ${versionsPath})
8181
mainVersions=$(git show ${mainBranch}:${versionsPath})
@@ -95,7 +95,7 @@ diff:
9595
[group('Building Manifests')]
9696
build-versions: dependencies
9797
#!/usr/bin/env bash
98-
set -euxo pipefail
98+
set -euo pipefail
9999
changedVersions=$(just diff)
100100
for version in ${changedVersions[@]}; do
101101
just build-version ${version}
@@ -105,7 +105,7 @@ build-versions: dependencies
105105
[group('Building Manifests')]
106106
build-versions-all: dependencies
107107
#!/usr/bin/env bash
108-
set -euxo pipefail
108+
set -euo pipefail
109109
versionsPath="providers/openstack/scs/versions.yaml"
110110
currentVersions=$(cat ${versionsPath})
111111
kubernetesVersions=$(yq -r '.[].kubernetes' ${versionsPath} | grep -Po "1\.\d+")
@@ -117,7 +117,7 @@ build-versions-all: dependencies
117117
[group('Building Manifests')]
118118
build-version VERSION:
119119
#!/usr/bin/env bash
120-
set -euxo pipefail
120+
set -euo pipefail
121121
echo -e "\e[33m\e[1mBuild Manifests for {{ VERSION }}\e[0m"
122122
## CHECK IF THERE IS A CHANGE IN THE COMPONENT VERSIONS
123123
if [[ -e providers/openstack/out/{{ replace(VERSION, ".", "-") }} ]]; then
@@ -141,7 +141,7 @@ build-version VERSION:
141141
build-assets-local-for VERSION: dependencies
142142
#!/usr/bin/env bash
143143
export PATH=${path}
144-
set -euxo pipefail
144+
set -euo pipefail
145145
just build-version {{ VERSION }}
146146
echo -e "\e[33m\e[1mBuild Assets for {{ VERSION }}\e[0m"
147147
if ! [[ -e providers/openstack/out/{{ replace(VERSION, ".", "-") }}/cluster-addon/Chart.lock ]]; then
@@ -157,6 +157,7 @@ build-assets-local-for VERSION: dependencies
157157
build-assets-local: build-versions
158158
#!/usr/bin/env bash
159159
export PATH=${path}
160+
set -euo pipefail
160161
changedVersions=$(just diff)
161162
for version in ${changedVersions[@]}; do
162163
just build-assets-local-for ${version}
@@ -167,12 +168,34 @@ build-assets-local: build-versions
167168
build-assets-all-local: build-versions-all
168169
#!/usr/bin/env bash
169170
export PATH=${path}
170-
set -euxo pipefail
171+
set -euo pipefail
171172
versions="$(cd providers/openstack/out/ && echo *)"
172173
for version in ${versions[@]}; do
173174
just build-assets-local-for ${version}
174175
done
175176

177+
# Publish assets to OCI registry
178+
[group('Building Assets')]
179+
publish-assets VERSION:
180+
#!/usr/bin/env bash
181+
export PATH=${path}
182+
if [[ -e providers/openstack/out/{{ replace(VERSION, ".", "-") }} ]]; then
183+
csctl create -m hash --publish --remote oci providers/openstack/out/{{ replace(VERSION, ".", "-") }}/
184+
else
185+
echo "Manifest directory for {{ replace(VERSION, ".", "-") }}" does not exist.
186+
fi
187+
188+
# Publish alles available assets to OCI registry
189+
[group('Building Assets')]
190+
publish-assets-all:
191+
#!/usr/bin/env bash
192+
export PATH=${path}
193+
set -euo pipefail
194+
versions="$(cd providers/openstack/out/ && echo *)"
195+
for version in ${versions[@]}; do
196+
just publish-assets ${version}
197+
done
198+
176199
# Remove old branches that had been merged to main
177200
[group('git')]
178201
git-clean:
@@ -182,6 +205,7 @@ git-clean:
182205
[group('git')]
183206
git-chore-branch VERSION:
184207
#!/usr/bin/env bash
208+
set -euo pipefail
185209
currentBranch=$(git branch --show-current)
186210
git switch -c chore/update-{{replace(VERSION, "-", ".") }}
187211
cp -r providers/openstack/out/{{replace(VERSION, ".", "-") }}/* providers/openstack/scs/
@@ -194,6 +218,7 @@ git-chore-branch VERSION:
194218
[group('git')]
195219
git-chore-branches-all:
196220
#!/usr/bin/env bash
221+
set -euo pipefail
197222
if ! [[ -e providers/openstack/out ]]; then
198223
echo "Error: out directory does not exists."
199224
else

0 commit comments

Comments
 (0)