Skip to content

Commit

Permalink
Merge pull request #160 from hpidcock/fix-docker-references
Browse files Browse the repository at this point in the history
Start to prefix parameters with `PARAM_`
  • Loading branch information
hpidcock authored Oct 11, 2023
2 parents 7f8d123 + 2bfe4c6 commit a56b9cb
Show file tree
Hide file tree
Showing 47 changed files with 632 additions and 174 deletions.
4 changes: 2 additions & 2 deletions jobs/ci-run/build/buildjuju.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
description: 'Go version used for build.'
name: GOVERSION
- choice:
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
choices:
- docker.io/jujuqabot
- docker.io/jujusolutions
Expand All @@ -183,7 +183,7 @@
set -eu
touch build.properties
echo "DOCKER_USERNAME=${OPERATOR_IMAGE_ACCOUNT}" >> build.properties
echo "DOCKER_USERNAME=${PARAM_OPERATOR_IMAGE_ACCOUNT}" >> build.properties
cat build.properties
- inject:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
Expand All @@ -32,7 +32,7 @@
ENV=parallel-lxd
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
--caas-provider=${CAAS_PROVIDER}
publishers:
- artifact-results
Expand Down Expand Up @@ -60,7 +60,7 @@
- string:
default: "docker.io/jujuqabot"
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
Expand All @@ -72,7 +72,7 @@
ENV=parallel-lxd
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
--caas-provider=${CAAS_PROVIDER}
publishers:
- artifact-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
Expand All @@ -35,7 +35,7 @@
ENV=gke
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
--caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac
publishers:
- artifact-results
Expand All @@ -62,7 +62,7 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
Expand All @@ -78,7 +78,7 @@
ENV=aks
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
--caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac
publishers:
- artifact-results
Expand Down Expand Up @@ -106,7 +106,7 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
Expand All @@ -122,7 +122,7 @@
ENV=eks
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
--caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac
publishers:
- artifact-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
- string:
default: full
description: "Specify the kubeflow bundle version to deploy."
Expand All @@ -42,7 +42,7 @@
builders:
- wait-for-cloud-init
- description-setter:
description: "${CAAS_PROVIDER}|bundle:${BUNDLE_VERSION}|build:${BUILD_CHARMS}|rbac:${ENABLE_RBAC}|${OPERATOR_IMAGE_ACCOUNT}"
description: "${CAAS_PROVIDER}|bundle:${BUNDLE_VERSION}|build:${BUILD_CHARMS}|rbac:${ENABLE_RBAC}|${PARAM_OPERATOR_IMAGE_ACCOUNT}"
- prepare-functional-test-core:
platform: "linux/${BUILD_ARCH}"
- prepare-ephemeral-node-for-k8s-py-tests:
Expand Down Expand Up @@ -73,7 +73,7 @@
params+=( '--enable-rbac' )
fi
timeout -s INT 90m $TESTS_DIR/assess_caas_deploy_kubeflow.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=$OPERATOR_IMAGE_ACCOUNT \
$JOB_NAME --caas-image-repo=$PARAM_OPERATOR_IMAGE_ACCOUNT \
--caas-provider=$CAAS_PROVIDER --k8s-controller --bundle=$BUNDLE_VERSION ${params[@]}
publishers:
- artifact-results
Expand Down
2 changes: 2 additions & 0 deletions jobs/ci-run/integration/builders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- host-src-command:
src_command:
!include-raw: "common/registry-setup.sh"
- inject:
properties-file: build.properties

- builder:
name: 'prepare-integration-test'
Expand Down
10 changes: 5 additions & 5 deletions jobs/ci-run/integration/common/registry-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ echo "${ECR_TOKEN}" | docker login -u AWS --password-stdin "${DOCKER_REGISTRY}"
DOCKER_USERNAME=${OPERATOR_IMAGE_ACCOUNT} make -C "${JUJU_SRC_PATH}" push-release-operator-image

# Copy juju-db from docker
docker pull "docker.io/jujusolutions/juju-db:${JUJU_DB_TAG}"
docker tag "docker.io/jujusolutions/juju-db:${JUJU_DB_TAG}" "${OPERATOR_IMAGE_ACCOUNT}/juju-db:${JUJU_DB_TAG}"
docker pull "public.ecr.aws/juju/juju-db:${JUJU_DB_TAG}"
docker tag "public.ecr.aws/juju/juju-db:${JUJU_DB_TAG}" "${OPERATOR_IMAGE_ACCOUNT}/juju-db:${JUJU_DB_TAG}"
docker push "${OPERATOR_IMAGE_ACCOUNT}/juju-db:${JUJU_DB_TAG}"

# Copy LTS charm bases from docker
BASES=(18.04 20.04 22.04)
for BASE in "${BASES[@]}" ; do
docker pull "docker.io/jujusolutions/charm-base:ubuntu-${BASE}"
docker tag "docker.io/jujusolutions/charm-base:ubuntu-${BASE}" "${OPERATOR_IMAGE_ACCOUNT}/charm-base:ubuntu-${BASE}"
docker pull "public.ecr.aws/juju/charm-base:ubuntu-${BASE}"
docker tag "public.ecr.aws/juju/charm-base:ubuntu-${BASE}" "${OPERATOR_IMAGE_ACCOUNT}/charm-base:ubuntu-${BASE}"
docker push "${OPERATOR_IMAGE_ACCOUNT}/charm-base:ubuntu-${BASE}"
done

Expand All @@ -50,5 +50,5 @@ OPERATOR_IMAGE_ACCOUNT=$(jq -r --null-input \
OPERATOR_IMAGE_ACCOUNT_PATH="${WORKSPACE}/operator-image_account.json"
echo "${OPERATOR_IMAGE_ACCOUNT}" > "${OPERATOR_IMAGE_ACCOUNT_PATH}"
export OPERATOR_IMAGE_ACCOUNT=${OPERATOR_IMAGE_ACCOUNT_PATH}
echo "OPERATOR_IMAGE_ACCOUNT=${OPERATOR_IMAGE_ACCOUNT_PATH}" >> "${WORKSPACE}/buildvars"
echo "OPERATOR_IMAGE_ACCOUNT=${OPERATOR_IMAGE_ACCOUNT_PATH}" >> "${WORKSPACE}/build.properties"
set -x
10 changes: 8 additions & 2 deletions jobs/ci-run/integration/gen/test-agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down Expand Up @@ -165,14 +168,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down
10 changes: 8 additions & 2 deletions jobs/ci-run/integration/gen/test-appdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down Expand Up @@ -165,14 +168,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down
10 changes: 8 additions & 2 deletions jobs/ci-run/integration/gen/test-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down Expand Up @@ -165,14 +168,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down
5 changes: 4 additions & 1 deletion jobs/ci-run/integration/gen/test-bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down
20 changes: 16 additions & 4 deletions jobs/ci-run/integration/gen/test-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down Expand Up @@ -169,14 +172,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down Expand Up @@ -244,14 +250,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down Expand Up @@ -315,14 +324,17 @@
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: OPERATOR_IMAGE_ACCOUNT
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
Expand Down
Loading

0 comments on commit a56b9cb

Please sign in to comment.