Skip to content
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
120 changes: 114 additions & 6 deletions .github/workflows/offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
#
# Push to master/develop: Always builds all profiles regardless of labels
#
# Manual builds (workflow_dispatch), e.g. for a release candidate in wire-builds:
# gh workflow run offline.yml --ref <branch> -f profile=min -f wire_build_ref=<wire-builds commit/branch/tag>
# - 'profile' selects the profiles like the labels above
# - 'wire_build_ref' selects the build.json from wireapp/wire-builds (empty: script default)
# - bundles are uploaded to S3 as wire-server-deploy-static[-<profile>]-<sha>-wire-builds-<ref>.tgz
# and attached to the run (kept 14 days)
#
on:
push:
branches: ["**"]
Expand All @@ -29,12 +36,31 @@ on:
paths-ignore:
- "*.md"
- "**/*.md"
workflow_dispatch:
inputs:
profile:
description: "Profile(s) to build (same meaning as the build-* PR labels)"
type: choice
options: [min, default, dev, wiab-staging, all]
default: min
wire_build_ref:
description: "wireapp/wire-builds commit, branch or tag to take build.json from (empty: default of proc_pull_charts.sh)"
type: string
required: false
default: ""

env:
# build.json URL for workflow_dispatch builds; empty otherwise (the scripts then use their default)
WIRE_BUILD: ${{ inputs.wire_build_ref != '' && format('https://raw.githubusercontent.com/wireapp/wire-builds/{0}/build.json', inputs.wire_build_ref) || '' }}
WIRE_BUILD_REF: ${{ inputs.wire_build_ref }}

jobs:
# Build default profile and create local assets
build-default:
name: Build default profile
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && (inputs.profile == 'all' || inputs.profile == 'default' || inputs.profile == 'wiab-staging')) ||
contains(github.event.pull_request.labels.*.name, 'build-all') ||
contains(github.event.pull_request.labels.*.name, 'build-default') ||
contains(github.event.pull_request.labels.*.name, 'build-wiab-staging')
Expand All @@ -57,14 +83,22 @@ jobs:

- name: Get upload name
id: upload_name
run: echo "UPLOAD_NAME=$GITHUB_SHA" >> $GITHUB_OUTPUT
run: |
name="$GITHUB_SHA"
if [[ -n "$WIRE_BUILD_REF" ]]; then
name="${name}-wire-builds-$(printf '%s' "$WIRE_BUILD_REF" | tr -c 'A-Za-z0-9._-' '-' | cut -c1-64)"
fi
echo "UPLOAD_NAME=$name" >> "$GITHUB_OUTPUT"

# default profile build
- name: Process the default profile build
run: ./offline/default-build/build.sh
env:
GPG_PRIVATE_KEY: '${{ secrets.GPG_PRIVATE_KEY }}'
DOCKER_LOGIN: '${{ secrets.DOCKER_LOGIN }}'
# read-only robot for pulling helm charts (OCI) and container images from quay.io
DOCKER_LOGIN: '${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_USERNAME }}:${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_PASSWORD }}'
OCI_REGISTRY_USERNAME: '${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_USERNAME }}'
OCI_REGISTRY_PASSWORD: '${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_PASSWORD }}'

- name: Copy default build assets tarball to S3
run: |
Expand All @@ -75,11 +109,29 @@ jobs:
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
AWS_REGION: "eu-west-1"

# Manual builds are handed out to people: also attach the bundle to the run
# (as a plain .tgz, not zipped). S3 stays the permanent copy.
- name: Name default bundle for attaching to the run
if: github.event_name == 'workflow_dispatch'
run: ln -f "offline/default-build/output/assets.tgz" "offline/default-build/output/wire-server-deploy-static-${UPLOAD_NAME}.tgz"
env:
UPLOAD_NAME: ${{ steps.upload_name.outputs.UPLOAD_NAME }}

- name: Attach default bundle to the run
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v7
with:
path: offline/default-build/output/wire-server-deploy-static-${{ steps.upload_name.outputs.UPLOAD_NAME }}.tgz
archive: false
retention-days: 14
if-no-files-found: error

