File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -738,6 +738,55 @@ f_dockerlibrary.addStep(
738
738
],
739
739
)
740
740
)
741
+ f_dockerlibrary .addStep (
742
+ steps .SetPropertyFromCommand (
743
+ name = "Extract the last tag created" ,
744
+ command = ["cat" , "last_tag" ],
745
+ property = "lasttag" ,
746
+ )
747
+ )
748
+ f_dockerlibrary .addStep (
749
+ steps .SetPropertyFromCommand (
750
+ name = "Determine sha for the last tag" ,
751
+ command = [
752
+ "bash" ,
753
+ "-xc" ,
754
+ util .Interpolate (
755
+ "curl -s https://quay.io/api/v1/repository/mariadb-foundation/mariadb-devel/tag/?filter_tag_name=eq:%(prop:lasttag)s&onlyActiveTags=true | jq -r .tags[0].manifest_digest"
756
+ ),
757
+ ],
758
+ property = "lastsha" ,
759
+ )
760
+ )
761
+ f_dockerlibrary .addStep (
762
+ steps .ShellCommand (
763
+ name = "gh credentials" ,
764
+ command = [
765
+ "bash" ,
766
+ "-xc" ,
767
+ "gh auth login --with-token < ~/gh_auth" ,
768
+ ],
769
+ doStepIf = lambda step : (str (step .getProperty ("lastsha" )) != "" ),
770
+ )
771
+ )
772
+ f_dockerlibrary .addStep (
773
+ steps .ShellCommand (
774
+ name = "test operator with image" ,
775
+ command = [
776
+ "bash" ,
777
+ "-xc" ,
778
+ util .Interpolate (
779
+ "gh workflow run %(kw:testname)s --repo mariadb-operator/mariadb-operator -f mariadb_image=quay.io/mariadb-foundation/mariadb-devel@%(prop:lastsha)s" ,
780
+ testname = lambda step : (
781
+ "test-image-ent.yml"
782
+ if "rhel" in str (step .getProperty ("parentbuildername" ))
783
+ else "test-image.yml"
784
+ ),
785
+ ),
786
+ ],
787
+ doStepIf = lambda step : (str (step .getProperty ("lastsha" )) != "" ),
788
+ )
789
+ )
741
790
742
791
## f_aix
743
792
f_aix = util .BuildFactory ()
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ commit=${4:-0}
11
11
branch=${5:- ${master_branch} }
12
12
prod_environment=${6:- True}
13
13
14
+ rm -f last_tag
14
15
# keep in sync with docker-cleanup script
15
16
if [[ $branch = * pkgtest* ]]; then
16
17
container_tag=${branch# bb-}
@@ -181,8 +182,10 @@ if (($(buildah manifest inspect "$devmanifest" | jq '.manifests | length') >= ex
181
182
trap ' manifest_image_cleanup "$t"' EXIT
182
183
if [ " $prod_environment " = " True" ]; then
183
184
buildah manifest push --all --rm " $devmanifest " " docker://quay.io/mariadb-foundation/mariadb-devel:${container_tag} "
185
+ echo " ${container_tag} " > last_tag
184
186
else
185
187
buildah manifest rm " $devmanifest "
188
+ rm -f last_tag
186
189
fi
187
190
manifest_image_cleanup " $t "
188
191
You can’t perform that action at this time.
0 commit comments