From 78bfc5f3ecf2216fb63096a7fee8086ad96483e4 Mon Sep 17 00:00:00 2001 From: Sven Tennie Date: Tue, 8 Nov 2022 15:17:05 +0100 Subject: [PATCH 1/2] fix: Omit integration test containers in offline bundle (SQPIT-1357) There's no need to deliver our tests to customers. It only increases the artifact size. --- offline/ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/offline/ci.sh b/offline/ci.sh index 39bb6a88f..fa5add086 100755 --- a/offline/ci.sh +++ b/offline/ci.sh @@ -111,9 +111,11 @@ done # This is needed to bundle it's image. sed -i -Ee 's/federator: false/federator: true/' "$(pwd)"/values/wire-server/prod-values.example.yaml +# Get and dump required containers from Helm charts. Omit integration test +# containers (e.g. `quay.io_wire_galley-integration_4.22.0`.) for chartPath in "$(pwd)"/charts/*; do echo "$chartPath" -done | list-helm-containers | create-container-dump containers-helm +done | list-helm-containers | grep -v "\-integration:" | create-container-dump containers-helm # Undo changes on wire-server values.yaml sed -i -Ee 's/federator: true/federator: false/' "$(pwd)"/values/wire-server/prod-values.example.yaml From a98a200c90bc18c38299f42117ce441afe2486db Mon Sep 17 00:00:00 2001 From: Sven Tennie Date: Wed, 23 Nov 2022 17:06:37 +0100 Subject: [PATCH 2/2] Create M4 Release Fake helm values in list-helm-containers.sh (ported from M3.5.1 .) Adjust issuerRef.name to updated Helm charts (ported from M3.5.1 .) --- nix/scripts/list-helm-containers.sh | 5 +++- offline/ci.sh | 34 +++++++++++++++++----------- values/sftd/prod-values.example.yaml | 2 +- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/nix/scripts/list-helm-containers.sh b/nix/scripts/list-helm-containers.sh index df27aeaee..23408cd34 100644 --- a/nix/scripts/list-helm-containers.sh +++ b/nix/scripts/list-helm-containers.sh @@ -30,7 +30,10 @@ function optionally_complain() { while IFS= read -r chart; do echo "Running helm template on chart ${chart}…" >&2 - helm template "$chart" \ + helm template --debug "$chart" \ + --set secrets.zrestSecret=emptyString \ + --set federate.dtls.tls.key=emptyString \ + --set federate.dtls.tls.crt=emptyString \ $( [[ -f ./values/$(basename $chart)/prod-values.example.yaml ]] && echo "-f ./values/$(basename $chart)/prod-values.example.yaml" ) \ $( [[ -f ./values/$(basename $chart)/prod-secrets.example.yaml ]] && echo "-f ./values/$(basename $chart)/prod-secrets.example.yaml" ) \ | yq -r '..|.image? | select(.)' | optionally_complain | sort -u diff --git a/offline/ci.sh b/offline/ci.sh index fa5add086..25aa5d3fb 100755 --- a/offline/ci.sh +++ b/offline/ci.sh @@ -59,7 +59,7 @@ tar cf containers-system.tar containers-system [[ "$INCREMENTAL" -eq 0 ]] && rm -r containers-system # Used for ansible-restund role -echo "quay.io/wire/restund:v0.4.16b1.0.53" | create-container-dump containers-other +echo "quay.io/wire/restund:v0.6.0-rc.2" | create-container-dump containers-other tar cf containers-other.tar containers-other [[ "$INCREMENTAL" -eq 0 ]] && rm -r containers-other @@ -68,19 +68,20 @@ charts=( # backoffice # commented out for now, points to a 2.90.0 container image which doesn't # seem to exist on quay.io - wire/nginx-ingress-controller - wire/nginx-ingress-services - wire/reaper - wire/cassandra-external - wire/databases-ephemeral - wire/demo-smtp - wire/elasticsearch-external - wire/fake-aws - wire/minio-external - wire/wire-server + wire-develop/nginx-ingress-controller + wire-develop/nginx-ingress-services + wire-develop/reaper + wire-develop/cassandra-external + wire-develop/databases-ephemeral + wire-develop/demo-smtp + wire-develop/elasticsearch-external + wire-develop/fake-aws + wire-develop/minio-external + wire-develop/wire-server # local-path-provisioner # TODO: uncomment once its dependencies are pinned! - wire/sftd + wire-develop/restund + wire-develop/sftd # Has a weird dependency on curl:latest. out of scope # wire-server-metrics # fluent-bit @@ -94,10 +95,11 @@ HELM_HOME=$(mktemp -d) export HELM_HOME helm repo add wire https://s3-eu-west-1.amazonaws.com/public.wire.com/charts +helm repo add wire-develop https://s3-eu-west-1.amazonaws.com/public.wire.com/charts-develop helm repo update # wire_version=$(helm show chart wire/wire-server | yq -r .version) -wire_version="4.26.0" +wire_version="4.26.1" # Download zauth; as it's needed to generate certificates echo "quay.io/wire/zauth:$wire_version" | create-container-dump containers-adminhost @@ -107,6 +109,12 @@ for chartName in "${charts[@]}"; do (cd ./charts; helm pull --version "$wire_version" --untar "$chartName") done +# HACKS! +sed -i -Ee 's/v0\.6\.0-rc\.1/v0.6.0-rc.2/' "$(pwd)"/charts/restund/Chart.yaml +sed -i -Ee 's/2\.1\.19/3.1.3/' "$(pwd)"/charts/sftd/Chart.yaml +sed -i -Ee 's/2.2.1-v0.28.21-0-6bfd7c5/2.5.0-v0.29.7-0-7de724c/' "$(pwd)"/charts/wire-server/charts/account-pages/values.yaml +sed -i -Ee 's/2022-11-02-production.0-v0.31.9-0-337e400/2022-10-25-M4-RC-BUND/' "$(pwd)"/charts/wire-server/charts/webapp/values.yaml + # Patch wire-server values.yaml to include federator # This is needed to bundle it's image. sed -i -Ee 's/federator: false/federator: true/' "$(pwd)"/values/wire-server/prod-values.example.yaml diff --git a/values/sftd/prod-values.example.yaml b/values/sftd/prod-values.example.yaml index 8f6b66e10..35d9b1c53 100644 --- a/values/sftd/prod-values.example.yaml +++ b/values/sftd/prod-values.example.yaml @@ -2,4 +2,4 @@ allowOrigin: https://webapp.example.com host: sftd.example.com tls: issuerRef: - name: letsencrypt-prod + name: letsencrypt-http01