verify-default:
name: Verify default profile
needs: build-default
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && (inputs.profile == 'all' || inputs.profile == 'default')) ||
contains(github.event.pull_request.labels.*.name, 'build-all') ||
contains(github.event.pull_request.labels.*.name, 'build-default')
runs-on:
Expand Down Expand Up @@ -108,6 +160,7 @@ jobs:
run: ./offline/cd.sh
env:
HCLOUD_TOKEN: '${{ secrets.HCLOUD_TOKEN }}'
COMMIT_HASH: ${{ needs.build-default.outputs.upload_name }}

- name: Clean up hetzner environment; just in case
# Skip when terraform was never installed (earlier step failed): nothing was deployed.
Expand All @@ -122,6 +175,7 @@ jobs:
needs: build-default
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && (inputs.profile == 'all' || inputs.profile == 'wiab-staging')) ||
contains(github.event.pull_request.labels.*.name, 'build-all') ||
contains(github.event.pull_request.labels.*.name, 'build-wiab-staging')
runs-on:
Expand Down Expand Up @@ -150,6 +204,7 @@ jobs:
run: ./offline/cd_staging.sh
env:
HCLOUD_TOKEN: '${{ secrets.HCLOUD_TOKEN }}'
COMMIT_HASH: ${{ needs.build-default.outputs.upload_name }}

- name: Clean up hetzner wiab-staging environment; just in case
# Skip when terraform was never installed (earlier step failed): nothing was deployed.
Expand Down Expand Up @@ -188,6 +243,7 @@ jobs:
name: Build dev profile
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && (inputs.profile == 'all' || inputs.profile == 'dev')) ||
contains(github.event.pull_request.labels.*.name, 'build-all') ||
contains(github.event.pull_request.labels.*.name, 'build-dev')
runs-on:
Expand All @@ -207,13 +263,21 @@ jobs:

- name: Get upload name
id: upload_name
run: echo "UPLOAD_NAME=$GITHUB_SHA" >> $GITHUB_OUTPUT
run: |
name="$GITHUB_SHA"
if [[ -n "$WIRE_BUILD_REF" ]]; then
name="${name}-wire-builds-$(printf '%s' "$WIRE_BUILD_REF" | tr -c 'A-Za-z0-9._-' '-' | cut -c1-64)"
fi
echo "UPLOAD_NAME=$name" >> "$GITHUB_OUTPUT"

- name: Process the dev profile build
run: ./offline/demo-build/build.sh
env:
GPG_PRIVATE_KEY: "${{ secrets.GPG_PRIVATE_KEY }}"
DOCKER_LOGIN: "${{ secrets.DOCKER_LOGIN }}"
# read-only robot for pulling helm charts (OCI) and container images from quay.io
DOCKER_LOGIN: "${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_USERNAME }}:${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_PASSWORD }}"
OCI_REGISTRY_USERNAME: "${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_USERNAME }}"
OCI_REGISTRY_PASSWORD: "${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_PASSWORD }}"

- name: Copy dev build assets tarball to S3
run: |
Expand All @@ -224,6 +288,23 @@ jobs:
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
AWS_REGION: "eu-west-1"

# Manual builds are handed out to people: also attach the bundle to the run
# (as a plain .tgz, not zipped). S3 stays the permanent copy.
- name: Name dev bundle for attaching to the run
if: github.event_name == 'workflow_dispatch'
run: ln -f "offline/demo-build/output/assets.tgz" "offline/demo-build/output/wire-server-deploy-static-demo-${UPLOAD_NAME}.tgz"
env:
UPLOAD_NAME: ${{ steps.upload_name.outputs.UPLOAD_NAME }}

- name: Attach dev bundle to the run
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v7
with:
path: offline/demo-build/output/wire-server-deploy-static-demo-${{ steps.upload_name.outputs.UPLOAD_NAME }}.tgz
archive: false
retention-days: 14
if-no-files-found: error

- name: Install terraform
id: install-terraform
uses: hashicorp/setup-terraform@v3
Expand All @@ -235,6 +316,7 @@ jobs:
run: ./offline/cd_demo.sh
env:
HCLOUD_TOKEN: '${{ secrets.HCLOUD_TOKEN }}'
COMMIT_HASH: ${{ steps.upload_name.outputs.UPLOAD_NAME }}

