Skip to content

Commit

Permalink
Merge pull request #146 from RedHatInsights/change_build_script
Browse files Browse the repository at this point in the history
Update build scripts
  • Loading branch information
adamrdrew authored Nov 6, 2023
2 parents 86257be + cecb96c commit 13bf186
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then
fi
#### End

docker buildx use multiarchbuilder
docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push .
22 changes: 14 additions & 8 deletions controllers/frontend_controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,21 @@ var _ = ginkgo.Describe("Frontend controller with service", func() {
if err != nil {
return false
}
gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady))
gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue))
gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed))
gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse))
gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful))
gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue))
gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true))
return true

// Check the length of Conditions slice before accessing by index
if len(nfe.Status.Conditions) > 2 {
gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady))
gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue))
gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed))
gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse))
gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful))
gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue))
gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true))
return true
}
return false
}, timeout, interval).Should(gomega.BeTrue())

})
})
})
Expand Down
1 change: 1 addition & 0 deletions pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ docker rm -f $CONTAINER_NAME-run
# This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time
# but the template_check.sh isn't. I couldn't figure out how it was sourcing it

docker buildx use multiarchbuilder
docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr .
docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr .

Expand Down

0 comments on commit 13bf186

Please sign in to comment.