Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M4 - first run #592

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nix/scripts/list-helm-containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 24 additions & 14 deletions offline/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -107,13 +109,21 @@ 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

# 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
Expand Down
2 changes: 1 addition & 1 deletion values/sftd/prod-values.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ allowOrigin: https://webapp.example.com
host: sftd.example.com
tls:
issuerRef:
name: letsencrypt-prod
name: letsencrypt-http01