Skip to content

Commit d8600c8

Browse files
grooverdanRazvanLiviuVarzaru
authored andcommitted
wordpress: restructure trigger
An amd64 parent builder isn't sufficient grounds for triggering the manifest build. All parent builders must have completed for the docker library to generate the manifest used to trigger the wordpress build. To do this the generation of the lasttag occurs on even non-production builders. The s_wordpress is triggered on a not-null lasttag. Properties and tests for the MariaDB operator test occur when the push_containers property is true (prod), so omit those directly in the dev environment, but also if lasttag fails.
1 parent eac314b commit d8600c8

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

master-nonlatent/master.cfg

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -717,21 +717,6 @@ f_dockerlibrary.addStep(
717717
],
718718
)
719719
)
720-
f_dockerlibrary.addStep(
721-
steps.Trigger(
722-
name="WordPress",
723-
schedulerNames=["s_wordpress"],
724-
waitForFinish=False,
725-
updateSourceStamp=False,
726-
set_properties={
727-
"tarbuildnum": Property("tarbuildnum"),
728-
"ubi": Property("ubi"),
729-
},
730-
doStepIf=lambda step: str(step.getProperty("parentbuildername")).startswith(
731-
"amd64"
732-
),
733-
)
734-
)
735720
f_dockerlibrary.addStep(
736721
steps.ShellCommand(
737722
name="build quay.io manifest image for MariaDB",
@@ -755,6 +740,19 @@ f_dockerlibrary.addStep(
755740
property="lasttag",
756741
)
757742
)
743+
f_dockerlibrary.addStep(
744+
steps.Trigger(
745+
name="WordPress",
746+
schedulerNames=["s_wordpress"],
747+
waitForFinish=False,
748+
updateSourceStamp=False,
749+
set_properties={
750+
"tarbuildnum": Property("tarbuildnum"),
751+
"ubi": Property("ubi"),
752+
},
753+
doStepIf=lambda step: (str(step.getProperty("lasttag")) != ""),
754+
)
755+
)
758756
f_dockerlibrary.addStep(
759757
steps.SetPropertyFromCommand(
760758
name="Determine sha for the last tag",
@@ -766,7 +764,10 @@ f_dockerlibrary.addStep(
766764
),
767765
],
768766
property="lastsha",
769-
doStepIf=lambda step: (str(step.getProperty("lasttag")) != ""),
767+
doStepIf=lambda step: (
768+
step.getProperty("push_containers")
769+
and str(step.getProperty("lasttag")) != ""
770+
),
770771
)
771772
)
772773
f_dockerlibrary.addStep(
@@ -778,7 +779,9 @@ f_dockerlibrary.addStep(
778779
"gh auth login --with-token < ~/gh_auth",
779780
],
780781
doStepIf=lambda step: (
781-
str(step.getProperty("lastsha")) != "null" and step.hasProperty("lastsha")
782+
step.getProperty("push_containers")
783+
and str(step.getProperty("lastsha")) != "null"
784+
and step.hasProperty("lastsha")
782785
),
783786
)
784787
)
@@ -797,7 +800,9 @@ f_dockerlibrary.addStep(
797800
),
798801
],
799802
doStepIf=lambda step: (
800-
str(step.getProperty("lastsha")) != "null" and step.hasProperty("lastsha")
803+
step.getProperty("push_containers")
804+
and str(step.getProperty("lastsha")) != "null"
805+
and step.hasProperty("lastsha")
801806
),
802807
)
803808
)

scripts/docker-library-manifest.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,9 @@ trap 'manifest_image_cleanup "$devmanifest" "$t"' EXIT
108108

109109
if [ "$prod_environment" = "True" ]; then
110110
buildah manifest push --all "$devmanifest" "docker://quay.io/mariadb-foundation/mariadb-devel:${container_tag}"
111-
echo "${container_tag}" > last_tag
112-
else
113-
rm -f last_tag
114111
fi
112+
# Still want last_tag in dev environment to trigger wordpress build.
113+
echo "${container_tag}" > last_tag
115114

116115
#
117116
# MAKE Debug manifest

0 commit comments

Comments
 (0)