Skip to content

Commit

Permalink
Merge pull request #184 from hpidcock/improve-ci
Browse files Browse the repository at this point in the history
Enable prometheus jobs + Move caas images to public.ecr.aws/jujuqabot
  • Loading branch information
hpidcock authored Apr 12, 2024
2 parents 2fbb960 + 1f93d21 commit 2051261
Show file tree
Hide file tree
Showing 60 changed files with 289 additions and 1,496 deletions.
13 changes: 5 additions & 8 deletions jobs/ci-run/build/buildjuju.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@
default: ""
description: 'Go version used for build.'
name: GOVERSION
- choice:
name: PARAM_OPERATOR_IMAGE_ACCOUNT
choices:
- docker.io/jujuqabot
- docker.io/jujusolutions
default: "docker.io/jujuqabot"
description: "Operator docker image account name."
- string:
default: "linux/amd64 linux/arm64 linux/s390x linux/ppc64el"
description: "Space seperated list of Go Platforms to build the OCI images for"
Expand All @@ -183,15 +176,19 @@
set -eu
touch build.properties
echo "DOCKER_USERNAME=${PARAM_OPERATOR_IMAGE_ACCOUNT}" >> build.properties
echo "DOCKER_USERNAME=public.ecr.aws/jujuqabot/build-${SHORT_GIT_COMMIT}" >> build.properties
cat build.properties
- inject:
properties-file: build.properties
- install-docker
- docker-login
- ensure-aws-credentials
- docker-ecr-login
- get-s3-build-payload-packaging:
platforms: "${BUILD_PLATFORMS}"
- host-src-command:
src_command: !include-raw: ../scripts/snippet_setup_ecr_public.sh
- host-src-command:
src_command: !include-raw: ../scripts/snippet_caas-jujud-operator.sh

Expand Down
1 change: 0 additions & 1 deletion jobs/ci-run/ci-run-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
- get-s3-source-payload
- inject:
properties-content: |-
OPERATOR_IMAGE_ACCOUNT=docker.io/jujuqabot
PATH=/snap/bin:$PATH
series=focal
- get-build-details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@
default: MICROK8S
description: "Specify K8s cloud provider to use."
name: CAAS_PROVIDER
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
- select-oci-registry
- prepare-functional-test-core:
platform: "linux/${BUILD_ARCH}"
- shell: |-
Expand All @@ -32,7 +29,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=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=$OPERATOR_IMAGE_ACCOUNT \
--caas-provider=${CAAS_PROVIDER}
publishers:
- artifact-results
Expand All @@ -57,13 +54,10 @@
default: "K8S_CORE"
description: "Specify K8s cloud provider to use."
name: CAAS_PROVIDER
- string:
default: "docker.io/jujuqabot"
description: "Operator docker image account name."
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
- select-oci-registry
- prepare-functional-test-core:
platform: "linux/${BUILD_ARCH}"
- shell: |-
Expand All @@ -72,7 +66,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=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=$OPERATOR_IMAGE_ACCOUNT \
--caas-provider=${CAAS_PROVIDER}
publishers:
- artifact-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
default: GKE
description: "Specify K8s cloud provider to use."
name: CAAS_PROVIDER
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
- select-oci-registry
- wait-for-cloud-init
- get-cloud-environments
- prepare-functional-test-core:
Expand All @@ -35,7 +32,7 @@
ENV=gke
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=$OPERATOR_IMAGE_ACCOUNT \
--caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac
publishers:
- artifact-results
Expand All @@ -59,13 +56,10 @@
default: AKS
description: "Specify K8s cloud provider to use."
name: CAAS_PROVIDER
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
- select-oci-registry
- wait-for-cloud-init
- get-cloud-environments
- prepare-functional-test-core:
Expand All @@ -78,7 +72,7 @@
ENV=aks
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=$OPERATOR_IMAGE_ACCOUNT \
--caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac
publishers:
- artifact-results
Expand All @@ -103,13 +97,10 @@
default: EKS
description: "Specify K8s cloud provider to use."
name: CAAS_PROVIDER
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: PARAM_OPERATOR_IMAGE_ACCOUNT
wrappers:
- cirun-test-stuck-timeout
builders:
- select-oci-registry
- wait-for-cloud-init
- get-cloud-environments
- prepare-functional-test-core:
Expand All @@ -122,7 +113,7 @@
ENV=eks
timeout -s INT 50m ${TESTS_DIR}/assess_caas_deploy_charms.py $ENV $JUJU_BIN $WORKSPACE/artifacts \
$JOB_NAME --caas-image-repo=${PARAM_OPERATOR_IMAGE_ACCOUNT} \
$JOB_NAME --caas-image-repo=$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 @@ -21,10 +21,6 @@
default: MICROK8S
description: "Specify K8s cloud provider to use."
name: CAAS_PROVIDER
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
name: PARAM_OPERATOR_IMAGE_ACCOUNT
- string:
default: full
description: "Specify the kubeflow bundle version to deploy."
Expand All @@ -40,9 +36,10 @@
wrappers:
- cirun-test-stuck-timeout
builders:
- select-oci-registry
- wait-for-cloud-init
- description-setter:
description: "${CAAS_PROVIDER}|bundle:${BUNDLE_VERSION}|build:${BUILD_CHARMS}|rbac:${ENABLE_RBAC}|${PARAM_OPERATOR_IMAGE_ACCOUNT}"
description: "${CAAS_PROVIDER}|bundle:${BUNDLE_VERSION}|build:${BUILD_CHARMS}|rbac:${ENABLE_RBAC}"
- prepare-functional-test-core:
platform: "linux/${BUILD_ARCH}"
- prepare-ephemeral-node-for-k8s-py-tests:
Expand Down Expand Up @@ -73,7 +70,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=$PARAM_OPERATOR_IMAGE_ACCOUNT \
$JOB_NAME --caas-image-repo=$OPERATOR_IMAGE_ACCOUNT \
--caas-provider=$CAAS_PROVIDER --k8s-controller --bundle=$BUNDLE_VERSION ${params[@]}
publishers:
- artifact-results
Expand Down
13 changes: 1 addition & 12 deletions jobs/ci-run/integration/builders.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# utils related to integration tests
# Prepare things for an integration test
- builder:
name: 'registry-setup'
builders:
- host-src-command:
src_command:
!include-raw: "common/registry-setup.sh"
- inject:
properties-file: build.properties

- builder:
name: 'prepare-integration-test'
builders:
Expand Down Expand Up @@ -36,9 +27,7 @@
builders:
- install-microk8s:
channel: "latest/stable"
- install-docker
- ensure-aws-credentials
- registry-setup
- select-oci-registry
- get-s3-build-payload-testing:
SHORT_GIT_COMMIT: "${{SHORT_GIT_COMMIT}}"
platform: "linux/${{BUILD_ARCH}}"
Expand Down
54 changes: 0 additions & 54 deletions jobs/ci-run/integration/common/registry-setup.sh

This file was deleted.

32 changes: 4 additions & 28 deletions jobs/ci-run/integration/gen/test-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,14 @@
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
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}
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
Expand Down Expand Up @@ -179,20 +173,14 @@
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
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}
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
Expand Down Expand Up @@ -263,20 +251,14 @@
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
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}
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
Expand Down Expand Up @@ -343,20 +325,14 @@
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
- string:
default: docker.io/jujuqabot
description: "Operator docker image account name."
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}
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
Expand Down
Loading

0 comments on commit 2051261

Please sign in to comment.