- name: Clean up hetzner wiab environment; just in case
# Skip when terraform was never installed (earlier step failed): nothing was deployed.
Expand All @@ -251,6 +333,7 @@ jobs:
name: Build min profile
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && (inputs.profile == 'all' || inputs.profile == 'min')) ||
contains(github.event.pull_request.labels.*.name, 'build-all') ||
contains(github.event.pull_request.labels.*.name, 'build-min')
runs-on:
Expand All @@ -270,13 +353,21 @@ jobs:

- name: Get upload name
id: upload_name
run: echo "UPLOAD_NAME=$GITHUB_SHA" >> $GITHUB_OUTPUT
run: |
name="$GITHUB_SHA"
if [[ -n "$WIRE_BUILD_REF" ]]; then
name="${name}-wire-builds-$(printf '%s' "$WIRE_BUILD_REF" | tr -c 'A-Za-z0-9._-' '-' | cut -c1-64)"
fi
echo "UPLOAD_NAME=$name" >> "$GITHUB_OUTPUT"

- name: Process the min profile build
run: ./offline/min-build/build.sh
env:
GPG_PRIVATE_KEY: "${{ secrets.GPG_PRIVATE_KEY }}"
DOCKER_LOGIN: "${{ secrets.DOCKER_LOGIN }}"
# read-only robot for pulling helm charts (OCI) and container images from quay.io
DOCKER_LOGIN: "${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_USERNAME }}:${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_PASSWORD }}"
OCI_REGISTRY_USERNAME: "${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_USERNAME }}"
OCI_REGISTRY_PASSWORD: "${{ secrets.QUAY_WIRE_ALL_REPOS_READONLY_PASSWORD }}"

- name: Copy min build assets tarball to S3
run: |
Expand All @@ -287,5 +378,22 @@ jobs:
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
AWS_REGION: "eu-west-1"

# Manual builds are handed out to people: also attach the bundle to the run
# (as a plain .tgz, not zipped). S3 stays the permanent copy.
- name: Name min bundle for attaching to the run
if: github.event_name == 'workflow_dispatch'
run: ln -f "offline/min-build/output/assets.tgz" "offline/min-build/output/wire-server-deploy-static-min-${UPLOAD_NAME}.tgz"
env:
UPLOAD_NAME: ${{ steps.upload_name.outputs.UPLOAD_NAME }}

- name: Attach min bundle to the run
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v7
with:
path: offline/min-build/output/wire-server-deploy-static-min-${{ steps.upload_name.outputs.UPLOAD_NAME }}.tgz
archive: false
retention-days: 14
if-no-files-found: error

- name: Cleanup min build assets
run: rm -rf offline/min-build/output/
12 changes: 6 additions & 6 deletions ansible/inventory/offline/group_vars/postgresql/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ postgresql_use_repository: false # Set to true to use local packages from urls
# When updating the packages, update the checksums too in wire-server-deploy/nix/pkgs/wire-binaries.nix
postgresql_pkgs:
- name: libpq5
url: "{{ binaries_url }}/libpq5_18.2-1.pgdg22.04+1_amd64.deb"
url: "{{ binaries_url }}/libpq5_18.3-1.pgdg22.04+1_amd64.deb"
checksum: "sha256:54e4ab2606aea5525bfd1a99b6e1b143458caced07bd840ccb46a69cad61f341"
- name: postgresql-client-common
url: "{{ binaries_url }}/postgresql-client-common_291.pgdg22.04+1_all.deb"
Expand All @@ -62,11 +62,11 @@ postgresql_pkgs:
url: "{{ binaries_url }}/postgresql-common_291.pgdg22.04+1_all.deb"
checksum: "sha256:4c51fd323be440de831a55b1f06da77ba6e803fdf47a8b8e3e99b4f439256683"
- name: postgresql-client-17
url: "{{ binaries_url }}/postgresql-client-17_17.8-1.pgdg22.04+1_amd64.deb"
checksum: "sha256:a83a985f1e406c1914212de5dffdcce277d3d82ae5d542dd9d84001a97a427e4"
url: "{{ binaries_url }}/postgresql-client-17_17.9-1.pgdg22.04+1_amd64.deb"
checksum: "sha256:941afbc8e2a3396281cc4877ceb35c767f4638bd731b66ec8edf1fd56d30a538"
- name: postgresql-17
url: "{{ binaries_url }}/postgresql-17_17.8-1.pgdg22.04+1_amd64.deb"
checksum: "sha256:bddeaf93563ecf60df46b2000fd4d519d346d811579f89f30387de8d58f9b0dd"
url: "{{ binaries_url }}/postgresql-17_17.9-1.pgdg22.04+1_amd64.deb"
checksum: "sha256:69a65391f4ec1eac6a64b6f9c4bd31406f5ce5250cb669a5d00bd59f2d1e9e79"
- name: python3-psycopg2
url: "{{ binaries_url }}/python3-psycopg2_2.9.10-1.pgdg22.04+1_amd64.deb"
checksum: "sha256:cc2f749e3af292a67e012edeb4aa5d284f57f2d66a9a09fe5b81e5ffda73cab4"
Expand All @@ -78,4 +78,4 @@ postgresql_pkgs:
checksum: "sha256:f4efae9acf2fbfb5f5af43b8b812e2925d611fca1c48925276abc64116766128"
- name: postgresql-17-repmgr
url: "{{ binaries_url }}/postgresql-17-repmgr_5.5.0+debpgdg-3.pgdg22.04+1_amd64.deb"
checksum: "sha256:d8c2d333d7444b88a28f9f1cc8cf351a1120b8856a26940b21e256f80deefd84"
checksum: "sha256:06dbcee7e5430a50e71aee28aa83b6aad0325756b67390831f7dbfa5839c9630"
1 change: 1 addition & 0 deletions changelog.d/2-wire-builds/build-json-2026-q4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changed: source helm charts from the wire-builds 2026-q4-from-rm build.json (Bund Q4, OCI charts)
1 change: 1 addition & 0 deletions changelog.d/2-wire-builds/helm-oci-charts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added: support oci:// helm chart references in build.json (pulled by full reference, authenticated via OCI_REGISTRY_USERNAME/OCI_REGISTRY_PASSWORD), extract every chart to charts/<build.json key>, and allow overriding the build.json source via WIRE_BUILD
1 change: 1 addition & 0 deletions changelog.d/2-wire-builds/helm-oci-dependency
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changed: Updated nix pkgs for OCI helm charts
1 change: 1 addition & 0 deletions changelog.d/3-deploy-builds/offline-workflow-dispatch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added: the offline workflow can be started manually (workflow_dispatch) with a profile and a wire-builds ref, to build bundles for any build.json without committing to wire-server-deploy; manual builds also attach the bundle to the run (kept 14 days)
25 changes: 14 additions & 11 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
let
sources = import ./nix/sources.nix;
# for injecting old gnupg dependancy
oldpkgs = import sources.oldpkgs {
inherit system;
config = { };
};
#oldpkgs = import sources.oldpkgs {
# inherit system;
# config = { };
#};
# extract the module for injecting
gnupg1orig = oldpkgs.gnupg1orig;
#gnupg1orig = oldpkgs.gnupg1orig;

pkgs = import sources.nixpkgs {
inherit system;
Expand All @@ -21,9 +21,9 @@ let
# layering is important here, the lowest takes precedance in case of overlaps
overlays = [
# custom overlay for injections
(self: super: {
gnupg1orig = gnupg1orig;
})
# (self: super: {
# gnupg1orig = gnupg1orig;
# })
# main overlay
(import ./nix/overlay.nix)
];
Expand All @@ -49,9 +49,9 @@ rec {
apacheHttpd
awscli2
gnumake
gnupg1
gnupg
# injected dependacy gnupg1orig
gnupg1orig
# gnupg1orig

kubernetes-tools

Expand All @@ -78,6 +78,9 @@ rec {
gnused
curl
gawk
oras
# Hetzner Cloud CLI, for debugging the offline CD environment (offline/cd.sh)
hcloud

niv
nix-prefetch-docker
Expand Down Expand Up @@ -127,4 +130,4 @@ rec {
];
};
};
}
}
Loading
Loading