diff --git a/Makefile b/Makefile index 0cdb252..8e4ed89 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,17 @@ -STATIC_ANALYSIS_JOB ?= -IGNORE_STATIC_ANALYSIS ?= -PUSH_JOB ?= -PUSH_TARGET ?= "jobs/ci-run" -JJB_CONF_PATH ?= jenkins-jjb -JUJU_REPO_PATH ?= "${GOPATH}/src/github.com/juju/juju" +STATIC_ANALYSIS_JOB ?= +IGNORE_STATIC_ANALYSIS ?= +PUSH_JOB ?= +PUSH_TARGET ?= "jobs/ci-run" +JJB_CONF_PATH ?= jenkins-jjb +JUJU_REPO_PATH ?= "${GOPATH}/src/github.com/juju/juju" -cwd = $(shell pwd) -virtualenv_dir = $(cwd)/venv +cwd = $(shell pwd) +virtualenv_dir = $(cwd)/venv python_base_path = $(shell which python3) .PHONY: ensure-venv ensure-venv: - pip3 show virtualenv > /dev/null || pip3 install virtualenv - test -d venv || virtualenv -p $(python_base_path) $(virtualenv_dir) + $(python_base_path) -m venv $(virtualenv_dir) .PHONY: install-deps install-deps: ensure-venv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2aa8912 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1719956923, + "narHash": "sha256-nNJHJ9kfPdzYsCOlHOnbiiyKjZUW5sWbwx3cakg3/C4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "706eef542dec88cc0ed25b9075d3037564b2d164", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ea51bd2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "juju qa jenkins job builder shell"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + }; + + outputs = { self, nixpkgs, ... } @ inputs: + let + forAllSystems = inputs.nixpkgs.lib.genAttrs [ + "aarch64-linux" + "x86_64-linux" + "aarch64-darwin" + ]; + in + { + devShells = forAllSystems (system: { + default = + let + pkgs = nixpkgs.legacyPackages.${system}; + in + pkgs.mkShell { + name = "juju-qa-jenkins"; + # Enable experimental features without having to specify the argument + NIX_CONFIG = "experimental-features = nix-command flakes"; + nativeBuildInputs = with pkgs; [ + coreutils + findutils + gnumake + gnused + gnugrep + zsh + go + python3 + shellcheck + ]; + shellHook = '' + exec zsh + ''; + }; + }); + }; +} diff --git a/jenkins-jjb-localhost b/jenkins-jjb-localhost new file mode 100644 index 0000000..6cf960c --- /dev/null +++ b/jenkins-jjb-localhost @@ -0,0 +1,11 @@ +[job_builder] +ignore_cache=True +keep_descriptions=False +include_path=.:scripts:~/git/ +recursive=False +exclude=.*:manual:./development +allow_duplicates=False + +[jenkins] +url=http://localhost:8080 +query_plugins_info=True diff --git a/jobs/ci-run/build/builddqlite.yml b/jobs/ci-run/build/builddqlite.yml index 9c8b6d3..073c172 100644 --- a/jobs/ci-run/build/builddqlite.yml +++ b/jobs/ci-run/build/builddqlite.yml @@ -15,7 +15,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - multijob: @@ -24,23 +24,23 @@ - name: build-dqlite-amd64 current-parameters: true predefined-parameters: |- - GIT_COMMIT=${SHORT_GIT_COMMIT} + GIT_COMMIT=${{SHORT_GIT_COMMIT}} - name: build-dqlite-arm64 current-parameters: true predefined-parameters: |- - GIT_COMMIT=${SHORT_GIT_COMMIT} + GIT_COMMIT=${{SHORT_GIT_COMMIT}} - name: build-dqlite-ppc64el current-parameters: true predefined-parameters: |- - GIT_COMMIT=${SHORT_GIT_COMMIT} + GIT_COMMIT=${{SHORT_GIT_COMMIT}} - name: build-dqlite-s390x current-parameters: true predefined-parameters: |- - GIT_COMMIT=${SHORT_GIT_COMMIT} + GIT_COMMIT=${{SHORT_GIT_COMMIT}} - job: name: build-dqlite-amd64 - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 concurrent: true description: |- Build dqlite libraries for specified platform @@ -53,7 +53,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - wait-for-cloud-init @@ -68,7 +68,7 @@ - job: name: build-dqlite-arm64 - node: ephemeral-focal-8c-32g-arm64 + node: ephemeral-noble-8c-32g-arm64 concurrent: true description: |- Build dqlite libraries for specified platform @@ -81,7 +81,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - wait-for-cloud-init @@ -98,11 +98,11 @@ name: "make-dqlite" builders: - host-src-command: - src_command: !include-raw: ../scripts/snippet_make-dqlite-build.sh + src_command: !include-raw-verbatim: ../scripts/snippet_make-dqlite-build.sh - job: name: build-dqlite-ppc64el - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 concurrent: true description: |- Build dqlite libraries for specified platform @@ -115,7 +115,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - wait-for-cloud-init @@ -132,7 +132,7 @@ - job: name: build-dqlite-s390x - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 concurrent: true description: |- Build dqlite libraries for specified platform @@ -145,7 +145,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - wait-for-cloud-init @@ -164,7 +164,7 @@ name: "make-cross-dqlite" builders: - host-src-command: - src_command: !include-raw: ../scripts/snippet_make-dqlite-cross-build.sh + src_command: !include-raw-verbatim: ../scripts/snippet_make-dqlite-cross-build.sh - builder: name: "upload-s3-dqlite" diff --git a/jobs/ci-run/build/buildjuju.yml b/jobs/ci-run/build/buildjuju.yml index 9eaba92..ef8f5d5 100644 --- a/jobs/ci-run/build/buildjuju.yml +++ b/jobs/ci-run/build/buildjuju.yml @@ -2,7 +2,7 @@ - job: name: build-juju - node: ephemeral-focal-16c-64g-amd64 + node: ephemeral-noble-16c-64g-amd64 concurrent: true description: |- Build juju binaries for specified platform @@ -11,7 +11,7 @@ - workspace-cleanup - timestamps - build-name: - name: build-juju-${BUILD_LABEL} + name: build-juju-${{BUILD_LABEL}} properties: - build-discarder: days-to-keep: 30 @@ -22,7 +22,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - string: default: '' @@ -53,23 +53,23 @@ - setup-go-environment - get-s3-source-payload - set-build-description: - GOVERSION: "${GOVERSION}" + GOVERSION: "${{GOVERSION}}" - make-juju: - platform: ${PLATFORM} - build_tags: ${BUILD_TAGS} + platform: ${{PLATFORM}} + build_tags: ${{BUILD_TAGS}} - conditional-step: condition-kind: regex-match label: "$PLATFORM" regex: "windows.*" steps: - make-windows-installer: - platform: ${PLATFORM} + platform: ${{PLATFORM}} - create-build-payload-tarballs: - platform: ${PLATFORM} - label: ${LABEL:-} + platform: ${{PLATFORM}} + label: ${{LABEL:-}} - upload-s3-binaries: - platform: ${PLATFORM} - label: ${LABEL:-} + platform: ${{PLATFORM}} + label: ${{LABEL:-}} - conditional-step: condition-kind: and condition-operands: @@ -81,7 +81,7 @@ condition-string2: "" steps: - upload-s3-agent-binaries: - platform: ${PLATFORM} + platform: ${{PLATFORM}} - builder: name: "make-windows-installer" @@ -135,11 +135,11 @@ rm -rf make-juju.properties - host-src-command: - src_command: !include-raw: ../scripts/snippet_make-release-build.sh + src_command: !include-raw-verbatim: ../scripts/snippet_make-release-build.sh - job: name: build-jujud-operator - node: ephemeral-jammy-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: Build juju docker image for caas operator on all platforms. wrappers: - ansicolor @@ -153,7 +153,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - string: default: "" @@ -170,13 +170,13 @@ - setup-go-environment - get-s3-source-payload - set-build-description: - GOVERSION: "${GOVERSION}" + GOVERSION: "${{GOVERSION}}" - shell: |- #!/bin/bash set -eu touch build.properties - echo "DOCKER_USERNAME=public.ecr.aws/jujuqabot/build-${SHORT_GIT_COMMIT}" >> build.properties + echo "DOCKER_USERNAME=public.ecr.aws/jujuqabot/build-${{SHORT_GIT_COMMIT}}" >> build.properties cat build.properties - inject: @@ -186,11 +186,11 @@ - ensure-aws-credentials - docker-ecr-login - get-s3-build-payload-packaging: - platforms: "${BUILD_PLATFORMS}" + platforms: "${{BUILD_PLATFORMS}}" - host-src-command: - src_command: !include-raw: ../scripts/snippet_setup_ecr_public.sh + src_command: !include-raw-verbatim: ../scripts/snippet_setup_ecr_public.sh - host-src-command: - src_command: !include-raw: ../scripts/snippet_caas-jujud-operator.sh + src_command: !include-raw-verbatim: ../scripts/snippet_caas-jujud-operator.sh - builder: name: "create-build-payload-tarballs" diff --git a/jobs/ci-run/build/buildmusl.yml b/jobs/ci-run/build/buildmusl.yml index 2fb2bbb..9514b8e 100644 --- a/jobs/ci-run/build/buildmusl.yml +++ b/jobs/ci-run/build/buildmusl.yml @@ -15,7 +15,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - get-build-details @@ -26,15 +26,15 @@ - name: build-musl-amd64 current-parameters: true predefined-parameters: |- - GIT_COMMIT=${SHORT_GIT_COMMIT} + GIT_COMMIT=${{SHORT_GIT_COMMIT}} - name: build-musl-arm64 current-parameters: true predefined-parameters: |- - GIT_COMMIT=${SHORT_GIT_COMMIT} + GIT_COMMIT=${{SHORT_GIT_COMMIT}} - job: name: build-musl-amd64 - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 concurrent: true description: |- Build musl libraries for specified platform @@ -47,7 +47,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - wait-for-cloud-init @@ -62,7 +62,7 @@ - job: name: build-musl-arm64 - node: ephemeral-focal-8c-32g-arm64 + node: ephemeral-noble-8c-32g-arm64 concurrent: true description: |- Build musl libraries for specified platform @@ -75,7 +75,7 @@ - validating-string: description: The git short hash for the commit you wish to build name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha builders: - wait-for-cloud-init @@ -92,7 +92,7 @@ name: "make-musl" builders: - host-src-command: - src_command: !include-raw: ../scripts/snippet_make-musl-build.sh + src_command: !include-raw-verbatim: ../scripts/snippet_make-musl-build.sh - builder: name: "upload-s3-musl" diff --git a/jobs/ci-run/build/streams.yaml b/jobs/ci-run/build/streams.yaml index a9d8f48..b2063ac 100644 --- a/jobs/ci-run/build/streams.yaml +++ b/jobs/ci-run/build/streams.yaml @@ -1,7 +1,7 @@ ## Jobs and builders for handling agent json - job: name: generate-agent-testing-streams - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Build simple streams agent product json wrappers: @@ -16,20 +16,20 @@ builders: - get-build-details - get-s3-agent-payload: - dest: ${WORKSPACE} + dest: ${{WORKSPACE}} platforms: linux/amd64 linux/arm64 linux/s390x linux/ppc64el - shell: |- #!/bin/bash set -e - mkdir -p ${WORKSPACE}/agent_json + mkdir -p ${{WORKSPACE}}/agent_json - generate-agent-json: platforms: linux/amd64 linux/arm64 linux/s390x linux/ppc64el product_name: ubuntu - output_dir: "${WORKSPACE}/agent_json" + output_dir: "${{WORKSPACE}}/agent_json" - generate-agent-json: platforms: linux/amd64 linux/arm64 linux/s390x linux/ppc64el product_name: centos - output_dir: "${WORKSPACE}/agent_json" + output_dir: "${{WORKSPACE}}/agent_json" - install-simplestreams - install-s3cmd - get-s3-creds @@ -39,18 +39,18 @@ # Generate the streams data. mkdir -p generated - agent_json_file_path=${WORKSPACE}/agent_json/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT}-agent.json + agent_json_file_path=${{WORKSPACE}}/agent_json/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}}-agent.json json2streams --juju-format \ - "${agent_json_file_path}" \ - "${WORKSPACE}/generated/" + "${{agent_json_file_path}}" \ + "${{WORKSPACE}}/generated/" - GENERATED_STREAMS_TARBALL=build-${JUJU_VERSION}-${SHORT_GIT_COMMIT}-generated-streams.tar.xz - tar cfJ ${GENERATED_STREAMS_TARBALL} -C generated/ streams + GENERATED_STREAMS_TARBALL=build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}}-generated-streams.tar.xz + tar cfJ ${{GENERATED_STREAMS_TARBALL}} -C generated/ streams s3cmd --config $S3_CFG \ put \ - "${GENERATED_STREAMS_TARBALL}" \ - s3://juju-qa-data/ci-run/build-${SHORT_GIT_COMMIT}/agents/ + "${{GENERATED_STREAMS_TARBALL}}" \ + s3://juju-qa-data/ci-run/build-${{SHORT_GIT_COMMIT}}/agents/ - builder: # Used to generate agent metadata for CI tests @@ -61,14 +61,14 @@ # product_name: Product name to use (e.g. ubuntu, centos) # output_dir: The directory in which to place the resulting json files builders: - - shell: !include-raw: ../scripts/generate-agent-json.sh + - shell: !include-raw-expand: ../scripts/generate-agent-json.template.sh - job: name: publish-testing-streams-aws description: |- Publish stream metadata and agents from this build for use in functional testing. - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 wrappers: - ansicolor - workspace-cleanup @@ -89,9 +89,9 @@ #!/bin/bash set -eu - mkdir -p ${WORKSPACE}/agent/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT}/ + mkdir -p ${{WORKSPACE}}/agent/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}}/ - get-s3-agent-payload: - dest: ${WORKSPACE}/agent/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT} + dest: ${{WORKSPACE}}/agent/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}} platforms: linux/amd64 linux/arm64 linux/s390x linux/ppc64el - retrieve-generated-streams - install-stream-patcher @@ -105,20 +105,20 @@ # - builds/build-SHA # - streams/v1 # - agents/*.tgz - ${WORKSPACE}/stream-patcher.py \ - ${WORKSPACE}/streams \ - ${SHORT_GIT_COMMIT} + ${{WORKSPACE}}/stream-patcher.py \ + ${{WORKSPACE}}/streams \ + ${{SHORT_GIT_COMMIT}} s3cmd sync --config $S3_CFG \ - ${WORKSPACE}/streams \ - s3://ci-run-streams/builds/build-${SHORT_GIT_COMMIT}/ \ + ${{WORKSPACE}}/streams \ + s3://ci-run-streams/builds/build-${{SHORT_GIT_COMMIT}}/ \ --acl-public # NOTE: this sync removes the "build-$SHA" indirection and effectively # pulls the binaries one folder up (under agent/) s3cmd sync --config $S3_CFG \ - ${WORKSPACE}/agent/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT}/ \ - s3://ci-run-streams/builds/build-${SHORT_GIT_COMMIT}/agent/ \ + ${{WORKSPACE}}/agent/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}}/ \ + s3://ci-run-streams/builds/build-${{SHORT_GIT_COMMIT}}/agent/ \ --acl-public @@ -127,7 +127,7 @@ description: |- Publish stream metadata and agents from this build for use in functional testing. - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 wrappers: - ansicolor - workspace-cleanup @@ -147,10 +147,10 @@ #!/bin/bash set -e - rm -fr ${WORKSPACE}/agent || true - mkdir -p ${WORKSPACE}/agent/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT}/ + rm -fr ${{WORKSPACE}}/agent || true + mkdir -p ${{WORKSPACE}}/agent/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}}/ - get-s3-agent-payload: - dest: ${WORKSPACE}/agent/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT} + dest: ${{WORKSPACE}}/agent/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}} platforms: linux/amd64 linux/arm64 linux/s390x linux/ppc64el - retrieve-generated-streams - install-stream-patcher @@ -165,24 +165,24 @@ # - builds/build-SHA # - streams/v1 # - agents/*.tgz - ${WORKSPACE}/stream-patcher.py \ - ${WORKSPACE}/streams \ - ${SHORT_GIT_COMMIT} + ${{WORKSPACE}}/stream-patcher.py \ + ${{WORKSPACE}}/streams \ + ${{SHORT_GIT_COMMIT}} set +x az storage blob upload-batch \ - --account-key=${AZURE_STORAGE_ACCESS_KEY} \ - --account-name=${AZURE_STORAGE_ACCOUNT} \ + --account-key=${{AZURE_STORAGE_ACCESS_KEY}} \ + --account-name=${{AZURE_STORAGE_ACCOUNT}} \ -d juju-agents \ - -s ${WORKSPACE}/streams \ - --destination-path ci-run-streams/builds/build-${SHORT_GIT_COMMIT}/streams + -s ${{WORKSPACE}}/streams \ + --destination-path ci-run-streams/builds/build-${{SHORT_GIT_COMMIT}}/streams az storage blob upload-batch \ - --account-key=${AZURE_STORAGE_ACCESS_KEY} \ - --account-name=${AZURE_STORAGE_ACCOUNT} \ + --account-key=${{AZURE_STORAGE_ACCESS_KEY}} \ + --account-name=${{AZURE_STORAGE_ACCOUNT}} \ -d juju-agents \ - -s ${WORKSPACE}/agent/build-${JUJU_VERSION}-${SHORT_GIT_COMMIT} \ - --destination-path ci-run-streams/builds/build-${SHORT_GIT_COMMIT}/agent + -s ${{WORKSPACE}}/agent/build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}} \ + --destination-path ci-run-streams/builds/build-${{SHORT_GIT_COMMIT}}/agent - builder: name: retrieve-generated-streams @@ -190,12 +190,12 @@ - install-s3cmd - get-s3-creds - shell: |- - GENERATED_STREAMS_TARBALL=build-${JUJU_VERSION}-${SHORT_GIT_COMMIT}-generated-streams.tar.xz + GENERATED_STREAMS_TARBALL=build-${{JUJU_VERSION}}-${{SHORT_GIT_COMMIT}}-generated-streams.tar.xz s3cmd --config $S3_CFG \ get \ - s3://juju-qa-data/ci-run/build-${SHORT_GIT_COMMIT}/agents/${GENERATED_STREAMS_TARBALL} \ + s3://juju-qa-data/ci-run/build-${{SHORT_GIT_COMMIT}}/agents/${{GENERATED_STREAMS_TARBALL}} \ ./ - tar xf ${GENERATED_STREAMS_TARBALL} + tar xf ${{GENERATED_STREAMS_TARBALL}} - builder: name: install-stream-patcher @@ -206,11 +206,11 @@ # Create the stream product/index patching script on the fly index_type="agents" - if [[ "${JUJU_VERSION}" == 2.8* ]]; then + if [[ "${{JUJU_VERSION}}" == 2.8* ]]; then index_type="tools" fi - cat < ${WORKSPACE}/stream-patcher.py + cat < ${{WORKSPACE}}/stream-patcher.py #!/usr/bin/env python3 from argparse import ArgumentParser @@ -234,7 +234,7 @@ target = path.join( stream_folder, "v1", - "com.ubuntu.juju-build-{}-${index_type}.json".format(build_sha) + "com.ubuntu.juju-build-{{}}-${{index_type}}.json".format(build_sha) ) with open(target) as f: stream_data = json.load(f) @@ -246,11 +246,11 @@ def patch_agent_path_r(d, u, sha): for k, v in u.items(): if isinstance(v, collections.abc.Mapping): - d[k] = patch_agent_path_r(d.get(k, {}), v, sha) + d[k] = patch_agent_path_r(d.get(k, {{}}), v, sha) elif isinstance(v, str): if "agent/build-" in v: - d[k] = "agent/{}".format( - str.lstrip(v, "agent/build-{}/".format(sha)) + d[k] = "agent/{{}}".format( + str.lstrip(v, "agent/build-{{}}/".format(sha)) ) return d @@ -259,4 +259,4 @@ sys.exit(main()) EOT - chmod +x ${WORKSPACE}/stream-patcher.py + chmod +x ${{WORKSPACE}}/stream-patcher.py diff --git a/jobs/ci-run/ci-run-gating-tests.yml b/jobs/ci-run/ci-run-gating-tests.yml index ac96d9e..26d319b 100644 --- a/jobs/ci-run/ci-run-gating-tests.yml +++ b/jobs/ci-run/ci-run-gating-tests.yml @@ -17,7 +17,7 @@ - validating-string: description: The git short hash for the commit you wish to test name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - string: default: "" @@ -34,7 +34,7 @@ attach-build-log: true first-failure: true fixed-unhealthy: true - subject: "STOP THE LINE! ${DEFAULT_SUBJECT}" + subject: "STOP THE LINE!" body: |

