Skip to content

Commit

Permalink
STONEBLD-2371 test for multi platform
Browse files Browse the repository at this point in the history
Add the ability to run in-repo tests for multi platform controller
  • Loading branch information
stuartwdouglas committed Jun 27, 2024
1 parent d608f81 commit 6dea5bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 8 additions & 0 deletions hack/preview-template.env
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export JVM_BUILD_SERVICE_PR_OWNER=
export JVM_BUILD_SERVICE_PR_SHA=
export JVM_BUILD_SERVICE_CACHE_IMAGE=
export JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=
### Override JVM Build service image
export MULTI_PLATFORM_CONTROLLER_IMAGE_REPO=
export MULTI_PLATFORM_CONTROLLER_IMAGE_TAG=
export MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_REPO=
export MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_TAG=
export MULTI_PLATFORM_CONTROLLER_PR_OWNER=
export MULTI_PLATFORM_CONTROLLER_PR_SHA=
### Override the default Tekton bundle
export DEFAULT_BUILD_BUNDLE=

Expand Down Expand Up @@ -151,3 +158,4 @@ export EAAS_HYPERSHIFT_OIDC_PROVIDER_S3_BUCKET=
export EAAS_HYPERSHIFT_OIDC_PROVIDER_S3_REGION=
export EAAS_HYPERSHIFT_PULL_SECRET_PATH=
export EAAS_HYPERSHIFT_BASE_DOMAIN=

9 changes: 5 additions & 4 deletions hack/preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,11 @@ sed -i.bak "s/rekor-server.enterprise-contract-service.svc/$rekor_server/" $ROOT
[ -n "${IMAGE_CONTROLLER_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"quay.io/konflux-ci/image-controller\")) |=.newTag=\"${IMAGE_CONTROLLER_IMAGE_TAG}\"" $ROOT/components/image-controller/development/kustomization.yaml
[[ -n "${IMAGE_CONTROLLER_PR_OWNER}" && "${IMAGE_CONTROLLER_PR_SHA}" ]] && yq -i e "(.resources[] | select(. ==\"*github.com/konflux-ci/image-controller*\")) |= \"https://github.com/${IMAGE_CONTROLLER_PR_OWNER}/image-controller/config/default?ref=${IMAGE_CONTROLLER_PR_SHA}\"" $ROOT/components/image-controller/development/kustomization.yaml

[ -n "${MULTI_ARCH_CONTROLLER_IMAGE_REPO}" ] && yq -i e "(.images.[] | select(.name==\"multi-platform-controller\")) |=.newName=\"${MULTI_ARCH_CONTROLLER_IMAGE_REPO}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml
[ -n "${MULTI_ARCH_CONTROLLER_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"multi-platform-controller\")) |=.newTag=\"${MULTI_ARCH_CONTROLLER_IMAGE_TAG}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml
[[ -n "${MULTI_ARCH_CONTROLLER_PR_OWNER}" && "${MULTI_ARCH_CONTROLLER_PR_SHA}" ]] && yq -i e "(.resources[] | select(. ==\"*github.com/konflux-ci/multi-platform-controller*\")) |= \"https://github.com/${MULTI_ARCH_CONTROLLER_PR_OWNER}/multi-platform-controller/config/default?ref=${MULTI_ARCH_CONTROLLER_PR_SHA}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml

[ -n "${MULTI_PLATFORM_CONTROLLER_IMAGE_REPO}" ] && yq -i e "(.images.[] | select(.name==\"multi-platform-controller\")) |=.newName=\"${MULTI_PLATFORM_CONTROLLER_IMAGE_REPO}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml
[ -n "${MULTI_PLATFORM_CONTROLLER_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"multi-platform-controller\")) |=.newTag=\"${MULTI_PLATFORM_CONTROLLER_IMAGE_TAG}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml
[ -n "${MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_REPO}" ] && yq -i e "(.images.[] | select(.name==\"multi-platform-otp-server\")) |=.newName=\"${MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_REPO}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml
[ -n "${MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"multi-platform-otp-server\")) |=.newTag=\"${MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_TAG}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml
[[ -n "${MULTI_PLATFORM_CONTROLLER_PR_OWNER}" && "${MULTI_PLATFORM_CONTROLLER_PR_SHA}" ]] && yq -i e "(.resources[] | select(. ==\"*github.com/konflux-ci/multi-platform-controller*\")) |= \"https://github.com/${MULTI_PLATFORM_CONTROLLER_PR_OWNER}/multi-platform-controller/config/default?ref=${MULTI_PLATFORM_CONTROLLER_PR_SHA}\"" $ROOT/components/multi-platform-controller/base/kustomization.yaml

[[ -n "${PIPELINE_PR_OWNER}" && "${PIPELINE_PR_SHA}" ]] && yq -i e ".resources[] |= sub(\"ref=[^ ]*\"; \"ref=${PIPELINE_PR_SHA}\") | .resources[] |= sub(\"openshift-pipelines\"; \"${PIPELINE_PR_OWNER}\")" $ROOT/components/pipeline-service/development/kustomization.yaml

Expand Down

0 comments on commit 6dea5bd

Please sign in to comment.