diff --git a/.gitignore b/.gitignore index 6826061c..dfe1f38b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ +.idea +*.iml *.json + creds.yml + tmp -.idea diff --git a/ci/configure.sh b/ci/configure.sh index 491225e8..a7a037b4 100755 --- a/ci/configure.sh +++ b/ci/configure.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +set -euo pipefail -set -eu +REPO_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" -fly -t bosh set-pipeline -p bosh-deployment \ - -c ci/pipeline.yml +fly -t "${CONCOURSE_TARGET:-bosh}" set-pipeline -p bosh-deployment \ + -c "${REPO_ROOT}/ci/pipeline.yml" diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 66280d25..02650006 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -40,6 +40,7 @@ groups: - test-bosh-gcp - test-smoke - test-main-warden-cpi + - test-main-docker-cpi - promote - name: cpis jobs: @@ -144,6 +145,21 @@ jobs: stemcell: warden-ubuntu-noble-stemcell privileged: true +- name: test-main-docker-cpi + serial: true + build_log_retention: + builds: 250 + plan: + - get: bosh-deployment + trigger: true + - get: warden-ubuntu-noble-stemcell + - task: test-main-docker-cpi + timeout: 2h + file: bosh-deployment/ci/tasks/test-main-docker-cpi.yml + input_mapping: + stemcell: warden-ubuntu-noble-stemcell + privileged: true + - name: promote serial: true build_log_retention: @@ -155,6 +171,7 @@ jobs: - test-smoke - test-bosh-gcp - test-main-warden-cpi + - test-main-docker-cpi - put: bosh-deployment-commit-status params: state: success diff --git a/ci/tasks/test-main-docker-cpi.sh b/ci/tasks/test-main-docker-cpi.sh new file mode 100755 index 00000000..20c421f0 --- /dev/null +++ b/ci/tasks/test-main-docker-cpi.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -eu + +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +bosh_deployment="${PWD}/bosh-deployment" +rm -rf "/usr/local/bosh-deployment" +cp -r "${PWD}/bosh-deployment" "/usr/local/bosh-deployment" + +export USE_LOCAL_RELEASES=false +. start-bosh +. /tmp/local-bosh/director/env + +URL=$(cat stemcell/url) +SHA1=$(cat stemcell/sha1) + +bosh upload-stemcell --sha1 "$SHA1" "$URL" + +bosh -n update-runtime-config "${bosh_deployment}/runtime-configs/dns.yml" + +echo "-----> `date`: Deploy" +bosh -n -d zookeeper deploy "${script_dir}/../assets/zookeeper.yml" + +echo "-----> `date`: Exercise deployment" +bosh -n -d zookeeper run-errand smoke-tests + +echo "-----> `date`: Exercise deployment" +bosh -n -d zookeeper recreate + +echo "-----> `date`: Clean up disks, etc." +bosh -n -d zookeeper clean-up --all diff --git a/ci/tasks/test-main-docker-cpi.yml b/ci/tasks/test-main-docker-cpi.yml new file mode 100644 index 00000000..0d40ba32 --- /dev/null +++ b/ci/tasks/test-main-docker-cpi.yml @@ -0,0 +1,14 @@ +--- +platform: linux + +image_resource: + type: registry-image + source: + repository: ghcr.io/cloudfoundry/bosh/docker-cpi + +inputs: + - name: bosh-deployment + - name: stemcell + +run: + path: bosh-deployment/ci/tasks/test-main-docker-cpi.sh