functional-tests-amd64 test failure

These tests must pass. Diagnose the problem and assign to a member of the team today! @@ -50,8 +50,8 @@ - name: gating-integration-tests-amd64 current-parameters: true predefined-parameters: |- - BOOTSTRAP_SERIES=${BOOTSTRAP_SERIES} + BOOTSTRAP_SERIES=${{BOOTSTRAP_SERIES}} - name: gating-integration-tests-arm64 current-parameters: true predefined-parameters: |- - BOOTSTRAP_SERIES=${BOOTSTRAP_SERIES} + BOOTSTRAP_SERIES=${{BOOTSTRAP_SERIES}} diff --git a/jobs/ci-run/ci-run-master.yml b/jobs/ci-run/ci-run-master.yml index a101c84..7c0631e 100644 --- a/jobs/ci-run/ci-run-master.yml +++ b/jobs/ci-run/ci-run-master.yml @@ -88,10 +88,10 @@ - name: "package-juju-source" current-parameters: true predefined-parameters: |- - GITHUB_BRANCH_HEAD_SHA=${GITHUB_BRANCH_HEAD_SHA} - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - JUJU_BUILD_NUMBER=${BUILD_NUMBER} - GOVERSION=${GOVERSION} + GITHUB_BRANCH_HEAD_SHA=${{GITHUB_BRANCH_HEAD_SHA}} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + JUJU_BUILD_NUMBER=${{BUILD_NUMBER}} + GOVERSION=${{GOVERSION}} - get-s3-source-payload - inject: @@ -100,7 +100,7 @@ series=focal - get-build-details - description-setter: - description: "${JUJU_VERSION}:${SHORT_GIT_COMMIT} (go ${GOVERSION})" + description: "${{JUJU_VERSION}}:${{SHORT_GIT_COMMIT}} (go ${{GOVERSION}})" - multijob: name: "Building Juju Binaries" condition: SUCCESSFUL @@ -112,56 +112,56 @@ predefined-parameters: |- PLATFORM=linux/amd64 BUILD_LABEL=linux-amd64 - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-linux-arm64 current-parameters: true predefined-parameters: |- PLATFORM=linux/arm64 BUILD_LABEL=linux-arm64 - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-linux-s390x current-parameters: true predefined-parameters: |- PLATFORM=linux/s390x BUILD_LABEL=linux-s390x - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-linux-ppc64el current-parameters: true predefined-parameters: |- PLATFORM=linux/ppc64el BUILD_LABEL=linux-ppc64el - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-darwin-amd64 current-parameters: true predefined-parameters: |- PLATFORM=darwin/amd64 BUILD_LABEL=darwin-amd64 - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-darwin-arm64 current-parameters: true predefined-parameters: |- PLATFORM=darwin/arm64 BUILD_LABEL=darwin-arm64 - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-windows-amd64 current-parameters: true predefined-parameters: |- PLATFORM=windows/amd64 BUILD_LABEL=windows-amd64 - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - name: build-juju alias: build-juju-k8s-linux-amd64 current-parameters: true @@ -170,8 +170,8 @@ LABEL=k8s BUILD_TAGS=minimal,provider_kubernetes BUILD_LABEL=k8s-linux-amd64 - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - multijob: name: "Building Juju OCI Images" @@ -180,8 +180,8 @@ - name: build-jujud-operator current-parameters: true predefined-parameters: |- - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - multijob: name: "Simple Streams" @@ -191,7 +191,7 @@ - name: generate-agent-testing-streams current-parameters: true predefined-parameters: |- - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} - multijob: name: "Simple Streams Publish" @@ -201,11 +201,11 @@ - name: publish-testing-streams-aws current-parameters: true predefined-parameters: |- - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} - name: publish-testing-streams-azure current-parameters: true predefined-parameters: |- - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} publishers: - trigger-parameterized-builds: @@ -213,9 +213,9 @@ condition: SUCCESS current-parameters: true predefined-parameters: |- - series=${series} - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + series=${{series}} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - job: name: "ci-gating-tests" @@ -240,7 +240,7 @@ - validating-string: description: The git short hash for the commit you wish to test name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - string: default: "" @@ -264,28 +264,28 @@ - name: "gating-tests" current-parameters: true predefined-parameters: |- - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - series=${series} - GOVERSION=${GOVERSION} - BOOTSTRAP_SERIES=${BOOTSTRAP_SERIES} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + series=${{series}} + GOVERSION=${{GOVERSION}} + BOOTSTRAP_SERIES=${{BOOTSTRAP_SERIES}} - name: "unit-tests" current-parameters: true predefined-parameters: |- - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} publishers: - trigger-parameterized-builds: - project: "ci-proving-ground-tests-once-daily" condition: ALWAYS current-parameters: true predefined-parameters: |- - series=${series} - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + series=${{series}} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} - job: name: "package-juju-source" - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 project-type: "multijob" condition: SUCCESSFUL wrappers: @@ -309,7 +309,7 @@ - install-go - inject: properties-content: |- - JUJU_SOURCE_CHECKOUT=${WORKSPACE}/tmp_initial_clone + JUJU_SOURCE_CHECKOUT=${{WORKSPACE}}/tmp_initial_clone - shell: |- git init "$JUJU_SOURCE_CHECKOUT" cd "$JUJU_SOURCE_CHECKOUT" diff --git a/jobs/ci-run/ci-run-proving-grounds-tests.yml b/jobs/ci-run/ci-run-proving-grounds-tests.yml index f86a4a0..ac1ebf0 100644 --- a/jobs/ci-run/ci-run-proving-grounds-tests.yml +++ b/jobs/ci-run/ci-run-proving-grounds-tests.yml @@ -17,7 +17,7 @@ - validating-string: description: The git short hash for the commit you wish to test name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - string: default: "" @@ -53,7 +53,7 @@ - validating-string: description: The git short hash for the commit you wish to test name: SHORT_GIT_COMMIT - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - string: default: "" @@ -71,42 +71,13 @@ - get-build-details - set-test-description - system-groovy: - command: | - import hudson.model.* - - def desc = build.getDescription().split(":") - def jujuVersion = desc[0] - def jujuVersionExploded = [] - for (v in jujuVersion.split(/[.]/)) { - jujuVersionExploded.push(v) - } - if (jujuVersionExploded.size() > 3 || jujuVersionExploded[1].indexOf("-") != -1) { - jujuVersionExploded.pop() - } - jujuVersion = jujuVersionExploded.join(".") - - println "Looking for $jujuVersion in previous builds..." - - def b = build.getPreviousBuild() - while (b != null) { - if (b.result != Result.SUCCESS || b.getDescription() == null || b.getDescription().indexOf(jujuVersion) == -1) { - b = b.getPreviousBuild() - continue - } - if (b.getStartTimeInMillis()+(24*60*60*1000)>build.getStartTimeInMillis()) { - println "Found previous build less than a day ago ${b.getAbsoluteUrl()}" - throw new InterruptedException() - } - break - } - - println "It has been one day since last build... triggering job" + command: !include-raw-verbatim: "scripts/once-daily.groovy" publishers: - trigger-parameterized-builds: - project: "ci-proving-ground-tests" condition: SUCCESS current-parameters: true predefined-parameters: |- - series=${series} - SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT} - GOVERSION=${GOVERSION} + series=${{series}} + SHORT_GIT_COMMIT=${{SHORT_GIT_COMMIT}} + GOVERSION=${{GOVERSION}} diff --git a/jobs/ci-run/integration/builders.yaml b/jobs/ci-run/integration/builders.yaml index 3a7e5c0..3f8efb3 100644 --- a/jobs/ci-run/integration/builders.yaml +++ b/jobs/ci-run/integration/builders.yaml @@ -58,5 +58,5 @@ - get-juju-cloud-creds - host-src-command-with-setup: src_command: - !include-raw: "common/test-runner.sh" + !include-raw-verbatim: "common/test-runner.sh" setup_steps: "{setup_steps}" diff --git a/jobs/ci-run/integration/common/test-runner.sh b/jobs/ci-run/integration/common/test-runner.sh index 248ea6d..d2cb968 100644 --- a/jobs/ci-run/integration/common/test-runner.sh +++ b/jobs/ci-run/integration/common/test-runner.sh @@ -6,7 +6,7 @@ set -eux # Term is set to "unknown" in jenkins, so we force it to empty. Ensuring it # doesn't error out later on. export TERM="" -export TEST_RUNNER_NAME="${{TEST_RUNNER_NAME}}" +export TEST_RUNNER_NAME="${TEST_RUNNER_NAME}" if [ ! -d "$JUJU_SRC_PATH"/tests ]; then echo "Test directory not found." @@ -14,7 +14,7 @@ if [ ! -d "$JUJU_SRC_PATH"/tests ]; then exit 0 fi -export PATH="${{BIN_DIR}}":$PATH +export PATH="${BIN_DIR}":$PATH # Copy the juju cloud credentials to ~/.local/share/juju. This is # required for bootstrapping non-lxd providers for the integration tests. @@ -56,7 +56,7 @@ while [ $attempts -lt 3 ]; do sudo snap install microceph || true fi # shellcheck disable=SC2193 - if [ "${{BOOTSTRAP_PROVIDER:-}}" = "ec2" ]; then + if [ "${BOOTSTRAP_PROVIDER:-}" = "ec2" ]; then if ! which aws >/dev/null 2>&1; then sudo snap install aws-cli --classic || true fi @@ -73,7 +73,7 @@ while [ $attempts -lt 3 ]; do chmod 600 ~/.aws/* fi # shellcheck disable=SC2193 - if [ "${{BOOTSTRAP_PROVIDER:-}}" = "azure" ]; then + if [ "${BOOTSTRAP_PROVIDER:-}" = "azure" ]; then if ! which az >/dev/null 2>&1; then curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash fi @@ -81,7 +81,7 @@ while [ $attempts -lt 3 ]; do az login --service-principal \ -u "$(cat "$HOME"/.local/share/juju/credentials.yaml | yq ".credentials.azure.credentials.application-id")" \ -p "$(cat "$HOME"/.local/share/juju/credentials.yaml | yq ".credentials.azure.credentials.application-password")" \ - --tenant "${{AZURE_TENANT}}" + --tenant "${AZURE_TENANT}" fi attempts=$((attempts + 1)) done @@ -93,8 +93,8 @@ OUT=$(./main.sh -H 2>&1) if [ "$(echo "$OUT" | grep -q "Illegal option -H" || true)" ]; then echo "Not supported runner query." exit 1 -elif [ "$(echo "$OUT" | grep -q "${{TEST_RUNNER_NAME}}" || true)" ]; then - echo "Test ${{TEST_RUNNER_NAME}} not found." +elif [ "$(echo "$OUT" | grep -q "${TEST_RUNNER_NAME}" || true)" ]; then + echo "Test ${TEST_RUNNER_NAME} not found." echo "Recording as success." exit 0 fi @@ -112,15 +112,15 @@ set -u echo "=> Running tests" -artifacts_dir="${{WORKSPACE}}/artifacts" +artifacts_dir="${WORKSPACE}/artifacts" mkdir -p "$artifacts_dir" set -o pipefail ./main.sh -v \ - -a "${{artifacts_dir}}"/output.tar.gz \ + -a "${artifacts_dir}"/output.tar.gz \ -x output.txt \ - -s \""${{TEST_SKIP_TASKS:-}}"\" \ - "${{TEST_RUNNER_NAME}}" "${{TEST_TASK_NAME:-}}" 2>&1 | tee output.txt + -s \""${TEST_SKIP_TASKS:-}"\" \ + "${TEST_RUNNER_NAME}" "${TEST_TASK_NAME:-}" 2>&1 | tee output.txt exit_code=$? set +o pipefail diff --git a/jobs/ci-run/integration/gen/test-actions.yml b/jobs/ci-run/integration/gen/test-actions.yml index 7eb3189..65ef5c2 100644 --- a/jobs/ci-run/integration/gen/test-actions.yml +++ b/jobs/ci-run/integration/gen/test-actions.yml @@ -43,14 +43,14 @@ - job: name: test-actions-test-actions-params-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test actions suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -107,8 +107,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[5-9].*|^4\\.([0-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -121,14 +121,14 @@ - job: name: test-actions-test-actions-params-azure - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test actions suite on azure parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -185,8 +185,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[5-9].*|^4\\.([0-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -199,14 +199,14 @@ - job: name: test-actions-test-actions-params-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test actions suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -263,8 +263,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[5-9].*|^4\\.([0-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -277,14 +277,14 @@ - job: name: test-actions-test-actions-params-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test actions suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -337,8 +337,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[5-9].*|^4\\.([0-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: diff --git a/jobs/ci-run/integration/gen/test-agents.yml b/jobs/ci-run/integration/gen/test-agents.yml index e195ecf..6919af4 100644 --- a/jobs/ci-run/integration/gen/test-agents.yml +++ b/jobs/ci-run/integration/gen/test-agents.yml @@ -39,14 +39,14 @@ - job: name: test-agents-test-charmrevisionupdater-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test agents suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-agents-test-charmrevisionupdater-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test agents suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-appdata.yml b/jobs/ci-run/integration/gen/test-appdata.yml index 1deb3fb..617edca 100644 --- a/jobs/ci-run/integration/gen/test-appdata.yml +++ b/jobs/ci-run/integration/gen/test-appdata.yml @@ -39,14 +39,14 @@ - job: name: test-appdata-test-appdata-int-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test appdata suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-appdata-test-appdata-int-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test appdata suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-backup.yml b/jobs/ci-run/integration/gen/test-backup.yml index 59f8515..894ea52 100644 --- a/jobs/ci-run/integration/gen/test-backup.yml +++ b/jobs/ci-run/integration/gen/test-backup.yml @@ -39,14 +39,14 @@ - job: name: test-backup-test-basic-backup-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test backup suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-backup-test-basic-backup-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test backup suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-bootstrap.yml b/jobs/ci-run/integration/gen/test-bootstrap.yml index b7a81ce..5288694 100644 --- a/jobs/ci-run/integration/gen/test-bootstrap.yml +++ b/jobs/ci-run/integration/gen/test-bootstrap.yml @@ -37,14 +37,14 @@ - job: name: test-bootstrap-test-bootstrap-simplestream-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test bootstrap suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-branches.yml b/jobs/ci-run/integration/gen/test-branches.yml index aac0e07..f5f3337 100644 --- a/jobs/ci-run/integration/gen/test-branches.yml +++ b/jobs/ci-run/integration/gen/test-branches.yml @@ -43,14 +43,14 @@ - job: name: test-branches-test-active-branch-output-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_active_branch_output in branches suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-branches-test-active-branch-output-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_active_branch_output in branches suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-branches-test-branch-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_branch in branches suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-branches-test-branch-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_branch in branches suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-caasadmission.yml b/jobs/ci-run/integration/gen/test-caasadmission.yml index b1146cc..a05ebfa 100644 --- a/jobs/ci-run/integration/gen/test-caasadmission.yml +++ b/jobs/ci-run/integration/gen/test-caasadmission.yml @@ -41,14 +41,14 @@ - job: name: test-caasadmission-test-controller-model-admission-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_controller_model_admission in caasadmission suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -109,14 +109,14 @@ - job: name: test-caasadmission-test-model-chicken-and-egg-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_chicken_and_egg in caasadmission suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -177,14 +177,14 @@ - job: name: test-caasadmission-test-new-model-admission-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_new_model_admission in caasadmission suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-charmhub.yml b/jobs/ci-run/integration/gen/test-charmhub.yml index 038ff3f..34fde6f 100644 --- a/jobs/ci-run/integration/gen/test-charmhub.yml +++ b/jobs/ci-run/integration/gen/test-charmhub.yml @@ -47,14 +47,14 @@ - job: name: test-charmhub-test-charmhub-download-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_charmhub_download in charmhub suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -119,14 +119,14 @@ - job: name: test-charmhub-test-charmhub-download-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_charmhub_download in charmhub suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -187,14 +187,14 @@ - job: name: test-charmhub-test-charmhub-find-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_charmhub_find in charmhub suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -259,14 +259,14 @@ - job: name: test-charmhub-test-charmhub-find-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_charmhub_find in charmhub suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -327,14 +327,14 @@ - job: name: test-charmhub-test-charmhub-info-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_charmhub_info in charmhub suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -399,14 +399,14 @@ - job: name: test-charmhub-test-charmhub-info-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_charmhub_info in charmhub suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-cli.yml b/jobs/ci-run/integration/gen/test-cli.yml index 9b86b81..1cb6101 100644 --- a/jobs/ci-run/integration/gen/test-cli.yml +++ b/jobs/ci-run/integration/gen/test-cli.yml @@ -49,14 +49,14 @@ - job: name: test-cli-test-block-commands-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_block_commands in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -117,14 +117,14 @@ - job: name: test-cli-test-display-clouds-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_display_clouds in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -185,14 +185,14 @@ - job: name: test-cli-test-local-charms-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_local_charms in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -253,14 +253,14 @@ - job: name: test-cli-test-model-config-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_config in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -321,14 +321,14 @@ - job: name: test-cli-test-model-constraints-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_constraints in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -389,14 +389,14 @@ - job: name: test-cli-test-model-defaults-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_defaults in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -457,14 +457,14 @@ - job: name: test-cli-test-unregister-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_unregister in cli suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-cloud_azure.yml b/jobs/ci-run/integration/gen/test-cloud_azure.yml index 98b0aaf..e19c9d8 100644 --- a/jobs/ci-run/integration/gen/test-cloud_azure.yml +++ b/jobs/ci-run/integration/gen/test-cloud_azure.yml @@ -37,14 +37,14 @@ - job: name: test-cloud_azure-test-managed-identity-azure - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test cloud_azure suite on azure parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -92,17 +92,23 @@ wrappers: - default-integration-test-wrapper - timeout: - timeout: 30 + timeout: 60 fail: true type: absolute builders: - select-oci-registry - wait-for-cloud-init - prepare-integration-test - - run-integration-test: - test_name: 'cloud_azure' - setup_steps: '' - task_name: '' - skip_tasks: '' + - conditional-step: + condition-kind: regex-match + regex: "^[4-9].*|^3\\.([6-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" + on-evaluation-failure: "dont-run" + steps: + - run-integration-test: + test_name: 'cloud_azure' + setup_steps: '' + task_name: '' + skip_tasks: '' publishers: - integration-artifacts diff --git a/jobs/ci-run/integration/gen/test-cmr.yml b/jobs/ci-run/integration/gen/test-cmr.yml index 4075dc1..d60a906 100644 --- a/jobs/ci-run/integration/gen/test-cmr.yml +++ b/jobs/ci-run/integration/gen/test-cmr.yml @@ -39,14 +39,14 @@ - job: name: test-cmr-test-offer-consume-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test cmr suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-cmr-test-offer-consume-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test cmr suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-constraints.yml b/jobs/ci-run/integration/gen/test-constraints.yml index da1d100..c685182 100644 --- a/jobs/ci-run/integration/gen/test-constraints.yml +++ b/jobs/ci-run/integration/gen/test-constraints.yml @@ -39,14 +39,14 @@ - job: name: test-constraints-test-constraints-common-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test constraints suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-constraints-test-constraints-common-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test constraints suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-controller.yml b/jobs/ci-run/integration/gen/test-controller.yml index 182f92f..c626c9b 100644 --- a/jobs/ci-run/integration/gen/test-controller.yml +++ b/jobs/ci-run/integration/gen/test-controller.yml @@ -51,14 +51,14 @@ - job: name: test-controller-test-enable-ha-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_enable_ha in controller suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -123,14 +123,14 @@ - job: name: test-controller-test-enable-ha-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_enable_ha in controller suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -191,14 +191,14 @@ - job: name: test-controller-test-metrics-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_metrics in controller suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -263,14 +263,14 @@ - job: name: test-controller-test-metrics-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_metrics in controller suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -331,14 +331,14 @@ - job: name: test-controller-test-mongo-memory-profile-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_mongo_memory_profile in controller suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -403,14 +403,14 @@ - job: name: test-controller-test-mongo-memory-profile-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_mongo_memory_profile in controller suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -471,14 +471,14 @@ - job: name: test-controller-test-query-tracing-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_query_tracing in controller suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -535,8 +535,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([2-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -549,14 +549,14 @@ - job: name: test-controller-test-query-tracing-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_query_tracing in controller suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -609,8 +609,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([2-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: diff --git a/jobs/ci-run/integration/gen/test-controllercharm.yml b/jobs/ci-run/integration/gen/test-controllercharm.yml index 95b8283..561957b 100644 --- a/jobs/ci-run/integration/gen/test-controllercharm.yml +++ b/jobs/ci-run/integration/gen/test-controllercharm.yml @@ -39,14 +39,14 @@ - job: name: test-controllercharm-test-prometheus-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test controllercharm suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -99,8 +99,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([3-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: @@ -113,14 +113,14 @@ - job: name: test-controllercharm-test-prometheus-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test controllercharm suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -173,8 +173,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([3-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: diff --git a/jobs/ci-run/integration/gen/test-coslite.yml b/jobs/ci-run/integration/gen/test-coslite.yml index a455d5a..5a99c60 100644 --- a/jobs/ci-run/integration/gen/test-coslite.yml +++ b/jobs/ci-run/integration/gen/test-coslite.yml @@ -37,14 +37,14 @@ - job: name: test-coslite-test-deploy-coslite-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test coslite suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -97,8 +97,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: diff --git a/jobs/ci-run/integration/gen/test-credential.yml b/jobs/ci-run/integration/gen/test-credential.yml index 8670c1b..ba699b6 100644 --- a/jobs/ci-run/integration/gen/test-credential.yml +++ b/jobs/ci-run/integration/gen/test-credential.yml @@ -43,14 +43,14 @@ - job: name: test-credential-test-add-remove-credential-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_add_remove_credential in credential suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-credential-test-add-remove-credential-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_add_remove_credential in credential suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-credential-test-controller-credentials-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_controller_credentials in credential suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-credential-test-controller-credentials-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_controller_credentials in credential suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-dashboard.yml b/jobs/ci-run/integration/gen/test-dashboard.yml index aa23aa6..6306dfe 100644 --- a/jobs/ci-run/integration/gen/test-dashboard.yml +++ b/jobs/ci-run/integration/gen/test-dashboard.yml @@ -39,14 +39,14 @@ - job: name: test-dashboard-test-dashboard-deploy-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test dashboard suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -103,8 +103,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -117,14 +117,14 @@ - job: name: test-dashboard-test-dashboard-deploy-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test dashboard suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -177,8 +177,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: diff --git a/jobs/ci-run/integration/gen/test-deploy.yml b/jobs/ci-run/integration/gen/test-deploy.yml index 64f7f6f..5ba0e7c 100644 --- a/jobs/ci-run/integration/gen/test-deploy.yml +++ b/jobs/ci-run/integration/gen/test-deploy.yml @@ -55,14 +55,14 @@ - job: name: test-deploy-test-cmr-bundles-export-overlay-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_cmr_bundles_export_overlay in deploy suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -127,14 +127,14 @@ - job: name: test-deploy-test-cmr-bundles-export-overlay-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_cmr_bundles_export_overlay in deploy suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -195,14 +195,14 @@ - job: name: test-deploy-test-deploy-bundles-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_deploy_bundles in deploy suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -267,14 +267,14 @@ - job: name: test-deploy-test-deploy-bundles-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_bundles in deploy suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -335,14 +335,14 @@ - job: name: test-deploy-test-deploy-charms-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_deploy_charms in deploy suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -407,14 +407,14 @@ - job: name: test-deploy-test-deploy-charms-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_charms in deploy suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -475,14 +475,14 @@ - job: name: test-deploy-test-deploy-default-series-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_deploy_default_series in deploy suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -547,14 +547,14 @@ - job: name: test-deploy-test-deploy-default-series-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_default_series in deploy suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -615,14 +615,14 @@ - job: name: test-deploy-test-deploy-revision-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_deploy_revision in deploy suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -687,14 +687,14 @@ - job: name: test-deploy-test-deploy-revision-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_revision in deploy suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-deploy_aks.yml b/jobs/ci-run/integration/gen/test-deploy_aks.yml index 7b02c03..4d445a2 100644 --- a/jobs/ci-run/integration/gen/test-deploy_aks.yml +++ b/jobs/ci-run/integration/gen/test-deploy_aks.yml @@ -37,14 +37,14 @@ - job: name: test-deploy_aks-test-deploy-aks-charms-azure - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test deploy_aks suite on azure parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-deploy_caas.yml b/jobs/ci-run/integration/gen/test-deploy_caas.yml index e863321..c4fa0c7 100644 --- a/jobs/ci-run/integration/gen/test-deploy_caas.yml +++ b/jobs/ci-run/integration/gen/test-deploy_caas.yml @@ -37,14 +37,14 @@ - job: name: test-deploy_caas-test-deploy-charm-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test deploy_caas suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-firewall.yml b/jobs/ci-run/integration/gen/test-firewall.yml index ddef831..a2f1bdd 100644 --- a/jobs/ci-run/integration/gen/test-firewall.yml +++ b/jobs/ci-run/integration/gen/test-firewall.yml @@ -41,14 +41,14 @@ - job: name: test-firewall-test-bundle-with-exposed-endpoints-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_bundle_with_exposed_endpoints in firewall suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -113,14 +113,14 @@ - job: name: test-firewall-test-expose-app-ec2-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_expose_app_ec2 in firewall suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -185,14 +185,14 @@ - job: name: test-firewall-test-firewall-ssh-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_firewall_ssh in firewall suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -249,8 +249,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([2-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: diff --git a/jobs/ci-run/integration/gen/test-hooks.yml b/jobs/ci-run/integration/gen/test-hooks.yml index e60c165..cc1143b 100644 --- a/jobs/ci-run/integration/gen/test-hooks.yml +++ b/jobs/ci-run/integration/gen/test-hooks.yml @@ -43,14 +43,14 @@ - job: name: test-hooks-test-dispatching-script-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_dispatching_script in hooks suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-hooks-test-dispatching-script-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_dispatching_script in hooks suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-hooks-test-start-hook-fires-after-reboot-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_start_hook_fires_after_reboot in hooks suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-hooks-test-start-hook-fires-after-reboot-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_start_hook_fires_after_reboot in hooks suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-hooktools.yml b/jobs/ci-run/integration/gen/test-hooktools.yml index 721b33f..315ca3a 100644 --- a/jobs/ci-run/integration/gen/test-hooktools.yml +++ b/jobs/ci-run/integration/gen/test-hooktools.yml @@ -39,14 +39,14 @@ - job: name: test-hooktools-test-state-hook-tools-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test hooktools suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-hooktools-test-state-hook-tools-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test hooktools suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-machine.yml b/jobs/ci-run/integration/gen/test-machine.yml index 27e265b..e027b76 100644 --- a/jobs/ci-run/integration/gen/test-machine.yml +++ b/jobs/ci-run/integration/gen/test-machine.yml @@ -39,14 +39,14 @@ - job: name: test-machine-test-logs-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test machine suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-machine-test-logs-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test machine suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-magma.yml b/jobs/ci-run/integration/gen/test-magma.yml index 252f46a..f376a44 100644 --- a/jobs/ci-run/integration/gen/test-magma.yml +++ b/jobs/ci-run/integration/gen/test-magma.yml @@ -37,14 +37,14 @@ - job: name: test-magma-test-deploy-magma-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test magma suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-manual.yml b/jobs/ci-run/integration/gen/test-manual.yml index 3871505..092cb54 100644 --- a/jobs/ci-run/integration/gen/test-manual.yml +++ b/jobs/ci-run/integration/gen/test-manual.yml @@ -43,14 +43,14 @@ - job: name: test-manual-test-deploy-manual-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_deploy_manual in manual suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-manual-test-deploy-manual-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_manual in manual suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-manual-test-spaces-manual-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_spaces_manual in manual suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-manual-test-spaces-manual-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_spaces_manual in manual suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-model.yml b/jobs/ci-run/integration/gen/test-model.yml index 25f76ce..799583b 100644 --- a/jobs/ci-run/integration/gen/test-model.yml +++ b/jobs/ci-run/integration/gen/test-model.yml @@ -77,14 +77,14 @@ - job: name: test-model-test-model-config-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_config in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -149,14 +149,14 @@ - job: name: test-model-test-model-config-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_config in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -221,14 +221,14 @@ - job: name: test-model-test-model-config-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_config in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -289,14 +289,14 @@ - job: name: test-model-test-model-destroy-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_destroy in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -361,14 +361,14 @@ - job: name: test-model-test-model-destroy-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_destroy in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -433,14 +433,14 @@ - job: name: test-model-test-model-destroy-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_destroy in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -501,14 +501,14 @@ - job: name: test-model-test-model-metrics-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_metrics in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -573,14 +573,14 @@ - job: name: test-model-test-model-metrics-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_metrics in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -645,14 +645,14 @@ - job: name: test-model-test-model-metrics-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_metrics in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -713,14 +713,14 @@ - job: name: test-model-test-model-migration-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -785,14 +785,14 @@ - job: name: test-model-test-model-migration-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -857,14 +857,14 @@ - job: name: test-model-test-model-migration-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_migration in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -925,14 +925,14 @@ - job: name: test-model-test-model-migration-saas-common-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration_saas_common in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -997,14 +997,14 @@ - job: name: test-model-test-model-migration-saas-common-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration_saas_common in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1069,14 +1069,14 @@ - job: name: test-model-test-model-migration-saas-common-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_migration_saas_common in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1137,14 +1137,14 @@ - job: name: test-model-test-model-migration-saas-external-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration_saas_external in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1209,14 +1209,14 @@ - job: name: test-model-test-model-migration-saas-external-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration_saas_external in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1281,14 +1281,14 @@ - job: name: test-model-test-model-migration-saas-external-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_migration_saas_external in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1349,14 +1349,14 @@ - job: name: test-model-test-model-migration-version-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration_version in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1421,14 +1421,14 @@ - job: name: test-model-test-model-migration-version-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_migration_version in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1493,14 +1493,14 @@ - job: name: test-model-test-model-migration-version-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_migration_version in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1561,14 +1561,14 @@ - job: name: test-model-test-model-multi-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_multi in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1633,14 +1633,14 @@ - job: name: test-model-test-model-multi-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_multi in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1705,14 +1705,14 @@ - job: name: test-model-test-model-multi-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_multi in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1773,14 +1773,14 @@ - job: name: test-model-test-model-status-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_status in model suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1845,14 +1845,14 @@ - job: name: test-model-test-model-status-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_model_status in model suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -1917,14 +1917,14 @@ - job: name: test-model-test-model-status-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_model_status in model suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-network.yml b/jobs/ci-run/integration/gen/test-network.yml index e928394..1eaeb53 100644 --- a/jobs/ci-run/integration/gen/test-network.yml +++ b/jobs/ci-run/integration/gen/test-network.yml @@ -43,14 +43,14 @@ - job: name: test-network-test-network-health-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test network suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-network-test-network-health-azure - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test network suite on azure parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -187,14 +187,14 @@ - job: name: test-network-test-network-health-google - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test network suite on google parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -259,14 +259,14 @@ - job: name: test-network-test-network-health-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test network suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-refresh.yml b/jobs/ci-run/integration/gen/test-refresh.yml index df661ec..c0d2e6f 100644 --- a/jobs/ci-run/integration/gen/test-refresh.yml +++ b/jobs/ci-run/integration/gen/test-refresh.yml @@ -43,14 +43,14 @@ - job: name: test-refresh-test-basic-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_basic in refresh suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-refresh-test-basic-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_basic in refresh suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-refresh-test-switch-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_switch in refresh suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-refresh-test-switch-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_switch in refresh suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-relations.yml b/jobs/ci-run/integration/gen/test-relations.yml index 7f0e047..5079d9b 100644 --- a/jobs/ci-run/integration/gen/test-relations.yml +++ b/jobs/ci-run/integration/gen/test-relations.yml @@ -47,14 +47,14 @@ - job: name: test-relations-test-relation-data-exchange-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_relation_data_exchange in relations suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -119,14 +119,14 @@ - job: name: test-relations-test-relation-data-exchange-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_relation_data_exchange in relations suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -187,14 +187,14 @@ - job: name: test-relations-test-relation-departing-unit-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_relation_departing_unit in relations suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -259,14 +259,14 @@ - job: name: test-relations-test-relation-departing-unit-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_relation_departing_unit in relations suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -327,14 +327,14 @@ - job: name: test-relations-test-relation-list-app-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_relation_list_app in relations suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -399,14 +399,14 @@ - job: name: test-relations-test-relation-list-app-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_relation_list_app in relations suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-resources.yml b/jobs/ci-run/integration/gen/test-resources.yml index 3c58433..5e9f532 100644 --- a/jobs/ci-run/integration/gen/test-resources.yml +++ b/jobs/ci-run/integration/gen/test-resources.yml @@ -43,14 +43,14 @@ - job: name: test-resources-test-basic-resources-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_basic_resources in resources suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-resources-test-basic-resources-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_basic_resources in resources suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-resources-test-upgrade-resources-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_upgrade_resources in resources suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-resources-test-upgrade-resources-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_upgrade_resources in resources suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-secrets_iaas.yml b/jobs/ci-run/integration/gen/test-secrets_iaas.yml index 7514404..448adda 100644 --- a/jobs/ci-run/integration/gen/test-secrets_iaas.yml +++ b/jobs/ci-run/integration/gen/test-secrets_iaas.yml @@ -45,14 +45,14 @@ - job: name: test-secrets_iaas-test-secret-drain-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_secret_drain in secrets_iaas suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -105,8 +105,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([2-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -119,14 +119,14 @@ - job: name: test-secrets_iaas-test-secrets-cmr-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_secrets_cmr in secrets_iaas suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -179,8 +179,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -193,14 +193,14 @@ - job: name: test-secrets_iaas-test-secrets-juju-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_secrets_juju in secrets_iaas suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -253,8 +253,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -267,14 +267,14 @@ - job: name: test-secrets_iaas-test-secrets-vault-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_secrets_vault in secrets_iaas suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -327,8 +327,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: @@ -341,14 +341,14 @@ - job: name: test-secrets_iaas-test-user-secret-drain-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_user_secret_drain in secrets_iaas suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -401,8 +401,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([3-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test: diff --git a/jobs/ci-run/integration/gen/test-secrets_k8s.yml b/jobs/ci-run/integration/gen/test-secrets_k8s.yml index 29644eb..cae018e 100644 --- a/jobs/ci-run/integration/gen/test-secrets_k8s.yml +++ b/jobs/ci-run/integration/gen/test-secrets_k8s.yml @@ -43,14 +43,14 @@ - job: name: test-secrets_k8s-test-secret-drain-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_secret_drain in secrets_k8s suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -103,8 +103,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([2-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: @@ -117,14 +117,14 @@ - job: name: test-secrets_k8s-test-secrets-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_secrets in secrets_k8s suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -177,8 +177,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([1-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: @@ -191,14 +191,14 @@ - job: name: test-secrets_k8s-test-user-secret-drain-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_user_secret_drain in secrets_k8s suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -251,8 +251,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([3-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: @@ -265,14 +265,14 @@ - job: name: test-secrets_k8s-test-user-secrets-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_user_secrets in secrets_k8s suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -325,8 +325,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([3-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: diff --git a/jobs/ci-run/integration/gen/test-sidecar.yml b/jobs/ci-run/integration/gen/test-sidecar.yml index 3c2c7e1..bb8d778 100644 --- a/jobs/ci-run/integration/gen/test-sidecar.yml +++ b/jobs/ci-run/integration/gen/test-sidecar.yml @@ -41,14 +41,14 @@ - job: name: test-sidecar-test-deploy-and-force-remove-application-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_and_force_remove_application in sidecar suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -109,14 +109,14 @@ - job: name: test-sidecar-test-deploy-and-remove-application-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy_and_remove_application in sidecar suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -177,14 +177,14 @@ - job: name: test-sidecar-test-pebble-notices-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_pebble_notices in sidecar suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -237,8 +237,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[4-9].*|^3\\.([4-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[4-9].*|^3\\.([4-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: diff --git a/jobs/ci-run/integration/gen/test-smoke.yml b/jobs/ci-run/integration/gen/test-smoke.yml index b227f92..f855bc1 100644 --- a/jobs/ci-run/integration/gen/test-smoke.yml +++ b/jobs/ci-run/integration/gen/test-smoke.yml @@ -43,14 +43,14 @@ - job: name: test-smoke-test-build-aws - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_build in smoke suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -115,14 +115,14 @@ - job: name: test-smoke-test-build-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_build in smoke suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -183,14 +183,14 @@ - job: name: test-smoke-test-deploy-aws - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy in smoke suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -255,14 +255,14 @@ - job: name: test-smoke-test-deploy-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_deploy in smoke suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-smoke_k8s.yml b/jobs/ci-run/integration/gen/test-smoke_k8s.yml index d8089f5..dfd075a 100644 --- a/jobs/ci-run/integration/gen/test-smoke_k8s.yml +++ b/jobs/ci-run/integration/gen/test-smoke_k8s.yml @@ -37,14 +37,14 @@ - job: name: test-smoke_k8s-test-deploy-microk8s - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test smoke_k8s suite on microk8s parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -97,8 +97,8 @@ - prepare-integration-test - conditional-step: condition-kind: regex-match - regex: "^[5-9].*|^4\\.([0-9]|\\d{2,})(\\.|-).*" - label: "${JUJU_VERSION}" + regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*" + label: "${{JUJU_VERSION}}" on-evaluation-failure: "dont-run" steps: - run-integration-test-microk8s: diff --git a/jobs/ci-run/integration/gen/test-spaces_ec2.yml b/jobs/ci-run/integration/gen/test-spaces_ec2.yml index 0267b34..a121efb 100644 --- a/jobs/ci-run/integration/gen/test-spaces_ec2.yml +++ b/jobs/ci-run/integration/gen/test-spaces_ec2.yml @@ -41,14 +41,14 @@ - job: name: test-spaces_ec2-test-juju-bind-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_juju_bind in spaces_ec2 suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -113,14 +113,14 @@ - job: name: test-spaces_ec2-test-machines-in-spaces-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_machines_in_spaces in spaces_ec2 suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -185,14 +185,14 @@ - job: name: test-spaces_ec2-test-upgrade-charm-with-bind-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_upgrade_charm_with_bind in spaces_ec2 suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-storage.yml b/jobs/ci-run/integration/gen/test-storage.yml index 3b02df4..10368b4 100644 --- a/jobs/ci-run/integration/gen/test-storage.yml +++ b/jobs/ci-run/integration/gen/test-storage.yml @@ -39,14 +39,14 @@ - job: name: test-storage-test-charm-storage-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_charm_storage in storage suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-storage-test-persistent-storage-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_persistent_storage in storage suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-unit.yml b/jobs/ci-run/integration/gen/test-unit.yml index 47564d8..88ac200 100644 --- a/jobs/ci-run/integration/gen/test-unit.yml +++ b/jobs/ci-run/integration/gen/test-unit.yml @@ -39,14 +39,14 @@ - job: name: test-unit-test-unit-series-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test unit suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -111,14 +111,14 @@ - job: name: test-unit-test-unit-series-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test unit suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-upgrade.yml b/jobs/ci-run/integration/gen/test-upgrade.yml index 1a623ce..23c3a72 100644 --- a/jobs/ci-run/integration/gen/test-upgrade.yml +++ b/jobs/ci-run/integration/gen/test-upgrade.yml @@ -37,14 +37,14 @@ - job: name: test-upgrade-test-upgrade-simplestream-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test upgrade suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-upgrade_series.yml b/jobs/ci-run/integration/gen/test-upgrade_series.yml index f720163..57b4431 100644 --- a/jobs/ci-run/integration/gen/test-upgrade_series.yml +++ b/jobs/ci-run/integration/gen/test-upgrade_series.yml @@ -37,14 +37,14 @@ - job: name: test-upgrade_series-test-upgrade-series-relation-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test upgrade_series suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/gen/test-user.yml b/jobs/ci-run/integration/gen/test-user.yml index c223f3b..3d5efaf 100644 --- a/jobs/ci-run/integration/gen/test-user.yml +++ b/jobs/ci-run/integration/gen/test-user.yml @@ -47,14 +47,14 @@ - job: name: test-user-test-user-login-password-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_user_login_password in user suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -119,14 +119,14 @@ - job: name: test-user-test-user-login-password-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_user_login_password in user suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -187,14 +187,14 @@ - job: name: test-user-test-user-manage-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_user_manage in user suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -259,14 +259,14 @@ - job: name: test-user-test-user-manage-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_user_manage in user suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -327,14 +327,14 @@ - job: name: test-user-test-user-register-aws - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 description: |- Test test_user_register in user suite on aws parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -399,14 +399,14 @@ - job: name: test-user-test-user-register-lxd - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test test_user_register in user suite on lxd parameters: - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' diff --git a/jobs/ci-run/integration/man/test-kubeflow.yml b/jobs/ci-run/integration/man/test-kubeflow.yml index 64e377a..8379e1b 100644 --- a/jobs/ci-run/integration/man/test-kubeflow.yml +++ b/jobs/ci-run/integration/man/test-kubeflow.yml @@ -1,6 +1,6 @@ - job: name: test-kubeflow - node: ephemeral-focal-8c-32g-amd64 + node: ephemeral-noble-8c-32g-amd64 description: |- Test kubeflow suite on microk8s condition: SUCCESSFUL @@ -9,7 +9,7 @@ - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{7}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -64,8 +64,8 @@ channel: "1.22/stable" - install-charmcraft - get-s3-build-payload-testing: - SHORT_GIT_COMMIT: "${SHORT_GIT_COMMIT}" - platform: "linux/${BUILD_ARCH}" + SHORT_GIT_COMMIT: "${{SHORT_GIT_COMMIT}}" + platform: "linux/${{BUILD_ARCH}}" - integration-test-runner: test_name: "kubeflow" task_name: "" diff --git a/jobs/ci-run/scripts/ensure-aws-credentials.sh b/jobs/ci-run/scripts/ensure-aws-credentials.sh new file mode 100644 index 0000000..b65aaf1 --- /dev/null +++ b/jobs/ci-run/scripts/ensure-aws-credentials.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -eux + +juju_data="$HOME/.local/share/juju" +mkdir -p "$juju_data" +sudo cp -R "$JUJU_DATA/credentials.yaml" "$juju_data" +sudo chown -R "$USER" "$juju_data" + +REGION="${REGION:-us-east-1}" + +mkdir -p "$HOME"/.aws +echo "[default]" > "$HOME"/.aws/credentials +cat "$juju_data/credentials.yaml" |\ + grep aws: -A 4 | grep key: |\ + tail -2 |\ + sed -e 's/ access-key:/aws_access_key_id =/' \ + -e 's/ secret-key:/aws_secret_access_key =/' \ + >> "$HOME"/.aws/credentials +echo -e "[default]\nregion = ${REGION}" > "$HOME"/.aws/config +chmod 600 ~/.aws/* \ No newline at end of file diff --git a/jobs/ci-run/scripts/generate-agent-json.sh b/jobs/ci-run/scripts/generate-agent-json.template.sh similarity index 100% rename from jobs/ci-run/scripts/generate-agent-json.sh rename to jobs/ci-run/scripts/generate-agent-json.template.sh diff --git a/jobs/ci-run/scripts/host-command.sh b/jobs/ci-run/scripts/host-command.template.sh similarity index 100% rename from jobs/ci-run/scripts/host-command.sh rename to jobs/ci-run/scripts/host-command.template.sh diff --git a/jobs/ci-run/scripts/lxd-runner.sh b/jobs/ci-run/scripts/lxd-runner.sh deleted file mode 100644 index abfef45..0000000 --- a/jobs/ci-run/scripts/lxd-runner.sh +++ /dev/null @@ -1,282 +0,0 @@ -#!/bin/bash -set -ex - -CONTAINER_NAME="ci-build-${{SHORT_GIT_COMMIT}}-${{JOB_NAME}}" -CONTAINER_NAME=$(echo "$CONTAINER_NAME" | tr '[:upper:]' '[:lower:]') -if [ "$CONTAINER_NAME" != "${{CONTAINER_NAME:0:63}}" ]; then - echo "$CONTAINER_NAME is too long for lxd" - CONTAINER_NAME_SHA=$(echo "$CONTAINER_NAME" | sha1sum) - CONTAINER_NAME="${{CONTAINER_NAME:0:58}}-${{CONTAINER_NAME_SHA:0:4}}" -fi -echo "LXD container name is $CONTAINER_NAME" - -build_dir=${{WORKSPACE}}/_build -lxd_env_file_path=/home/ubuntu/juju_lxd_env - -# For legacy compatibility, set env variable for series if not already set -if [ -z "$JUJU_UNITTEST_SERIES" ]; then - export JUJU_UNITTEST_SERIES=jammy -fi - -function cleanup {{ - # Need to pull files over at cleanup due to test failures ending the script early. - # Try a couple of times to delete the container as we sometimes have zfs - # issues where the dataset is busy. - - # Attempt to grab the workspace artifacts before deleting the container. - mkdir -p ${{WORKSPACE}}/artifacts - lxc file pull ${{CONTAINER_NAME}}/home/ubuntu/artifacts/output.tar.gz ${{WORKSPACE}}/artifacts/output.tar.gz || true - - attempt_lxd_cleanup - - sudo rm -fr ${{build_dir}} || true -}} - -trap cleanup EXIT - -function attempt_lxd_cleanup {{ - set +e - # Delete any containers of the same name. This can happen if you're - # re-running the same job. - attempts=0 - while [ ${{attempts}} -lt 3 ]; do - output=$(lxc delete --force ${{CONTAINER_NAME}} 2>&1) - if [ $? -eq 0 ] || [[ $output == *(Error|"not found")* ]]; then - break - fi - attempts=$((attempts+1)) - sleep 10 - done - set -e -}} - -attempt_lxd_cleanup - -# force the container to be privileged. -output=$(lxc profile list | grep "privileged") || true -if [[ -z $output ]] ; then - cat << EOF > /tmp/profile.yaml -config: - security.privileged: "true" - security.nesting: "true" -EOF - lxc profile create privileged - lxc profile edit privileged < /tmp/profile.yaml -fi - -output=$(lxc profile list | grep "microk8s") || true -if [[ -z $output ]] ; then - echo "making microk8s profile" - cat << EOF > /tmp/microk8s-profile.yaml -name: microk8s -config: - boot.autostart: "true" - linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter - raw.lxc: | - lxc.apparmor.profile=unconfined - lxc.mount.auto=proc:rw sys:rw cgroup:rw - lxc.cgroup.devices.allow=a - lxc.cap.drop= - security.nesting: "true" - security.privileged: "true" -description: "" -devices: - aadisable: - path: /sys/module/nf_conntrack/parameters/hashsize - source: /sys/module/nf_conntrack/parameters/hashsize - type: disk - aadisable1: - path: /sys/module/apparmor/parameters/enabled - source: /dev/null - type: disk - aadisable2: - path: /dev/kmsg - source: /dev/kmsg - type: disk -EOF - lxc profile create microk8s - lxc profile edit microk8s < /tmp/microk8s-profile.yaml -fi - -echo "Using lxd profile privileged" -profile="privileged" - -# Check to see if this node has a proxy profile. -PROXY_PROFILE="" -if lxc profile show proxy; then - PROXY_PROFILE="-p proxy" -fi - -lxc init ${{JUJU_UNITTEST_IMAGE}}:${{JUJU_UNITTEST_SERIES}} ${{CONTAINER_NAME}} -p default -p ${{profile}} ${{PROXY_PROFILE}} -lxc config set ${{CONTAINER_NAME}} limits.cpu.allowance 90% - -if [ ! -z "${{http_proxy}}" ]; then - ENV_FILE=$(mktemp) - lxc file pull ${{CONTAINER_NAME}}/etc/environment $ENV_FILE - echo "http_proxy=$http_proxy" >> $ENV_FILE - echo "https_proxy=$http_proxy" >> $ENV_FILE - echo "ftp_proxy=$http_proxy" >> $ENV_FILE - lxc file push $ENV_FILE ${{CONTAINER_NAME}}/etc/environment - - SYSTEMD_CONF_FILE=$(mktemp) - lxc file pull ${{CONTAINER_NAME}}/etc/systemd/system.conf $SYSTEMD_CONF_FILE - echo "DefaultEnvironment=http_proxy=$http_proxy https_proxy=$http_proxy ftp_proxy=$http_proxy" >> $SYSTEMD_CONF_FILE - lxc file push $SYSTEMD_CONF_FILE ${{CONTAINER_NAME}}/etc/systemd/system.conf -fi - -lxc start ${{CONTAINER_NAME}} - -mkdir ${{build_dir}} -stash_dir=${{WORKSPACE}}/_stash -mkdir ${{stash_dir}} -if [ -n "${{JUJU_SRC_TARBALL}}" ]; then - tar xf ${{JUJU_SRC_TARBALL}} -C ${{build_dir}} -fi -sudo chmod 777 ${{build_dir}} -sudo chmod -R go+w ${{build_dir}} - -sudo chmod 777 ${{stash_dir}} -sudo chmod -R go+w ${{stash_dir}} - -lxc exec $CONTAINER_NAME -- mkdir /workspace - -lxc config device add $CONTAINER_NAME workspace disk path=/workspace source=${{WORKSPACE}} -if [ -d "${{JUJU_DATA}}" ]; then - lxc config device add $CONTAINER_NAME cloud-city disk path=/var/lib/jenkins/cloud-city source=${{JUJU_DATA}} -fi - -# print container's config for debugging purposes. -lxc config show ${{CONTAINER_NAME}} - -lxdbr0_addr=$(ip -j address show lxdbr0 | jq -r 'first(.[].addr_info[] | select(.family == "inet") | .local)') -echo "LXD bridge address is $lxdbr0_addr" - -lxc exec ${{CONTAINER_NAME}} -- bash <> /home/ubuntu/.profile -EOT - -# Potentially setup proxy stuff for snapd -if [ ! -z "${{http_proxy}}" ]; then -echo "Setting up proxy details for snapd." - -lxc exec ${{CONTAINER_NAME}} -- bash < /etc/systemd/system/snapd.service.d/snap_layer_proxy.conf <<-EOL -[Service] -Environment=http_proxy=$http_proxy -Environment=https_proxy=$http_proxy -EOL - systemctl daemon-reload - systemctl restart snapd - echo "export http_proxy=$http_proxy" >> /home/ubuntu/.profile - echo "export https_proxy=$http_proxy" >> /home/ubuntu/.profile - echo "export ftp_proxy=$http_proxy" >> /home/ubuntu/.profile -EOT -fi - -# TODO - snap store proxy on kabuto is broken so for now, we'll ignore it -#if [ ! -z "${{SNAP_STORE_PROXY}}" ] && [ ! -z "${{SNAP_STORE_ID}}" ]; then -#echo "Configuring snapd inside the lxd container to use snap-store-proxy." -# -#lxc exec ${{CONTAINER_NAME}} -- bash < 3 || jujuVersionExploded[1].indexOf("-") != -1) { + jujuVersionExploded.pop() +} +jujuVersion = jujuVersionExploded.join(".") + +println "Looking for $jujuVersion in previous builds..." + +def b = build.getPreviousBuild() +while (b != null) { + if (b.result != Result.SUCCESS || b.getDescription() == null || b.getDescription().indexOf(jujuVersion) == -1) { + b = b.getPreviousBuild() + continue + } + if (b.getStartTimeInMillis()+(24*60*60*1000)>build.getStartTimeInMillis()) { + println "Found previous build less than a day ago ${b.getAbsoluteUrl()}" + throw new InterruptedException() + } + break +} + +println "It has been one day since last build... triggering job" \ No newline at end of file diff --git a/jobs/ci-run/scripts/package-juju-source.sh b/jobs/ci-run/scripts/package-juju-source.sh new file mode 100644 index 0000000..7d23e58 --- /dev/null +++ b/jobs/ci-run/scripts/package-juju-source.sh @@ -0,0 +1,100 @@ +#!/bin/bash +set -xe + +if [ -z "$GITHUB_BRANCH_NAME" ] && [ -z "$GITHUB_BRANCH_HEAD_SHA" ]; then + echo "Must specify one of GITHUB_BRANCH_NAME or GITHUB_BRANCH_HEAD_SHA" + exit 1 +fi + +if [ -z "$JUJU_SOURCE_CHECKOUT" ]; then + echo "Must specify JUJU_SOURCE_CHECKOUT" + exit 1 +fi + +export PATH="/snap/bin:$PATH" +sudo snap refresh go --channel=1.21/stable || sudo snap install go --channel=1.21/stable --classic + +# TODO - fix this workaround +# As we clone the full history (can't shallow clone otherwise queued jobs miss +# out when only the most recent commit is pulled). +# To limit the sizes of the tarballs moved around (and no need to have full +# history for a build) +# We do a 2 part clone, the initial clone done by the job, then reduce that to +# depth=1 +export GOPATH=${WORKSPACE}/build +full_path=${GOPATH}/src/github.com/juju/juju + +export PATH=/snap/bin:$PATH:$GOPATH/bin + +# If run with an overriding SHORT_GIT_COMMIT we need to +# determine the branch name ourselves. +if [ -z ${GITHUB_BRANCH_NAME} ]; then + GITHUB_BRANCH_NAME=$(git -C ${JUJU_SOURCE_CHECKOUT} branch --all \ + --contains ${GITHUB_BRANCH_HEAD_SHA} \ + --column \ + | awk '{print$NF}' \ + | awk -F/ '{print$NF}') +fi +rm -rf ${full_path} +git clone --depth 1 file://${JUJU_SOURCE_CHECKOUT} ${full_path} +rm -fr ${JUJU_SOURCE_CHECKOUT} + +# TODO - remove vendor mode for go mod +# It currently is needed for s390x builds since the s390x slave +# is on a restricted network. +echo "Resolving dependencies" +export JUJU_MAKE_DEP=true +export JUJU_GOMOD_MODE=vendor +make -C ${full_path} godeps || make -C ${full_path} dep || make -C ${full_path} vendor-dependencies + +echo "Removing non-free data." +rm -rf ${GOPATH}/src/github.com/rogpeppe/godeps +rm -rf ${GOPATH}/src/github.com/golang/dep +rm -rf ${GOPATH}/src/github.com/kisielk +rm -rf ${GOPATH}/src/code.google.com/p/go.net/html/charset/testdata/ +rm -f ${GOPATH}/src/code.google.com/p/go.net/html/charset/*test.go +rm -rf ${GOPATH}/src/golang.org/x/net/html/charset/testdata/ +rm -f ${GOPATH}/src/golang.org/x/net/html/charset/*test.go +rm -rf ${GOPATH}/src/github.com/prometheus/procfs/fixtures + +# Remove backup files that confuse lintian. +echo "Removing backup files" +find ${GOPATH}/src/ -type f -name *.go.orig -delete + +echo "Attempting to apply patches" +(cd ${full_path} && GOPATH=${GOPATH} make add-patches || true) + +echo "Removing binaries and build artifacts" +if [[ -d ${GOPATH}/bin ]]; then + rm -r ${GOPATH}/bin +fi +if [[ -d ${GOPATH}/pkg ]]; then + # go mod prevents writes + chmod +w -R ${GOPATH}/pkg + rm -r ${GOPATH}/pkg +fi + +PROPS_PATH=${WORKSPACE}/build.properties +# Need to prepare some variables used through out the process +JUJU_VERSION=$(sed -n 's/^const version = "\(.*\)"/\1/p' ${full_path}/version/version.go) +if [[ -n ${JUJU_BUILD_NUMBER:-} ]]; then + JUJU_VERSION="${JUJU_VERSION}.${JUJU_BUILD_NUMBER}" +fi + +# GIT_COMMIT is used by juju Makefile for version info. +GIT_COMMIT=$(git -C ${full_path} rev-parse HEAD) +SHORT_GIT_COMMIT=${GIT_COMMIT:0:7} +echo "SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT}" >> $PROPS_PATH +echo "GIT_COMMIT=${GIT_COMMIT}" >> $PROPS_PATH +echo "GOVERSION=${GOVERSION}" >> $PROPS_PATH +echo "JUJU_BUILD_NUMBER=${JUJU_BUILD_NUMBER}" >> $PROPS_PATH +echo "JUJU_VERSION=${JUJU_VERSION}" >> $PROPS_PATH +echo "JUJU_GOMOD_MODE=${JUJU_GOMOD_MODE}" >> $PROPS_PATH +echo "JUJU_SRC_TARBALL=juju-source-${JUJU_VERSION}-${SHORT_GIT_COMMIT}.tar.xz" >> $PROPS_PATH +echo "JUJU_VERSION_MAJOR_MINOR=$(echo ${JUJU_VERSION} | cut -d'-' -f 1 | cut -d'.' -f 1,2)" >> $PROPS_PATH + +source ${WORKSPACE}/build.properties + +tar cfJ ${JUJU_SRC_TARBALL} \ + --exclude .git --exclude .bzr --exclude .hg \ + -C ${GOPATH} ./ \ No newline at end of file diff --git a/jobs/ci-run/scripts/resolve-git-sha.sh b/jobs/ci-run/scripts/resolve-git-sha.sh new file mode 100644 index 0000000..c4e127c --- /dev/null +++ b/jobs/ci-run/scripts/resolve-git-sha.sh @@ -0,0 +1,99 @@ +#!/bin/bash +set -xe + +echo "GITHUB_BRANCH_NAME=$GITHUB_BRANCH_NAME" +echo "GITHUB_BRANCH_HEAD_SHA=$GITHUB_BRANCH_HEAD_SHA" +echo "GIT_COMMIT=$GIT_COMMIT" +echo "SHORT_GIT_COMMIT=$SHORT_GIT_COMMIT" + +TMP_CLONE=$(mktemp -d -u) + +function cleanup { + rm -Rf "$TMP_CLONE" +} + +trap cleanup EXIT + +function query_github_simple { + curl -s "https://api.github.com/repos/juju/juju/commits/$1" | jq -r ".sha // empty" +} + +function query_github_treeish { + curl -s "https://api.github.com/repos/juju/juju/git/trees/$1" | jq -r ".sha // empty" +} + +function search_github_hash { + curl -s -H "Accept: application/vnd.github.cloak-preview+json" "https://api.github.com/search/commits?q=repo:juju/juju+hash:$1" | jq -r ".items[0].sha // empty" +} + +function clone_search { + if [ ! -d "$TMP_CLONE" ]; then + git clone -q --no-checkout "https://github.com/juju/juju.git" "$TMP_CLONE" + fi + git -C "$TMP_CLONE" rev-parse "$1" +} + +function select_git_sha { + MODE="$1" + ARG_SEARCH="$2" + ARG_LAST_COMMIT="$3" + if [ -z "$ARG_SEARCH" ]; then + # skip if we don't have a search term. + echo "$ARG_LAST_COMMIT" + return + fi + if [ -n "$ARG_LAST_COMMIT" ]; then + # skip if we already found a full commit. + echo "$ARG_LAST_COMMIT" + return + fi + case $MODE in + api-simple) + # use higher level commit api + SHA=$(query_github_simple $ARG_SEARCH) + ;; + api-treeish) + # use git database tree api + SHA=$(query_github_treeish $ARG_SEARCH) + ;; + api-short-commit) + # use github search api if tree api fails. + SHA=$(search_github_hash $ARG_SEARCH) + ;; + full-clone) + # slow path if Github api fails, full clone + SHA=$(clone_search $ARG_SEARCH) + ;; + esac + echo "$SHA" +} + +EXACT_COMMIT= + +# Try GIT_COMMIT +EXACT_COMMIT=$(select_git_sha "api-simple" "$GIT_COMMIT" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "api-treeish" "$GIT_COMMIT" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "full-clone" "$GIT_COMMIT" "$EXACT_COMMIT") + +# Try SHORT_GIT_COMMIT +EXACT_COMMIT=$(select_git_sha "api-simple" "$SHORT_GIT_COMMIT" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "api-short-commit" "$SHORT_GIT_COMMIT" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "full-clone" "$SHORT_GIT_COMMIT" "$EXACT_COMMIT") + +# Try GITHUB_BRANCH_HEAD_SHA +EXACT_COMMIT=$(select_git_sha "api-simple" "$GITHUB_BRANCH_HEAD_SHA" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "api-treeish" "$GITHUB_BRANCH_HEAD_SHA" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "full-clone" "$GITHUB_BRANCH_HEAD_SHA" "$EXACT_COMMIT") + +# Try GITHUB_BRANCH_NAME +EXACT_COMMIT=$(select_git_sha "api-simple" "$GITHUB_BRANCH_NAME" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "api-treeish" "$GITHUB_BRANCH_NAME" "$EXACT_COMMIT") +EXACT_COMMIT=$(select_git_sha "full-clone" "$GITHUB_BRANCH_NAME" "$EXACT_COMMIT") + +PROPS_PATH=${WORKSPACE}/build.properties +echo "SHORT_GIT_COMMIT=${EXACT_COMMIT:0:7}" > $PROPS_PATH +echo "GIT_COMMIT=${EXACT_COMMIT}" >> $PROPS_PATH +echo "GITHUB_BRANCH_HEAD_SHA=${EXACT_COMMIT}" >> $PROPS_PATH +echo "GITHUB_BRANCH_NAME=${GITHUB_BRANCH_NAME}" >> $PROPS_PATH + +cat $PROPS_PATH \ No newline at end of file diff --git a/jobs/ci-run/scripts/snippet_make-release-build.sh b/jobs/ci-run/scripts/snippet_make-release-build.sh index b7eddfc..f10c812 100644 --- a/jobs/ci-run/scripts/snippet_make-release-build.sh +++ b/jobs/ci-run/scripts/snippet_make-release-build.sh @@ -2,13 +2,13 @@ set -eux -echo GIT_COMMIT=${{GIT_COMMIT}} -echo JUJU_GOMOD_MODE=${{JUJU_GOMOD_MODE}} -echo CLIENT_PACKAGE_PLATFORMS=${{CLIENT_PACKAGE_PLATFORMS}} -echo AGENT_PACKAGE_PLATFORMS=${{AGENT_PACKAGE_PLATFORMS}} -echo BUILD_TAGS=${{BUILD_TAGS:-}} +echo GIT_COMMIT=${GIT_COMMIT} +echo JUJU_GOMOD_MODE=${JUJU_GOMOD_MODE} +echo CLIENT_PACKAGE_PLATFORMS=${CLIENT_PACKAGE_PLATFORMS} +echo AGENT_PACKAGE_PLATFORMS=${AGENT_PACKAGE_PLATFORMS} +echo BUILD_TAGS=${BUILD_TAGS:-} -cd ${{JUJU_SRC_PATH}} +cd ${JUJU_SRC_PATH} # Feature detection for cgo. We should really have a better way to do this. # Note: we can't detect CGO in the Makefile, as we've got references to cgo @@ -17,7 +17,7 @@ build_type=$(grep "go-agent-build-no-cgo" Makefile >/dev/null && echo "cgo" || e if [ $build_type = "cgo" ]; then GOOS=$(echo $AGENT_PACKAGE_PLATFORMS | cut -d/ -f 1) \ GOARCH=$(echo $AGENT_PACKAGE_PLATFORMS | cut -d/ -f 2 | sed "s/ppc64el/ppc64le/") \ - make -j`nproc` go-build BUILD_TAGS="${{BUILD_TAGS:-}}" + make -j`nproc` go-build BUILD_TAGS="${BUILD_TAGS:-}" else - make -j`nproc` go-build BUILD_TAGS="${{BUILD_TAGS:-}}" + make -j`nproc` go-build BUILD_TAGS="${BUILD_TAGS:-}" fi diff --git a/jobs/ci-run/scripts/snippet_run-unit-tests.sh b/jobs/ci-run/scripts/snippet_run-unit-tests.template.sh similarity index 100% rename from jobs/ci-run/scripts/snippet_run-unit-tests.sh rename to jobs/ci-run/scripts/snippet_run-unit-tests.template.sh diff --git a/jobs/ci-run/unittest/unittests.yml b/jobs/ci-run/unittest/unittests.yml index 398a83d..ab99132 100644 --- a/jobs/ci-run/unittest/unittests.yml +++ b/jobs/ci-run/unittest/unittests.yml @@ -48,17 +48,6 @@ # current-parameters: true # current-parameters: true - -- builder: - # Takes parameter: GOTEST_TYPE. 'race' for go test race, 'xunit-report' for - # make test w/ verbose and generating an xml report and anything else for - # straight 'make test' - name: 'run-unit-tests-lxd' - builders: - - lxd-src-command: - src_command: - !include-raw: ../scripts/snippet_run-unit-tests.sh - - builder: # Takes parameter: GOTEST_TYPE. 'race' for go test race, 'xunit-report' for # make test w/ verbose and generating an xml report and anything else for @@ -67,12 +56,12 @@ builders: - host-src-command: src_command: - !include-raw: ../scripts/snippet_run-unit-tests.sh + !include-raw-expand: ../scripts/snippet_run-unit-tests.template.sh - job: name: unit-tests-amd64 - node: ephemeral-focal-16c-64g-amd64 + node: ephemeral-noble-16c-64g-amd64 description: |- Build and run unit tests for amd64. wrappers: @@ -110,12 +99,12 @@ modules: github.com/tebeka/go2xunit@latest - get-s3-source-payload - description-setter: - description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}} ${{SHORT_GIT_COMMIT}}" # Need to populate with which arch we're building for. - run-unit-tests-host: GOTEST_TYPE: "xunit-report" - TEST_TIMEOUT: "${TEST_TIMEOUT}" - USE_TMPFS_FOR_MGO: "${USE_TMPFS_FOR_MGO}" + TEST_TIMEOUT: "${{TEST_TIMEOUT}}" + USE_TMPFS_FOR_MGO: "${{USE_TMPFS_FOR_MGO}}" FUZZ_CHECK: 1 publishers: - junit: @@ -124,7 +113,7 @@ - job: name: 'unit-tests-arm64' - node: ephemeral-focal-16c-64g-arm64 + node: ephemeral-noble-16c-64g-arm64 description: |- Build and run unit tests for arm64. wrappers: @@ -162,12 +151,12 @@ modules: github.com/tebeka/go2xunit@latest - get-s3-source-payload - description-setter: - description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}} ${{SHORT_GIT_COMMIT}}" # Need to populate with which arch we're building for. - run-unit-tests-host: GOTEST_TYPE: "xunit-report" - TEST_TIMEOUT: "${TEST_TIMEOUT}" - USE_TMPFS_FOR_MGO: "${USE_TMPFS_FOR_MGO}" + TEST_TIMEOUT: "${{TEST_TIMEOUT}}" + USE_TMPFS_FOR_MGO: "${{USE_TMPFS_FOR_MGO}}" FUZZ_CHECK: 0 publishers: - junit: @@ -210,12 +199,12 @@ modules: github.com/tebeka/go2xunit@latest - get-s3-source-payload - description-setter: - description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}} ${{SHORT_GIT_COMMIT}}" # Need to populate with which arch we're building for. - run-unit-tests-host: GOTEST_TYPE: "xunit-report" - TEST_TIMEOUT: "${TEST_TIMEOUT}" - USE_TMPFS_FOR_MGO: "${USE_TMPFS_FOR_MGO}" + TEST_TIMEOUT: "${{TEST_TIMEOUT}}" + USE_TMPFS_FOR_MGO: "${{USE_TMPFS_FOR_MGO}}" FUZZ_CHECK: 0 publishers: - junit: @@ -262,12 +251,12 @@ modules: github.com/tebeka/go2xunit@latest - get-s3-source-payload - description-setter: - description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}} ${{SHORT_GIT_COMMIT}}" # Need to populate with which arch we're building for. - run-unit-tests-host: GOTEST_TYPE: "xunit-report" - TEST_TIMEOUT: "${TEST_TIMEOUT}" - USE_TMPFS_FOR_MGO: "${USE_TMPFS_FOR_MGO}" + TEST_TIMEOUT: "${{TEST_TIMEOUT}}" + USE_TMPFS_FOR_MGO: "${{USE_TMPFS_FOR_MGO}}" FUZZ_CHECK: 0 publishers: - junit: @@ -277,7 +266,7 @@ - job: name: 'unit-tests-race-amd64' - node: ephemeral-focal-16c-64g-amd64 + node: ephemeral-noble-16c-64g-amd64 description: |- Build and run unit race tests for amd64. wrappers: @@ -315,12 +304,12 @@ modules: github.com/tebeka/go2xunit@latest - get-s3-source-payload - description-setter: - description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}} ${{SHORT_GIT_COMMIT}}" # Need to populate with which arch we're building for. - run-unit-tests-host: GOTEST_TYPE: "race" - TEST_TIMEOUT: "${TEST_TIMEOUT}" - USE_TMPFS_FOR_MGO: "${USE_TMPFS_FOR_MGO}" + TEST_TIMEOUT: "${{TEST_TIMEOUT}}" + USE_TMPFS_FOR_MGO: "${{USE_TMPFS_FOR_MGO}}" FUZZ_CHECK: 0 publishers: - junit: @@ -329,7 +318,7 @@ - job: name: 'unit-tests-race-arm64' - node: ephemeral-focal-16c-64g-arm64 + node: ephemeral-noble-16c-64g-arm64 description: |- Build and run unit race tests for arm64. wrappers: @@ -367,12 +356,12 @@ modules: github.com/tebeka/go2xunit@latest - get-s3-source-payload - description-setter: - description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}} ${{SHORT_GIT_COMMIT}}" # Need to populate with which arch we're building for. - run-unit-tests-host: GOTEST_TYPE: "race" - TEST_TIMEOUT: "${TEST_TIMEOUT}" - USE_TMPFS_FOR_MGO: "${USE_TMPFS_FOR_MGO}" + TEST_TIMEOUT: "${{TEST_TIMEOUT}}" + USE_TMPFS_FOR_MGO: "${{USE_TMPFS_FOR_MGO}}" FUZZ_CHECK: 0 publishers: - junit: diff --git a/jobs/ci-run/utils.yml b/jobs/ci-run/utils.yml index 493ce87..f152351 100644 --- a/jobs/ci-run/utils.yml +++ b/jobs/ci-run/utils.yml @@ -3,221 +3,22 @@ - builder: name: 'resolve-git-sha' builders: - - shell: |- - #!/bin/bash - set -xe - - echo "GITHUB_BRANCH_NAME=$GITHUB_BRANCH_NAME" - echo "GITHUB_BRANCH_HEAD_SHA=$GITHUB_BRANCH_HEAD_SHA" - echo "GIT_COMMIT=$GIT_COMMIT" - echo "SHORT_GIT_COMMIT=$SHORT_GIT_COMMIT" - - TMP_CLONE=$(mktemp -d -u) - - function cleanup { - rm -Rf "$TMP_CLONE" - } - - trap cleanup EXIT - - function query_github_simple { - curl -s "https://api.github.com/repos/juju/juju/commits/$1" | jq -r ".sha // empty" - } - - function query_github_treeish { - curl -s "https://api.github.com/repos/juju/juju/git/trees/$1" | jq -r ".sha // empty" - } - - function search_github_hash { - curl -s -H "Accept: application/vnd.github.cloak-preview+json" "https://api.github.com/search/commits?q=repo:juju/juju+hash:$1" | jq -r ".items[0].sha // empty" - } - - function clone_search { - if [ ! -d "$TMP_CLONE" ]; then - git clone -q --no-checkout "https://github.com/juju/juju.git" "$TMP_CLONE" - fi - git -C "$TMP_CLONE" rev-parse "$1" - } - - function select_git_sha { - MODE="$1" - ARG_SEARCH="$2" - ARG_LAST_COMMIT="$3" - if [ -z "$ARG_SEARCH" ]; then - # skip if we don't have a search term. - echo "$ARG_LAST_COMMIT" - return - fi - if [ -n "$ARG_LAST_COMMIT" ]; then - # skip if we already found a full commit. - echo "$ARG_LAST_COMMIT" - return - fi - case $MODE in - api-simple) - # use higher level commit api - SHA=$(query_github_simple $ARG_SEARCH) - ;; - api-treeish) - # use git database tree api - SHA=$(query_github_treeish $ARG_SEARCH) - ;; - api-short-commit) - # use github search api if tree api fails. - SHA=$(search_github_hash $ARG_SEARCH) - ;; - full-clone) - # slow path if Github api fails, full clone - SHA=$(clone_search $ARG_SEARCH) - ;; - esac - echo "$SHA" - } - - EXACT_COMMIT= - - # Try GIT_COMMIT - EXACT_COMMIT=$(select_git_sha "api-simple" "$GIT_COMMIT" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "api-treeish" "$GIT_COMMIT" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "full-clone" "$GIT_COMMIT" "$EXACT_COMMIT") - - # Try SHORT_GIT_COMMIT - EXACT_COMMIT=$(select_git_sha "api-simple" "$SHORT_GIT_COMMIT" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "api-short-commit" "$SHORT_GIT_COMMIT" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "full-clone" "$SHORT_GIT_COMMIT" "$EXACT_COMMIT") - - # Try GITHUB_BRANCH_HEAD_SHA - EXACT_COMMIT=$(select_git_sha "api-simple" "$GITHUB_BRANCH_HEAD_SHA" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "api-treeish" "$GITHUB_BRANCH_HEAD_SHA" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "full-clone" "$GITHUB_BRANCH_HEAD_SHA" "$EXACT_COMMIT") - - # Try GITHUB_BRANCH_NAME - EXACT_COMMIT=$(select_git_sha "api-simple" "$GITHUB_BRANCH_NAME" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "api-treeish" "$GITHUB_BRANCH_NAME" "$EXACT_COMMIT") - EXACT_COMMIT=$(select_git_sha "full-clone" "$GITHUB_BRANCH_NAME" "$EXACT_COMMIT") - - PROPS_PATH=${WORKSPACE}/build.properties - echo "SHORT_GIT_COMMIT=${EXACT_COMMIT:0:7}" > $PROPS_PATH - echo "GIT_COMMIT=${EXACT_COMMIT}" >> $PROPS_PATH - echo "GITHUB_BRANCH_HEAD_SHA=${EXACT_COMMIT}" >> $PROPS_PATH - echo "GITHUB_BRANCH_NAME=${GITHUB_BRANCH_NAME}" >> $PROPS_PATH - - cat $PROPS_PATH + - shell: !include-raw-verbatim: "scripts/resolve-git-sha.sh" - inject: - properties-file: ${WORKSPACE}/build.properties + properties-file: ${{WORKSPACE}}/build.properties - builder: name: 'package-juju-source' builders: - - shell: |- - #!/bin/bash - set -xe - - if [ -z "$GITHUB_BRANCH_NAME" ] && [ -z "$GITHUB_BRANCH_HEAD_SHA" ]; then - echo "Must specify one of GITHUB_BRANCH_NAME or GITHUB_BRANCH_HEAD_SHA" - exit 1 - fi - - if [ -z "$JUJU_SOURCE_CHECKOUT" ]; then - echo "Must specify JUJU_SOURCE_CHECKOUT" - exit 1 - fi - - export PATH="/snap/bin:$PATH" - sudo snap refresh go --channel=1.21/stable || sudo snap install go --channel=1.21/stable --classic - - # TODO - fix this workaround - # As we clone the full history (can't shallow clone otherwise queued jobs miss - # out when only the most recent commit is pulled). - # To limit the sizes of the tarballs moved around (and no need to have full - # history for a build) - # We do a 2 part clone, the initial clone done by the job, then reduce that to - # depth=1 - export GOPATH=${WORKSPACE}/build - full_path=${GOPATH}/src/github.com/juju/juju - - export PATH=/snap/bin:$PATH:$GOPATH/bin - - # If run with an overriding SHORT_GIT_COMMIT we need to - # determine the branch name ourselves. - if [ -z ${GITHUB_BRANCH_NAME} ]; then - GITHUB_BRANCH_NAME=$(git -C ${JUJU_SOURCE_CHECKOUT} branch --all \ - --contains ${GITHUB_BRANCH_HEAD_SHA} \ - --column \ - | awk '{print$NF}' \ - | awk -F/ '{print$NF}') - fi - rm -rf ${full_path} - git clone --depth 1 file://${JUJU_SOURCE_CHECKOUT} ${full_path} - rm -fr ${JUJU_SOURCE_CHECKOUT} - - # TODO - remove vendor mode for go mod - # It currently is needed for s390x builds since the s390x slave - # is on a restricted network. - echo "Resolving dependencies" - export JUJU_MAKE_DEP=true - export JUJU_GOMOD_MODE=vendor - make -C ${full_path} godeps || make -C ${full_path} dep || make -C ${full_path} vendor-dependencies - - echo "Removing non-free data." - rm -rf ${GOPATH}/src/github.com/rogpeppe/godeps - rm -rf ${GOPATH}/src/github.com/golang/dep - rm -rf ${GOPATH}/src/github.com/kisielk - rm -rf ${GOPATH}/src/code.google.com/p/go.net/html/charset/testdata/ - rm -f ${GOPATH}/src/code.google.com/p/go.net/html/charset/*test.go - rm -rf ${GOPATH}/src/golang.org/x/net/html/charset/testdata/ - rm -f ${GOPATH}/src/golang.org/x/net/html/charset/*test.go - rm -rf ${GOPATH}/src/github.com/prometheus/procfs/fixtures - - # Remove backup files that confuse lintian. - echo "Removing backup files" - find ${GOPATH}/src/ -type f -name *.go.orig -delete - - echo "Attempting to apply patches" - (cd ${full_path} && GOPATH=${GOPATH} make add-patches || true) - - echo "Removing binaries and build artifacts" - if [[ -d ${GOPATH}/bin ]]; then - rm -r ${GOPATH}/bin - fi - if [[ -d ${GOPATH}/pkg ]]; then - # go mod prevents writes - chmod +w -R ${GOPATH}/pkg - rm -r ${GOPATH}/pkg - fi - - PROPS_PATH=${WORKSPACE}/build.properties - # Need to prepare some variables used through out the process - JUJU_VERSION=$(sed -n 's/^const version = "\(.*\)"/\1/p' ${full_path}/version/version.go) - if [[ -n ${JUJU_BUILD_NUMBER:-} ]]; then - JUJU_VERSION="${JUJU_VERSION}.${JUJU_BUILD_NUMBER}" - fi - - # GIT_COMMIT is used by juju Makefile for version info. - GIT_COMMIT=$(git -C ${full_path} rev-parse HEAD) - SHORT_GIT_COMMIT=${GIT_COMMIT:0:7} - echo "SHORT_GIT_COMMIT=${SHORT_GIT_COMMIT}" >> $PROPS_PATH - echo "GIT_COMMIT=${GIT_COMMIT}" >> $PROPS_PATH - echo "GOVERSION=${GOVERSION}" >> $PROPS_PATH - echo "JUJU_BUILD_NUMBER=${JUJU_BUILD_NUMBER}" >> $PROPS_PATH - echo "JUJU_VERSION=${JUJU_VERSION}" >> $PROPS_PATH - echo "JUJU_GOMOD_MODE=${JUJU_GOMOD_MODE}" >> $PROPS_PATH - echo "JUJU_SRC_TARBALL=juju-source-${JUJU_VERSION}-${SHORT_GIT_COMMIT}.tar.xz" >> $PROPS_PATH - echo "JUJU_VERSION_MAJOR_MINOR=$(echo ${JUJU_VERSION} | cut -d'-' -f 1 | cut -d'.' -f 1,2)" >> $PROPS_PATH - - source ${WORKSPACE}/build.properties - - tar cfJ ${JUJU_SRC_TARBALL} \ - --exclude .git --exclude .bzr --exclude .hg \ - -C ${GOPATH} ./ + - shell: !include-raw-verbatim: "scripts/package-juju-source.sh" - inject: - properties-file: ${WORKSPACE}/build.properties + properties-file: ${{WORKSPACE}}/build.properties - builder: name: 'set-test-description' builders: - description-setter: - description: "${JUJU_VERSION}:${SHORT_GIT_COMMIT}" + description: "${{JUJU_VERSION}}:${{SHORT_GIT_COMMIT}}" - builder: name: 'set-build-description' @@ -236,42 +37,6 @@ default-excludes: true case-sensitive: true -- builder: - name: 'lxd-src-command-base' - builders: - - get-juju-cloud-creds - - inject: - properties-content: |- - JUJU_UNITTEST_IMAGE=ubuntu - JUJU_UNITTEST_SERIES=jammy - # This takes the param: - # {src_command} which should be a the commands to run within the workspace. - # {setup_steps} commands to run before the src_command step (e.g. install things, add to groups) - # {env_file} is a file that will be sourced before src_command and setup_steps (pass a blank string to ignore this step) - - shell: - !include-raw: "scripts/lxd-runner.sh" - - -# This should go somewhere else. -- builder: - name: 'lxd-src-command' - builders: - - lxd-src-command-base: - env_file: "" - setup_steps: "" - src_command: "{src_command}" - -- builder: - name: 'lxd-src-command-focal-base' - builders: - - get-juju-cloud-creds - - inject: - properties-content: |- - JUJU_UNITTEST_IMAGE=ubuntu - JUJU_UNITTEST_SERIES=focal - - shell: - !include-raw: "scripts/lxd-runner.sh" - - publisher: name: 'log-panic-check' publishers: @@ -282,8 +47,7 @@ - SUCCESS - UNSTABLE build-steps: - - shell: !include-raw: ./scripts/panic_search.sh - + - shell: !include-raw-verbatim: ./scripts/panic_search.sh # Basic timeout wrapper for all functional tests - wrapper: @@ -307,38 +71,18 @@ name: host-src-command-with-setup builders: - shell: - !include-raw: "scripts/host-command.sh" + !include-raw-expand: "scripts/host-command.template.sh" - builder: name: 'detect-commit-go-version' builders: - shell: - !include-raw: "scripts/goversion.sh" + !include-raw-verbatim: "scripts/goversion.sh" - inject: - properties-file: ${WORKSPACE}/goversion + properties-file: ${{WORKSPACE}}/goversion - builder: name: 'ensure-aws-credentials' builders: - get-juju-cloud-creds - - shell: |- - #!/bin/bash - set -eux - - juju_data="$HOME/.local/share/juju" - mkdir -p "$juju_data" - sudo cp -R "$JUJU_DATA/credentials.yaml" "$juju_data" - sudo chown -R "$USER" "$juju_data" - - REGION="${REGION:-us-east-1}" - - mkdir -p "$HOME"/.aws - echo "[default]" > "$HOME"/.aws/credentials - cat "$juju_data/credentials.yaml" |\ - grep aws: -A 4 | grep key: |\ - tail -2 |\ - sed -e 's/ access-key:/aws_access_key_id =/' \ - -e 's/ secret-key:/aws_secret_access_key =/' \ - >> "$HOME"/.aws/credentials - echo -e "[default]\nregion = ${REGION}" > "$HOME"/.aws/config - chmod 600 ~/.aws/* + - shell: !include-raw-verbatim: "scripts/ensure-aws-credentials.sh" diff --git a/jobs/common/cloud-city.yml b/jobs/common/cloud-city.yml index 4726ede..7d0eb1c 100644 --- a/jobs/common/cloud-city.yml +++ b/jobs/common/cloud-city.yml @@ -81,7 +81,7 @@ files: github-token - inject: properties-content: - GITHUB_TOKEN_FILE=${CLOUD_CITY}/github-token + GITHUB_TOKEN_FILE=${{CLOUD_CITY}}/github-token - builder: name: 'get-juju-cloud-creds' diff --git a/jobs/common/pre-reqs.yaml b/jobs/common/pre-reqs.yaml index 0a275ea..e569bdb 100644 --- a/jobs/common/pre-reqs.yaml +++ b/jobs/common/pre-reqs.yaml @@ -5,7 +5,7 @@ name: install-docker builders: - shell: - !include-raw: scripts/setup_steps-install-docker.sh + !include-raw-verbatim: scripts/setup_steps-install-docker.sh # docker-login will run the login steps for connecting this host's docker daemon # to the Juju docker hub account. @@ -19,7 +19,7 @@ set -eu set +x - echo "Logging into Dockerhub with username ${DOCKERHUB_U}" + echo "Logging into Dockerhub with username ${{DOCKERHUB_U}}" echo "$DOCKERHUB_P" | docker login -u "$DOCKERHUB_U" --password-stdin # docker-ecr-login will run the login steps for connecting this host's docker @@ -77,7 +77,7 @@ name: install-go builders: - shell: - !include-raw: "scripts/install-go.sh" + !include-raw-verbatim: "scripts/install-go.sh" - builder: name: install-charmcraft @@ -131,7 +131,7 @@ - install-go - inject: properties-content: |- - GOPATH=${WORKSPACE}/go-path + GOPATH=${{WORKSPACE}}/go-path - shell: |- #!/bin/bash set -ex @@ -152,7 +152,7 @@ set -eux touch build.properties - echo "BUILD_DIR=${WORKSPACE}/build" >> build.properties + echo "BUILD_DIR=${{WORKSPACE}}/build" >> build.properties cat build.properties - inject: @@ -161,7 +161,7 @@ #!/bin/bash set -e - mkdir -p ${BUILD_DIR} + mkdir -p ${{BUILD_DIR}} # wait-for-cloud-init is a pre-req utility for jobs running on on ephemeral # nodes where we use cloud-init to stepup the node. We are waiting for the locks @@ -276,10 +276,10 @@ cd scripts git checkout origin/main -- jobs/z-jobs/scripts/clean_lxd.py - cd ${WORKSPACE} + cd ${{WORKSPACE}} - inject: properties-content: |- - SCRIPTS_DIR=${WORKSPACE}/scripts/jobs/z-jobs/scripts/ + SCRIPTS_DIR=${{WORKSPACE}}/scripts/jobs/z-jobs/scripts/ - builder: name: get-aws-cleanup-scripts @@ -292,10 +292,10 @@ cd scripts git checkout origin/main -- jobs/z-jobs/scripts/aws.py - cd ${WORKSPACE} + cd ${{WORKSPACE}} - inject: properties-content: |- - SCRIPTS_DIR=${WORKSPACE}/scripts/jobs/z-jobs/scripts/ + SCRIPTS_DIR=${{WORKSPACE}}/scripts/jobs/z-jobs/scripts/ - builder: @@ -311,10 +311,10 @@ cd scripts git checkout origin/main -- jobs/z-jobs/scripts/gce.py - cd ${WORKSPACE} + cd ${{WORKSPACE}} - inject: properties-content: |- - SCRIPTS_DIR=${WORKSPACE}/scripts/jobs/z-jobs/scripts/ + SCRIPTS_DIR=${{WORKSPACE}}/scripts/jobs/z-jobs/scripts/ - builder: name: get-maas-cleanup-scripts @@ -326,10 +326,10 @@ cd scripts git checkout origin/main -- jobs/z-jobs/scripts/clean_maas - cd ${WORKSPACE} + cd ${{WORKSPACE}} - inject: properties-content: |- - SCRIPTS_DIR=${WORKSPACE}/scripts/jobs/z-jobs/scripts/clean_maas + SCRIPTS_DIR=${{WORKSPACE}}/scripts/jobs/z-jobs/scripts/clean_maas - builder: name: get-equinix-cleanup-scripts @@ -342,10 +342,10 @@ cd scripts git checkout origin/main -- jobs/z-jobs/scripts/clean_equinix.py - cd ${WORKSPACE} + cd ${{WORKSPACE}} - inject: properties-content: |- - SCRIPTS_DIR=${WORKSPACE}/scripts/jobs/z-jobs/scripts/ + SCRIPTS_DIR=${{WORKSPACE}}/scripts/jobs/z-jobs/scripts/ - builder: name: checkout-qa-repo @@ -354,8 +354,8 @@ #!/bin/bash set -eux - cd ${WORKSPACE} - if [ ! -d "${WORKSPACE}/scripts" ]; then + cd ${{WORKSPACE}} + if [ ! -d "${{WORKSPACE}}/scripts" ]; then git clone git@github.com:juju/juju-qa-jenkins.git --no-checkout --depth 1 scripts fi @@ -363,4 +363,4 @@ name: install-mongo4.4 builders: - shell: - !include-raw: "scripts/install-mongo4.4.sh" + !include-raw-verbatim: "scripts/install-mongo4.4.sh" diff --git a/jobs/common/s3builders.yaml b/jobs/common/s3builders.yaml index cee4239..ff41ab6 100644 --- a/jobs/common/s3builders.yaml +++ b/jobs/common/s3builders.yaml @@ -18,21 +18,21 @@ # Create buildvars file cat >buildvars <> juju-src.properties + tar xf "${{JUJU_SRC_TARBALL}}" -C "${{GOPATH}}" + echo "JUJU_SRC_PATH=${{GOPATH}}/src/github.com/juju/juju" >> juju-src.properties else echo "GOPATH is not defined. Doing nothing with the Juju src tarball" fi @@ -306,19 +306,19 @@ # directory so that we get the JUJU_BUILD_NUMBER and pull the correct # src artifacts. # - echo "Downloading buildvars for Juju source ${SHORT_GIT_COMMIT}" + echo "Downloading buildvars for Juju source ${{SHORT_GIT_COMMIT}}" s3cmd --config $S3_CFG \ - get --force s3://juju-qa-data/ci-run/build-${SHORT_GIT_COMMIT}/src/buildvars + get --force s3://juju-qa-data/ci-run/build-${{SHORT_GIT_COMMIT}}/src/buildvars - echo "Contents of buildvars for Juju source ${SHORT_GIT_COMMIT}" + echo "Contents of buildvars for Juju source ${{SHORT_GIT_COMMIT}}" cat buildvars - echo "Injecting Juju source ${SHORT_GIT_COMMIT} buildvars" + echo "Injecting Juju source ${{SHORT_GIT_COMMIT}} buildvars" - inject: - properties-file: ${WORKSPACE}/buildvars + properties-file: ${{WORKSPACE}}/buildvars - shell: |- #!/bin/bash set -e - echo "Removing Juju source ${SHORT_GIT_COMMIT} buildvars file" + echo "Removing Juju source ${{SHORT_GIT_COMMIT}} buildvars file" rm -rf buildvars @@ -328,7 +328,7 @@ - shell: |- #!/bin/bash set -e - echo "OPERATOR_IMAGE_ACCOUNT=public.ecr.aws/jujuqabot/build-${SHORT_GIT_COMMIT}" > juju-oci.properties + echo "OPERATOR_IMAGE_ACCOUNT=public.ecr.aws/jujuqabot/build-${{SHORT_GIT_COMMIT}}" > juju-oci.properties cat juju-oci.properties - inject: properties-file: juju-oci.properties diff --git a/jobs/github/github-check-merge.yml b/jobs/github/github-check-merge.yml index 71ce3e2..54fdb21 100644 --- a/jobs/github/github-check-merge.yml +++ b/jobs/github/github-check-merge.yml @@ -188,11 +188,11 @@ build_env: "" setup_steps: "" src_command: - !include-raw: "{build_script}" + !include-raw-verbatim: "{build_script}" checkout_command: - !include-raw: "./scripts/checkout.sh" + !include-raw-verbatim: "./scripts/checkout.sh" test_command: - !include-raw: "./scripts/snippet_clean-test-exit.sh" + !include-raw-verbatim: "./scripts/snippet_clean-test-exit.sh" publishers: - junit: results: tests.xml @@ -286,11 +286,11 @@ build_env: "" setup_steps: "" src_command: - !include-raw: "{build_script}" + !include-raw-verbatim: "{build_script}" checkout_command: - !include-raw: "./scripts/checkout.sh" + !include-raw-verbatim: "./scripts/checkout.sh" test_command: - !include-raw: "./scripts/snippet_clean-test-exit.sh" + !include-raw-verbatim: "./scripts/snippet_clean-test-exit.sh" publishers: - junit: results: tests.xml diff --git a/jobs/github/mergejobs.yaml b/jobs/github/mergejobs.yaml index 141f063..7b45ba9 100644 --- a/jobs/github/mergejobs.yaml +++ b/jobs/github/mergejobs.yaml @@ -48,8 +48,8 @@ - name: github-make-check-juju current-parameters: true predefined-parameters: |- - GOVERSION=${GOVERSION} - MERGE_COMMIT=${MERGE_COMMIT} + GOVERSION=${{GOVERSION}} + MERGE_COMMIT=${{MERGE_COMMIT}} - project: @@ -185,14 +185,14 @@ #!/bin/bash GOOS="linux" GOARCH="amd64" - GOVERSION="${GOVERSION}" + GOVERSION="${{GOVERSION}}" cat >goversion <prdesc < 0) { + def current = b + limit = limit - 1 + b = b.getPreviousBuild() + if (current.result == null) { + continue + } + if (current.result != Result.SUCCESS) { + continue + } + def vars = current.buildVariableResolver + println "${vars.resolve("ghprbPullLink")} ${vars.resolve("GOVERSION")} ${vars.resolve("MERGE_COMMIT")}" + if (vars.resolve("ghprbPullLink").equals(pr) && + vars.resolve("GOVERSION").equals(goversion) && + vars.resolve("MERGE_COMMIT").equals(mergecommit)) { + println "Found previous successful build ${current.getAbsoluteUrl()} with the same parameters" + build.getAction(EnvInjectPluginAction.class).overrideAll([SKIP_CHECK: '1']) + break + } +} \ No newline at end of file diff --git a/jobs/github/scripts/snippet_build_check-juju-python-libjuju.sh.backup b/jobs/github/scripts/snippet_build_check-juju-python-libjuju.sh.backup deleted file mode 100755 index 43421e4..0000000 --- a/jobs/github/scripts/snippet_build_check-juju-python-libjuju.sh.backup +++ /dev/null @@ -1,22 +0,0 @@ - # even though we're a python lib, we're in a go path because of the way - # the checkout setup runs and changing that will cause other projects to - # break. - cd ${GOPATH}/src/github.com/juju/python-libjuju - # Fail if anything unexpected happens - set -e - - sudo add-apt-repository ppa:deadsnakes/ppa - sudo apt-get update -q - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y git gcc make python3.6 python3.7 python3.8 python3.9 python3-pip python3.6-dev python3.7-dev python3.8-dev python3.9-dev python3.9-distutils python3.10 python3.10-dev python3.10-distutils - - set +e # Will fail in reports gen if any errors occur - set -o pipefail # Need to error for make, not tees' success. - - pip3 install --user tox psutil || true - export PATH="$HOME/.local/bin:$PATH" - - make test - check_exit=$? - - set +o pipefail - echo `date --rfc-3339=seconds` "ran make test" diff --git a/jobs/github/utils.yml b/jobs/github/utils.yml index b117034..a24397d 100644 --- a/jobs/github/utils.yml +++ b/jobs/github/utils.yml @@ -7,7 +7,7 @@ # Note: Any deps need to be installed by the supplied snippet # # Note: To generate a xunit report the snippet must create the file - # "${WORKSPACE}/go-unittest.out" with the verbose test output (i.e. from "go + # "${{WORKSPACE}}/go-unittest.out" with the verbose test output (i.e. from "go # test -v") # # Note: To inject the contents of a file use: @@ -21,7 +21,7 @@ name: 'run-build-check-lxd' builders: - shell: - !include-raw: "scripts/run-snippet-lxd.sh" + !include-raw-verbatim: "scripts/run-snippet-lxd.sh" - builder: @@ -29,68 +29,39 @@ name: 'run-build-check-raw' builders: - shell: - !include-raw: "scripts/run-snippet-compat.sh" + !include-raw-expand: "scripts/run-snippet-compat.template.sh" - builder: name: 'detect-merge-go-version' builders: - shell: - !include-raw: "scripts/goversion.sh" + !include-raw-verbatim: "scripts/goversion.sh" - inject: - properties-file: ${WORKSPACE}/goversion + properties-file: ${{WORKSPACE}}/goversion - builder: name: github-merge builders: - shell: - !include-raw: "scripts/github-merge.sh" + !include-raw-expand: "scripts/github-merge.template.sh" - builder: name: 'resolve-merge-commit' builders: - shell: - !include-raw: "scripts/merge-commit.sh" + !include-raw-verbatim: "scripts/merge-commit.sh" - inject: - properties-file: ${WORKSPACE}/merge-commit + properties-file: ${{WORKSPACE}}/merge-commit - builder: name: 'set-check-description' builders: - description-setter: - description: "PR=${ghprbPullLink} GOVERSION=${GOVERSION} MERGE_COMMIT=${MERGE_COMMIT}" + description: "PR=${{ghprbPullLink}} GOVERSION=${{GOVERSION}} MERGE_COMMIT=${{MERGE_COMMIT}}" - builder: name: 'should-skip-juju-make-check' builders: - system-groovy: - command: | - import hudson.model.* - import jenkins.model.Jenkins - import org.jenkinsci.plugins.envinject.EnvInjectPluginAction - - def pr = build.getEnvironment(listener).get("ghprbPullLink") - def goversion = build.getEnvironment(listener).get("GOVERSION") - def mergecommit = build.getEnvironment(listener).get("MERGE_COMMIT") - def b = Jenkins.getInstance().getItem("github-make-check-juju").getLastBuild() - def limit = 100 - while (b != null && limit > 0) { - def current = b - limit = limit - 1 - b = b.getPreviousBuild() - if (current.result == null) { - continue - } - if (current.result != Result.SUCCESS) { - continue - } - def vars = current.buildVariableResolver - println "${vars.resolve("ghprbPullLink")} ${vars.resolve("GOVERSION")} ${vars.resolve("MERGE_COMMIT")}" - if (vars.resolve("ghprbPullLink").equals(pr) && - vars.resolve("GOVERSION").equals(goversion) && - vars.resolve("MERGE_COMMIT").equals(mergecommit)) { - println "Found previous successful build ${current.getAbsoluteUrl()} with the same parameters" - build.getAction(EnvInjectPluginAction.class).overrideAll([SKIP_CHECK: '1']) - break - } - } + command: !include-raw-verbatim: "scripts/should-skip-juju-make-check.groovy" diff --git a/jobs/infrastructure/sync-ntp.yml b/jobs/infrastructure/sync-ntp.yml index ab6820b..d436908 100644 --- a/jobs/infrastructure/sync-ntp.yml +++ b/jobs/infrastructure/sync-ntp.yml @@ -17,7 +17,7 @@ concurrent: true builders: - shell: - !include-raw: "scripts/sync-ntp.sh" + !include-raw-verbatim: "scripts/sync-ntp.sh" triggers: - timed: H */4 * * * wrappers: diff --git a/jobs/z-jobs/z-clean-resources-aws.yml b/jobs/z-jobs/z-clean-resources-aws.yml index e2d89a3..7fd29d8 100644 --- a/jobs/z-jobs/z-clean-resources-aws.yml +++ b/jobs/z-jobs/z-clean-resources-aws.yml @@ -9,16 +9,16 @@ for region in us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 ap-northeast-1 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-south-1 sa-east-1 do - echo "+++++++++++ deleting instances in ${region} +++++++++++" - $SCRIPTS_DIR/aws.py -v ${region} delete-instances -o 2 '*' - echo "+++++++++++ deleting security groups in ${region} +++++++++++" - $SCRIPTS_DIR/aws.py -v ${region} delete-sec-groups - echo "+++++++++++ deleting controller and kubernetes namespace volumes in ${region} +++++++++++" - $SCRIPTS_DIR/aws.py -v ${region} delete-volumes + echo "+++++++++++ deleting instances in ${{region}} +++++++++++" + $SCRIPTS_DIR/aws.py -v ${{region}} delete-instances -o 2 '*' + echo "+++++++++++ deleting security groups in ${{region}} +++++++++++" + $SCRIPTS_DIR/aws.py -v ${{region}} delete-sec-groups + echo "+++++++++++ deleting controller and kubernetes namespace volumes in ${{region}} +++++++++++" + $SCRIPTS_DIR/aws.py -v ${{region}} delete-volumes done description: Clean up AWS resouces. - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-azure.yml b/jobs/z-jobs/z-clean-resources-azure.yml index bd821aa..cb614f8 100644 --- a/jobs/z-jobs/z-clean-resources-azure.yml +++ b/jobs/z-jobs/z-clean-resources-azure.yml @@ -35,7 +35,7 @@ done description: |- Delete old azure resource groups. - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-ecr.yml b/jobs/z-jobs/z-clean-resources-ecr.yml index 0fa12fc..80dfb83 100644 --- a/jobs/z-jobs/z-clean-resources-ecr.yml +++ b/jobs/z-jobs/z-clean-resources-ecr.yml @@ -4,8 +4,8 @@ builders: - get-ec2-creds - shell: - !include-raw: scripts/ecr-cleanup.sh - node: ephemeral-focal-small-amd64 + !include-raw-verbatim: scripts/ecr-cleanup.sh + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-eks.yml b/jobs/z-jobs/z-clean-resources-eks.yml index d84482c..2702328 100644 --- a/jobs/z-jobs/z-clean-resources-eks.yml +++ b/jobs/z-jobs/z-clean-resources-eks.yml @@ -4,8 +4,8 @@ builders: - get-ec2-creds - shell: - !include-raw: scripts/eks-cleanup.sh - node: ephemeral-focal-small-amd64 + !include-raw-verbatim: scripts/eks-cleanup.sh + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-equinix.yml b/jobs/z-jobs/z-clean-resources-equinix.yml index e86caa3..68a7fd0 100644 --- a/jobs/z-jobs/z-clean-resources-equinix.yml +++ b/jobs/z-jobs/z-clean-resources-equinix.yml @@ -9,7 +9,7 @@ set -x chmod +x $SCRIPTS_DIR/clean_equinix.py $SCRIPTS_DIR/clean_equinix.py am --hours=2 - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-gce.yml b/jobs/z-jobs/z-clean-resources-gce.yml index b95ae76..11a4ed3 100644 --- a/jobs/z-jobs/z-clean-resources-gce.yml +++ b/jobs/z-jobs/z-clean-resources-gce.yml @@ -28,7 +28,7 @@ comm -1 -2 ~/gcerules newrules | xargs -I % gcloud compute firewall-rules delete % --quiet # set new rules mv newrules ~/gcerules - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-gke.yml b/jobs/z-jobs/z-clean-resources-gke.yml index 9829dec..2e3e979 100644 --- a/jobs/z-jobs/z-clean-resources-gke.yml +++ b/jobs/z-jobs/z-clean-resources-gke.yml @@ -23,7 +23,7 @@ echo "deleting cluster -> $name $zone" gcloud container clusters delete $name --zone=$zone --quiet done - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/jobs/z-jobs/z-clean-resources-vsphere.yml b/jobs/z-jobs/z-clean-resources-vsphere.yml index 18fadae..2a534a0 100644 --- a/jobs/z-jobs/z-clean-resources-vsphere.yml +++ b/jobs/z-jobs/z-clean-resources-vsphere.yml @@ -4,7 +4,7 @@ - get-juju-cloud-creds - get-vsphere-creds - shell: - !include-raw: scripts/vsphere-cleanup.sh + !include-raw-verbatim: scripts/vsphere-cleanup.sh description: Remove VMs and datastore objects older that 4 hours. parameters: - string: @@ -19,7 +19,7 @@ name: VSPHERE_SDK_URL description: "URL for the vsphere's SDK" default: https://10.247.0.3/sdk - node: ephemeral-focal-small-amd64 + node: ephemeral-noble-small-amd64 publishers: - email-ext: recipients: juju-qa-aws@canonical.com diff --git a/requirements.txt b/requirements.txt index 90e214a..c773f88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -jenkins-job-builder==4.3.0 +jenkins-job-builder==6.3.0 setuptools<=65.7.0 diff --git a/tests/suites/static_analysis/deadcode/main.go b/tests/suites/static_analysis/deadcode/main.go index 406bab3..80d512a 100644 --- a/tests/suites/static_analysis/deadcode/main.go +++ b/tests/suites/static_analysis/deadcode/main.go @@ -102,13 +102,13 @@ func main() { if err := walkDirectory(dir, ignore(dir, config.Files.Skip, func(path string, info os.FileInfo) error { data, err := ioutil.ReadFile(path) if err != nil { - return err + return fmt.Errorf("cannot read file %s: %w", path, err) } var job []Node err = yaml.Unmarshal(data, &job) if err != nil { - return err + return fmt.Errorf("cannot parse file %s: %w", path, err) } for _, v := range job { diff --git a/tests/suites/static_analysis/lint_yaml.sh b/tests/suites/static_analysis/lint_yaml.sh index 01d66e6..3d51abe 100644 --- a/tests/suites/static_analysis/lint_yaml.sh +++ b/tests/suites/static_analysis/lint_yaml.sh @@ -6,7 +6,7 @@ yaml_check() { import yaml, sys def path(loader, tag_suffix, node): - tags = [u'!include-raw:', u'!include:', u'!include-raw-escape:'] + tags = [u'!include-raw-expand:', u'!include:', u'!include-raw-verbatim:'] if tag_suffix not in tags: raise Exception('unknown tag: {}, expected: {}'.format(tag_suffix, tags)) return 'input-raw' @@ -68,7 +68,6 @@ jobs: - z-clean-resources-windows - z-clean-resources-eks - z-clean-resources-ecr - - run-unit-tests-lxd - upload-s3-agent-binaries - unit-tests-s390x - unit-tests-race-arm64 @@ -84,7 +83,6 @@ jobs: # jenkins suite. We should clean them up to ensure that they do run, or # are removed. - integration-tests - - lxd-src-command-focal-base - test-controllercharm-multijob EOF ) diff --git a/tools/gen-wire-tests/juju.config b/tools/gen-wire-tests/juju.config index 5721255..1606b9d 100644 --- a/tools/gen-wire-tests/juju.config +++ b/tools/gen-wire-tests/juju.config @@ -1,6 +1,6 @@ folders: introduced: - test_cloud_azure: + cloud_azure-test_managed_identity: 3.6 test_firewall_ssh: 3.2 @@ -35,6 +35,8 @@ folders: smoke_k8s-test_deploy: 4.0 timeout: + cloud_azure: + test_managed_identity: 60 secrets_iaas: test_secrets_vault: 60 model: diff --git a/tools/gen-wire-tests/main.go b/tools/gen-wire-tests/main.go index d65ecc9..879406a 100644 --- a/tools/gen-wire-tests/main.go +++ b/tools/gen-wire-tests/main.go @@ -68,14 +68,14 @@ var ( // - for versions 3.n, match if the minor version has 2+ digits or is a // single digit greater than or equal to n var minVersionRegex = map[string]string{ - "3.0": "^[4-9].*|^3\\\\.([0-9]|\\\\d{2,})(\\\\.|-).*", - "3.1": "^[4-9].*|^3\\\\.([1-9]|\\\\d{2,})(\\\\.|-).*", - "3.2": "^[4-9].*|^3\\\\.([2-9]|\\\\d{2,})(\\\\.|-).*", - "3.3": "^[4-9].*|^3\\\\.([3-9]|\\\\d{2,})(\\\\.|-).*", - "3.4": "^[4-9].*|^3\\\\.([4-9]|\\\\d{2,})(\\\\.|-).*", - "3.5": "^[4-9].*|^3\\\\.([5-9]|\\\\d{2,})(\\\\.|-).*", - "3.6": "^[4-9].*|^3\\\\.([6-9]|\\\\d{2,})(\\\\.|-).*", - "4.0": "^[5-9].*|^4\\\\.([0-9]|\\\\d{2,})(\\\\.|-).*", + "3.0": "^[4-9].*|^3\\\\.([0-9]|\\\\d{{2,}})(\\\\.|-).*", + "3.1": "^[4-9].*|^3\\\\.([1-9]|\\\\d{{2,}})(\\\\.|-).*", + "3.2": "^[4-9].*|^3\\\\.([2-9]|\\\\d{{2,}})(\\\\.|-).*", + "3.3": "^[4-9].*|^3\\\\.([3-9]|\\\\d{{2,}})(\\\\.|-).*", + "3.4": "^[4-9].*|^3\\\\.([4-9]|\\\\d{{2,}})(\\\\.|-).*", + "3.5": "^[4-9].*|^3\\\\.([5-9]|\\\\d{{2,}})(\\\\.|-).*", + "3.6": "^[4-9].*|^3\\\\.([6-9]|\\\\d{{2,}})(\\\\.|-).*", + "4.0": "^[5-9].*|^4\\\\.([0-9]|\\\\d{{2,}})(\\\\.|-).*", } // Gen-wire-tests will generate the integration test files for the juju @@ -478,14 +478,14 @@ const Template = ` {{- $full_task_name := (printf "test-%s-%s-%s" $.SuiteName (ensureHyphen $task_name) $cloud.Name) -}} {{- $builder := "run-integration-test" -}} - {{- $run_on := "ephemeral-focal-small-amd64" -}} + {{- $run_on := "ephemeral-noble-small-amd64" -}} {{- if or (eq (index $node.Ephemeral $test_name) true) (eq $cloud.ProviderName "lxd") }} {{- $builder = "run-integration-test" -}} - {{- $run_on = "ephemeral-focal-8c-32g-amd64" -}} + {{- $run_on = "ephemeral-noble-8c-32g-amd64" -}} {{- end }} {{- if or (eq (index $node.CrossCloud $test_name) true) (eq $cloud.Name "microk8s") }} {{- $builder = "run-integration-test-microk8s" -}} - {{- $run_on = "ephemeral-focal-8c-32g-amd64" -}} + {{- $run_on = "ephemeral-noble-8c-32g-amd64" -}} {{- end }} {{- if eq $node.Unstable false }} @@ -503,7 +503,7 @@ const Template = ` - validating-string: name: SHORT_GIT_COMMIT description: 'Enable sub job to be run individually.' - regex: ^\S{7}$ + regex: ^\S{{"{{7}}"}}$ msg: Enter a valid 7 char git sha - choice: default: 'amd64' @@ -568,7 +568,7 @@ const Template = ` - conditional-step: condition-kind: regex-match regex: "{{ $cond }}" - label: "${JUJU_VERSION}" + label: "{{ "${{JUJU_VERSION}}" }}" on-evaluation-failure: "dont-run" steps: - {{$builder}}: