From 9d8c1ad5d9bbe690339f58d301a9fe168273900d Mon Sep 17 00:00:00 2001 From: Ian Booth Date: Wed, 29 May 2024 08:17:21 +1000 Subject: [PATCH] Delete old nw tests from proving grounds --- jobs/ci-run/ci-run-proving-grounds-tests.yml | 3 - .../functional/amd64/add-cloud-many.yml | 45 ----- jobs/ci-run/functional/amd64/deploy.yml | 178 ------------------ .../k8s-controller-deploy-caas-charms.yaml | 120 ------------ .../amd64/k8s-controller-deploy-kubeflow.yml | 77 -------- .../proving-grounds-functional-tests.yml | 56 ------ jobs/ci-run/utils.yml | 54 ------ requirements.txt | 2 +- tests/suites/static_analysis/lint_yaml.sh | 1 + 9 files changed, 2 insertions(+), 534 deletions(-) delete mode 100644 jobs/ci-run/functional/amd64/add-cloud-many.yml delete mode 100644 jobs/ci-run/functional/amd64/deploy.yml delete mode 100644 jobs/ci-run/functional/amd64/k8s-controller-deploy-caas-charms.yaml delete mode 100644 jobs/ci-run/functional/amd64/k8s-controller-deploy-kubeflow.yml delete mode 100644 jobs/ci-run/functional/proving-grounds-functional-tests.yml diff --git a/jobs/ci-run/ci-run-proving-grounds-tests.yml b/jobs/ci-run/ci-run-proving-grounds-tests.yml index 77774d0..f86a4a0 100644 --- a/jobs/ci-run/ci-run-proving-grounds-tests.yml +++ b/jobs/ci-run/ci-run-proving-grounds-tests.yml @@ -38,9 +38,6 @@ name: CI ProvingGrounds Tests # Defining BUILD_ARCH ensures the right binaries are pulled down. projects: - - name: proving-grounds-functional-tests-amd64 - current-parameters: true - predefined-parameters: BUILD_ARCH=amd64 - name: proving-grounds-integration-tests-amd64 current-parameters: true predefined-parameters: BUILD_ARCH=arm64 diff --git a/jobs/ci-run/functional/amd64/add-cloud-many.yml b/jobs/ci-run/functional/amd64/add-cloud-many.yml deleted file mode 100644 index 898cdc7..0000000 --- a/jobs/ci-run/functional/amd64/add-cloud-many.yml +++ /dev/null @@ -1,45 +0,0 @@ -- job: - name: nw-add-cloud-many - node: ephemeral-focal-4c-16g-amd64 - description: | - Test add-cloud interactive command. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: 'amd64' - description: 'Arch to build for.' - name: BUILD_ARCH - wrappers: - - cirun-test-stuck-timeout - builders: - - wait-for-cloud-init - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - shell: - !include-raw: ../../scripts/add-cloud-many.sh - publishers: - - postbuildscript: - builders: - - role: SLAVE - build-on: - - SUCCESS - - FAILURE - - UNSTABLE - - ABORTED - build-steps: - - shell: | - set -ex - # NOTE(achilleasa): the cleanup code for the test has been - # moved into a post-build script to ensure that we always - # clean up even if the job gets manually aborted. Please do - # not delete this block. - echo "Ensure that all resources have been cleaned up." - clouds_file="/tmp/cloud-list-${SHORT_GIT_COMMIT}.yaml" - [ -f "${clouds_file}" ] && rm -f "${clouds_file}" || true - [ -f sshuttle.pid ] && kill -INT $(cat sshuttle.pid) || true - [ -f sshuttle-vsphere.pid ] && kill -INT $(cat sshuttle-vsphere.pid) || true - lxc list | grep -E "add-cloud-.*-${SHORT_GIT_COMMIT}" | awk '{print $2}' | xargs lxc delete --force 2>/dev/null || true - - log-panic-check diff --git a/jobs/ci-run/functional/amd64/deploy.yml b/jobs/ci-run/functional/amd64/deploy.yml deleted file mode 100644 index e9e72fe..0000000 --- a/jobs/ci-run/functional/amd64/deploy.yml +++ /dev/null @@ -1,178 +0,0 @@ -- job: - name: nw-deploy-focal-amd64-lxd - node: ephemeral-focal-8c-32g-amd64 - description: |- - Deploy local lxd on focal+amd64 using focal apps. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: 'amd64' - description: 'Arch to build for.' - name: BUILD_ARCH - wrappers: - - cirun-test-stuck-timeout - builders: - - wait-for-cloud-init - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - shell: |- - #!/bin/bash - set -eu - - timeout -s INT 60m ${TESTS_DIR}/deploy_job.py --series focal \ - parallel-lxd $JUJU_BIN $WORKSPACE/artifacts $JOB_NAME --debug \ - --agent-url https://ci-run-streams.s3.amazonaws.com/builds/build-${SHORT_GIT_COMMIT}/ --agent-stream build-${SHORT_GIT_COMMIT} - publishers: - - artifact-results - - log-panic-check - -- job: - name: nw-deploy-jammy-amd64-lxd - node: ephemeral-jammy-4c-16g-amd64 - description: |- - Deploy local lxd on jammy+amd64 using jammy apps. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: 'amd64' - description: 'Arch to build for.' - name: BUILD_ARCH - wrappers: - - cirun-test-stuck-timeout - builders: - - wait-for-cloud-init - - shell: |- - #!/bin/bash - set -eu - - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ - rust-all \ - python3-dev - - pip-install: - modules: setuptools - - pip-install: - modules: setuptools-rust - - functional-python-deps - - get-cloud-environments - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - shell: |- - #!/bin/bash - set -eu - - timeout -s INT 60m ${TESTS_DIR}/deploy_job.py --series jammy \ - parallel-lxd $JUJU_BIN $WORKSPACE/artifacts $JOB_NAME --debug \ - --agent-url https://ci-run-streams.s3.amazonaws.com/builds/build-${SHORT_GIT_COMMIT}/ --agent-stream build-${SHORT_GIT_COMMIT} - publishers: - - artifact-results - - log-panic-check - - -- job: - name: nw-deploy-client-centos9 - node: ephemeral-centos9-8c-32g-amd64 - description: |- - Deploy local aws on centos9+amd64 using jammy apps. - parameters: - - validating-string: - description: The git short hash for the commit you wish to test - name: SHORT_GIT_COMMIT - regex: ^\S{7}$ - msg: Enter a valid 7 char git sha - - string: - default: 'amd64' - description: 'Arch to build for.' - name: BUILD_ARCH - - string: - default: us-west-2 - description: Which region in aws to run on. - name: region - wrappers: - - cirun-test-stuck-timeout - builders: - - wait-for-cloud-init - - functional-python-deps: - modules: pexpect - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - shell: |- - #!/bin/bash - set -eu - - timeout -s INT 60m ${TESTS_DIR}/deploy_job.py --series jammy \ - --region $region \ - parallel-aws $JUJU_BIN $WORKSPACE/artifacts $JOB_NAME --debug \ - --agent-url https://ci-run-streams.s3.amazonaws.com/builds/build-${SHORT_GIT_COMMIT}/ --agent-stream build-${SHORT_GIT_COMMIT} - publishers: - - artifact-results - - log-panic-check - -- job: - name: nw-deploy-jammy-amd64-equinix - node: ephemeral-jammy-4c-16g-amd64 - description: |- - Deploy to equinix cloud jammy+amd64 using jammy apps. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: 'amd64' - description: 'Arch to build for.' - name: BUILD_ARCH - wrappers: - - cirun-test-stuck-timeout - builders: - - wait-for-cloud-init - - pip-install: - modules: setuptools - - functional-python-deps - - get-cloud-environments - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - shell: |- - #!/bin/bash - set -eu - - timeout -s INT 60m ${TESTS_DIR}/deploy_job.py --series jammy \ - parallel-equinix $JUJU_BIN $WORKSPACE/artifacts $JOB_NAME - publishers: - - artifact-results - - log-panic-check - - -- job: - name: nw-deploy-client-windows - node: ephemeral-focal-4c-16g-amd64 - wrappers: - - timeout: - timeout: 30 - fail: true - type: absolute - - cirun-test-stuck-timeout - description: |- - Deploy on Windows. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: 'amd64' - description: 'Arch to build for.' - name: BUILD_ARCH - builders: - - wait-for-cloud-init - - prepare-functional-test-core: - platform: "windows/${BUILD_ARCH}" - - shell: - !include-raw: ../../scripts/deploy-client-windows.sh - publishers: - - log-panic-check diff --git a/jobs/ci-run/functional/amd64/k8s-controller-deploy-caas-charms.yaml b/jobs/ci-run/functional/amd64/k8s-controller-deploy-caas-charms.yaml deleted file mode 100644 index 946c4f5..0000000 --- a/jobs/ci-run/functional/amd64/k8s-controller-deploy-caas-charms.yaml +++ /dev/null @@ -1,120 +0,0 @@ -- job: - name: nw-deploy-bionic-gke - node: ephemeral-focal-8c-32g-amd64 - description: |- - Test bootstrap and deploy to gke. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: amd64 - description: "Arch to build for." - name: BUILD_ARCH - - string: - default: GKE - description: "Specify K8s cloud provider to use." - name: CAAS_PROVIDER - wrappers: - - cirun-test-stuck-timeout - builders: - - select-oci-registry - - wait-for-cloud-init - - get-cloud-environments - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - prepare-ephemeral-node-for-k8s-py-tests: - channel: latest/stable - - shell: |- - #!/bin/bash - set -eu - - 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 \ - --caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac - publishers: - - artifact-results - - log-panic-check - -- job: - name: nw-deploy-bionic-aks - node: ephemeral-focal-8c-32g-amd64 - description: |- - Test bootstrap and deploy to aks. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: amd64 - description: "Arch to build for." - name: BUILD_ARCH - - string: - default: AKS - description: "Specify K8s cloud provider to use." - name: CAAS_PROVIDER - wrappers: - - cirun-test-stuck-timeout - builders: - - select-oci-registry - - wait-for-cloud-init - - get-cloud-environments - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - prepare-ephemeral-node-for-k8s-py-tests: - channel: latest/stable - - shell: |- - #!/bin/bash - set -eu - - 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 \ - --caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac - publishers: - - artifact-results - - log-panic-check - - -- job: - name: nw-deploy-bionic-eks - node: ephemeral-focal-8c-32g-amd64 - description: |- - Test bootstrap and deploy to EKS cluster. - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: amd64 - description: "Arch to build for." - name: BUILD_ARCH - - string: - default: EKS - description: "Specify K8s cloud provider to use." - name: CAAS_PROVIDER - wrappers: - - cirun-test-stuck-timeout - builders: - - select-oci-registry - - wait-for-cloud-init - - get-cloud-environments - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - prepare-ephemeral-node-for-k8s-py-tests: - channel: latest/stable - - shell: |- - #!/bin/bash - set -eu - - 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 \ - --caas-provider=${CAAS_PROVIDER} --k8s-controller --enable-rbac - publishers: - - artifact-results - - log-panic-check diff --git a/jobs/ci-run/functional/amd64/k8s-controller-deploy-kubeflow.yml b/jobs/ci-run/functional/amd64/k8s-controller-deploy-kubeflow.yml deleted file mode 100644 index 33db7dc..0000000 --- a/jobs/ci-run/functional/amd64/k8s-controller-deploy-kubeflow.yml +++ /dev/null @@ -1,77 +0,0 @@ -- job: - name: 'nw-deploy-kubeflow' - node: ephemeral-focal-8c-32g-amd64 - description: "Test bootstrap to k8s cluster then deploy to kubeflow." - concurrent: true - properties: - - throttle: - max-per-node: 1 - max-total: 10 - option: project - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: amd64 - description: "Arch to build for." - name: BUILD_ARCH - - string: - default: MICROK8S - description: "Specify K8s cloud provider to use." - name: CAAS_PROVIDER - - string: - default: full - description: "Specify the kubeflow bundle version to deploy." - name: BUNDLE_VERSION - - bool: - name: BUILD_CHARMS - default: true - description: "Build local kubeflow charms and deploy local bundle or deploy bundle in charm store." - - bool: - name: ENABLE_RBAC - default: false - description: "Deploy kubeflow with RBAC enabled." - 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}" - - prepare-functional-test-core: - platform: "linux/${BUILD_ARCH}" - - prepare-ephemeral-node-for-k8s-py-tests: - channel: "1.21/stable" # https://github.com/canonical/bundle-kubeflow/issues/419#issuecomment-1008732052 - - shell: |- - #!/bin/bash - set -eux - - test -d $HOME/.local/bin || mkdir -p $HOME/.local/bin - export PATH=$PATH:$HOME/.local/bin - - # bundle-kubeflow/tests/run.sh requires `juju` in the $PATH. - export PATH=$PATH:$BIN_DIR - unset JUJU_VERSION - - sudo apt update - sudo apt install -y python3-pip firefox-geckodriver - pip3 install pip --upgrade - sudo snap install charmcraft --stable --classic - sudo snap install juju-wait --classic - - ENV=$(echo "$CAAS_PROVIDER" | sed -e 's/\(.*\)/\L\1/') - declare -a params - if [ "$BUILD_CHARMS" = true ] ; then - params+=( '--build' ) - fi - if [ "$ENABLE_RBAC" = true ] ; then - 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 \ - --caas-provider=$CAAS_PROVIDER --k8s-controller --bundle=$BUNDLE_VERSION ${params[@]} - publishers: - - artifact-results - - log-panic-check diff --git a/jobs/ci-run/functional/proving-grounds-functional-tests.yml b/jobs/ci-run/functional/proving-grounds-functional-tests.yml deleted file mode 100644 index 7ef5073..0000000 --- a/jobs/ci-run/functional/proving-grounds-functional-tests.yml +++ /dev/null @@ -1,56 +0,0 @@ -- job: - name: proving-grounds-functional-tests-amd64 - project-type: "multijob" - description: |- - Build juju snap and binaries for amd64. - node: noop-parent-jobs - concurrent: true - wrappers: - - default-functional-test-wrapper - parameters: - - string: - default: "" - description: "Enable sub job to be run individually." - name: SHORT_GIT_COMMIT - - string: - default: "" - description: "Series to use as default-series in juju bootstrap and model-config in the functional tests." - name: series - builders: - - get-build-details - - set-test-description - - multijob: - name: ProvingGroundsFunctionalTestsAmd64 - projects: - - name: nw-add-cloud-many - current-parameters: true - - name: nw-deploy-bionic-aks - current-parameters: true - - name: nw-deploy-bionic-eks - current-parameters: true - - name: nw-deploy-bionic-gke - current-parameters: true - - name: nw-deploy-bionic-microk8s - disabled: true # nameserver fix required on microk8s - current-parameters: true - - name: nw-deploy-client-centos9 - current-parameters: true - - name: nw-deploy-client-windows - current-parameters: true - - name: nw-deploy-focal-amd64-lxd - current-parameters: true - - name: nw-deploy-jammy-amd64-equinix - current-parameters: true - enable-condition: '!["2.8"].contains("${JUJU_VERSION_MAJOR_MINOR}")' # Provider support is only available on 2.9+ - - name: nw-deploy-jammy-amd64-lxd - current-parameters: true - - name: nw-deploy-kubeflow - alias: nw-kubeflow-microk8s-lite-rbac - current-parameters: true - predefined-parameters: |- - CAAS_PROVIDER=MICROK8S - BUNDLE_VERSION=lite - BUILD_CHARMS=false - ENABLE_RBAC=true - - name: nw-upgrade-juju-beta - current-parameters: true diff --git a/jobs/ci-run/utils.yml b/jobs/ci-run/utils.yml index e9b9ec3..493ce87 100644 --- a/jobs/ci-run/utils.yml +++ b/jobs/ci-run/utils.yml @@ -236,60 +236,6 @@ default-excludes: true case-sensitive: true -- builder: - name: 'prepare-ephemeral-node-for-k8s-py-tests' - builders: - - shell: |- - #!/bin/bash - set -xe - # ensure test dependencies. - test -d $JUJU_HOME/juju-homes/$JOB_NAME || mkdir -p $JUJU_HOME/juju-homes/$JOB_NAME - test -d $HOME/.local/bin || mkdir -p $HOME/.local/bin - export PATH=$PATH:$HOME/.local/bin - pip3 install -r $TESTS_DIR/requirements.txt --no-cache-dir - - prepare-ephemeral-node-for-microk8s: - channel: "{channel}" - -- builder: - name: 'prepare-ephemeral-node-for-microk8s' - builders: - - shell: |- - #!/bin/bash - set -xe - - sudo getent group microk8s || sudo addgroup microk8s && - sudo usermod -a -G microk8s $USER - - # ensure microk8s ready. - if [ -x "$(command -v microk8s)" ]; then - sudo snap refresh microk8s --classic --channel {channel} - else - sudo snap install microk8s --classic --channel {channel} - fi - sleep 5 - microk8s status --wait-ready --timeout 180 - microk8s.kubectl get no - badNodes=$(microk8s.kubectl get no -o json | jq -r '.items[] | select(([ .status.conditions[] | select(.type == "Ready" and (.status != "True" or .reason != "KubeletReady") ) ] | length ) == 1 ) | .metadata.name') - for no in ${{badNodes[@]}}; do - microk8s.remove-node $no - done - microk8s.kubectl get no - microk8s.kubectl -n kube-system rollout status ds/calico-node - microk8s.kubectl get all -A - -- builder: - name: 'pip-install' - builders: - - shell: |- - #!/bin/bash - set -eux - - if command -v pip; then - pip install {modules} - else - pip3 install {modules} - fi - - builder: name: 'lxd-src-command-base' builders: diff --git a/requirements.txt b/requirements.txt index 12d6ce5..90e214a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ jenkins-job-builder==4.3.0 -setuptools==56.2.0 +setuptools<=65.7.0 diff --git a/tests/suites/static_analysis/lint_yaml.sh b/tests/suites/static_analysis/lint_yaml.sh index 807a7e6..f7ea31e 100644 --- a/tests/suites/static_analysis/lint_yaml.sh +++ b/tests/suites/static_analysis/lint_yaml.sh @@ -125,6 +125,7 @@ jobs: - github-juju-merge-jobs-{branch_name}:github-juju-merge-jobs - github-juju-pylibjuju-jobs:github-juju-pylibjuju-jobs - github-juju-check-jobs:github-juju-check-jobs + - ci-proving-ground-tests:CI ProvingGrounds Tests - test-bootstrap-multijob:IntegrationTests-bootstrap - test-coslite-multijob:IntegrationTests-coslite - test-deploy_aks-multijob:IntegrationTests-deploy_aks