Compare commits

..

47 Commits

Author SHA1 Message Date
edgelessci
ea5cdfb247 attestation: hardcode measurements for v2.16.3 2024-04-11 08:29:03 +00:00
edgelessci
b34d9dc9d4 deps: update versions to v2.16.3 2024-04-11 07:47:14 +00:00
edgelessci
79832a8f2a chore: update version.txt to v2.16.3 2024-04-11 07:46:59 +00:00
Markus Rudy
c64068557c helm: unbreak helm test after Cilium version bump (#3022) 2024-04-11 09:44:45 +02:00
Markus Rudy
4db8b2c272 Merge pull request from GHSA-g8fc-vrcg-8vjg
* helm: firewall pods

* helm: bump cilium chart version

---------

Co-authored-by: Leonard Cohnen <lc@edgeless.systems>
2024-04-11 09:44:45 +02:00
edgelessci
d2e1880f3e attestation: hardcode measurements for v2.16.2 2024-04-05 13:54:57 +00:00
edgelessci
0f2f1d3fd2 deps: update versions to v2.16.2 2024-04-05 13:24:03 +00:00
edgelessci
50861c76af chore: update version.txt to v2.16.2 2024-04-05 13:23:52 +00:00
Daniel Weiße
b4820c9aa9
Bump slsa-verifier to v2.5.1
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2024-04-05 15:23:02 +02:00
Daniel Weiße
027fd82206
ci: fix slsa generator action by updating to new version (#3014)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2024-04-05 15:22:53 +02:00
Malte Poll
3dedcbd2ff
bazel: patch Go SDK to increase tls maxHandshake size (#3009) 2024-04-05 15:22:44 +02:00
Malte Poll
010323f890
terraform: update terraform provider STACKIT (#3007) 2024-04-05 15:22:27 +02:00
Daniel Weiße
10c20f6f0b
provider: Add build tag for Terraform provider (#2992)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2024-04-05 15:22:08 +02:00
Markus Rudy
0a09b02e71
helm: retry uninstall manually if atomic install failed (#2984) 2024-04-05 15:21:53 +02:00
edgelessci
dec19769c5 attestation: hardcode measurements for v2.16.1 2024-03-11 18:10:09 +00:00
edgelessci
7af3fd7fda deps: update versions to v2.16.1 2024-03-11 17:38:39 +00:00
edgelessci
83c748a9e8 chore: update version.txt to v2.16.1 2024-03-11 17:38:24 +00:00
Malte Poll
a88f9d8df4 release: prepare release 2024-03-11 18:37:28 +01:00
Malte Poll
02e6cb4a2e docs: document OpenStack related config files on Windows 2024-03-11 18:20:17 +01:00
Malte Poll
ad8458d0ac docs: document STACKIT CC features
Co-Authored-By: Moritz Eckert <m1gh7ym0@gmail.com>
2024-03-11 18:20:02 +01:00
Malte Poll
938d0ceb00 docs: explain recovery steps on STACKIT 2024-03-11 18:19:40 +01:00
Malte Poll
d8a734dc08 docs: mention all zones where STACKIT instances are available 2024-03-11 18:19:27 +01:00
Malte Poll
3fa357786e terraform: ignore changes of OpenStack instance image 2024-03-11 18:19:05 +01:00
Malte Poll
98d5998057 openstack: move credentials to instance user data 2024-03-11 18:18:54 +01:00
Malte Poll
c8ae092298 docs: add STACKIT to the terraform provider page 2024-03-11 18:18:39 +01:00
Malte Poll
6181381c66 openstack: read credentials from clouds.yaml 2024-03-11 18:18:13 +01:00
Malte Poll
d6d9ef437c terraform-provider: Add support for STACKIT / OpenStack 2024-03-11 18:17:57 +01:00
Malte Poll
d1a22a725e openstack: vendor clouds.yaml Go type definitions from gophercloud v2 beta 2024-03-11 18:17:45 +01:00
Malte Poll
e50e97dff6 openstack: rename client type 2024-03-11 18:17:39 +01:00
malt3
6e8cd2ad69 image: update locked rpms 2024-03-11 18:17:31 +01:00
Daniel Weiße
a546648074 cli: retry auth handshake deadline exceeded errors in CLI and Terraform (#2976)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2024-03-11 18:17:07 +01:00
Malte Poll
f15380a70e docs: add installation instructions for the Windows CLI variant 2024-03-11 18:16:56 +01:00
Malte Poll
07db825756 openstack: improve error message on IMDS failures 2024-03-11 18:16:09 +01:00
Malte Poll
a3c5f3d445 imagefetcher: allow any marketplace image for OpenStack 2024-03-11 18:15:57 +01:00
Malte Poll
536bf6a35a image: special case OpenStack serial console to include ttyS1 2024-03-11 18:15:47 +01:00
Malte Poll
c123866358 disk-mapper: write failure message to syslog and sleep before reboot 2024-03-11 18:15:36 +01:00
Malte Poll
7238e2f895 deps: update Go to v1.22.1 2024-03-11 18:15:25 +01:00
Malte Poll
643b1ed4ac deps: update protobuf to v1.33.0 2024-03-11 18:15:18 +01:00
Markus Rudy
a5e73b48da bootstrapper: bounded retry of k8s join (#2968) 2024-03-11 18:15:09 +01:00
Malte Poll
e893b03eda cli: correct measurements in config generate stackit 2024-03-11 18:14:55 +01:00
Malte Poll
e7897a7468 misc: skip message about community license with marketplace image 2024-03-11 18:14:37 +01:00
Malte Poll
3d7b8c3596 cli: add STACKIT to constellation config instance-types 2024-03-11 18:14:26 +01:00
Daniel Weiße
1f623c8658 ci: use collision resistant name for Terraform e2e test (#2967)
* Use collision resistant name for Terraform e2e test
* Remove test suffix from Terraform provider examples

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2024-03-11 18:14:17 +01:00
Malte Poll
e9dc722b1f docs: update STACKIT flavors (#2964) 2024-03-11 18:13:53 +01:00
edgelessci
839543dcc1 attestation: hardcode measurements for v2.16.0 2024-02-29 09:29:24 +00:00
edgelessci
228f168b0f deps: update versions to v2.16.0 2024-02-29 08:59:30 +00:00
edgelessci
8db20665fd chore: update version.txt to v2.16.0 2024-02-29 08:59:20 +00:00
1716 changed files with 29945 additions and 109208 deletions

View File

@ -1,3 +1,9 @@
# Sadly, some Bazel rules we depend on have no support for bzlmod yet
# Here is an (incomplete) list of rules known to not support bzlmod.
# Please extend this list as you find more.
# - rules_nixpkgs: https://github.com/tweag/rules_nixpkgs/issues/181
common --noenable_bzlmod
# Import bazelrc presets # Import bazelrc presets
import %workspace%/bazel/bazelrc/bazel7.bazelrc import %workspace%/bazel/bazelrc/bazel7.bazelrc
import %workspace%/bazel/bazelrc/convenience.bazelrc import %workspace%/bazel/bazelrc/convenience.bazelrc
@ -48,6 +54,15 @@ common --crosstool_top=@local_config_cc//:toolchain
# bazel config to explicitly disable stamping (hide version information at build time) # bazel config to explicitly disable stamping (hide version information at build time)
common:nostamp --nostamp --workspace_status_command= common:nostamp --nostamp --workspace_status_command=
# bazel config to use (buildbuddy) remote cache
common:remote_cache --bes_results_url=https://app.buildbuddy.io/invocation/
common:remote_cache --bes_backend=grpcs://remote.buildbuddy.io
common:remote_cache --remote_cache=grpcs://remote.buildbuddy.io
common:remote_cache --remote_timeout=3600
common:remote_cache --experimental_remote_build_event_upload=minimal
common:remote_cache --nolegacy_important_outputs
common:remote_cache_readonly --noremote_upload_local_results # Uploads logs & artifacts without writing to cache
common:build_barn_rbe_ubuntu_22_04 --remote_timeout=3600 common:build_barn_rbe_ubuntu_22_04 --remote_timeout=3600
common:build_barn_rbe_ubuntu_22_04 --remote_executor=grpc://frontend.buildbarn:8980 # this maps to the kubernetes internal buildbarn/frontend service common:build_barn_rbe_ubuntu_22_04 --remote_executor=grpc://frontend.buildbarn:8980 # this maps to the kubernetes internal buildbarn/frontend service
common:build_barn_rbe_ubuntu_22_04 --extra_execution_platforms=//bazel/rbe:ubuntu-act-22-04-platform common:build_barn_rbe_ubuntu_22_04 --extra_execution_platforms=//bazel/rbe:ubuntu-act-22-04-platform

View File

@ -1 +1 @@
7.6.0 7.0.0

View File

@ -1,17 +0,0 @@
name: Delete artifact
description: Delete an artifact by name
inputs:
name:
description: 'The name of the artifact.'
required: true
workflowID:
description: 'The ID of the workflow.'
required: true
runs:
using: "composite"
steps:
- name: Delete artifact
shell: bash
run: ./.github/actions/artifact_delete/delete_artifact.sh ${{ inputs.workflowID }} ${{ inputs.name }}

View File

@ -1,37 +0,0 @@
#!/usr/bin/env bash
# get_artifact_id retrieves the artifact id of
# an artifact that was generated by a workflow.
# $1 should be the workflow run id. $2 should be the artifact name.
function get_artifact_id {
artifact_id="$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
--paginate \
"/repos/edgelesssys/constellation/actions/runs/$1/artifacts" --jq ".artifacts |= map(select(.name==\"$2\")) | .artifacts[0].id" || exit 1)"
echo "$artifact_id" | tr -d "\n"
}
# delete_artifact_by_id deletes an artifact by its artifact id.
# $1 should be the id of the artifact.
function delete_artifact_by_id {
gh api \
--method DELETE \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/edgelesssys/constellation/actions/artifacts/$1" || exit 1
}
workflow_id="$1"
artifact_name="$2"
if [[ -z $workflow_id ]] || [[ -z $artifact_name ]]; then
echo "Usage: delete_artifact.sh <WORKFLOW_ID> <ARTIFACT_NAME>"
exit 1
fi
echo "[*] retrieving artifact ID"
artifact_id="$(get_artifact_id "$workflow_id" "$artifact_name")"
echo "[*] deleting artifact with ID $artifact_id"
delete_artifact_by_id "$artifact_id"

View File

@ -16,11 +16,11 @@ inputs:
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Install 7zip - name: Install unzip
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with: with:
nixTools: | nixTools: |
_7zz unzip
- name: Create temporary directory - name: Create temporary directory
id: tempdir id: tempdir
@ -28,7 +28,7 @@ runs:
run: echo "directory=$(mktemp -d)" >> "$GITHUB_OUTPUT" run: echo "directory=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Download the artifact - name: Download the artifact
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: ${{ inputs.name }} name: ${{ inputs.name }}
path: ${{ steps.tempdir.outputs.directory }} path: ${{ steps.tempdir.outputs.directory }}
@ -37,4 +37,4 @@ runs:
shell: bash shell: bash
run: | run: |
mkdir -p ${{ inputs.path }} mkdir -p ${{ inputs.path }}
7zz x -p'${{ inputs.encryptionSecret }}' -bso0 -bsp0 -t7z -o"${{ inputs.path }}" ${{ steps.tempdir.outputs.directory }}/archive.7z unzip -P '${{ inputs.encryptionSecret }}' -qq -d ${{ inputs.path }} ${{ steps.tempdir.outputs.directory }}/archive.zip

View File

@ -14,19 +14,15 @@ inputs:
encryptionSecret: encryptionSecret:
description: 'The secret to use for encrypting the files.' description: 'The secret to use for encrypting the files.'
required: true required: true
overwrite:
description: 'Overwrite an artifact with the same name.'
default: false
required: false
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Install 7zip - name: Install zip
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with: with:
nixTools: | nixTools: |
_7zz zip
- name: Create temporary directory - name: Create temporary directory
id: tempdir id: tempdir
@ -36,10 +32,11 @@ runs:
- name: Create archive - name: Create archive
shell: bash shell: bash
run: | run: |
set -euo pipefail
shopt -s extglob shopt -s extglob
paths="${{ inputs.path }}" paths="${{ inputs.path }}"
paths=${paths%$'\n'} # Remove trailing newline paths=${paths%$'\n'} # Remove trailing newline
# Check if any file matches the given pattern(s). # Check if any file matches the given pattern(s).
something_exists=false something_exists=false
for pattern in ${paths} for pattern in ${paths}
@ -60,19 +57,15 @@ runs:
for target in ${paths} for target in ${paths}
do do
if compgen -G "${target}" > /dev/null pushd "$(dirname "${target}")" || exit 1
then zip -e -P '${{ inputs.encryptionSecret }}' -r "${{ steps.tempdir.outputs.directory }}/archive.zip" "$(basename "${target}")"
pushd "$(dirname "${target}")" popd || exit 1
7zz a -p'${{ inputs.encryptionSecret }}' -bso0 -bsp0 -t7z -ms=on -mhe=on "${{ steps.tempdir.outputs.directory }}/archive.7z" "$(basename "${target}")"
popd
fi
done done
- name: Upload archive as artifact - name: Upload archive as artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: ${{ inputs.name }} name: ${{ inputs.name }}
path: ${{ steps.tempdir.outputs.directory }}/archive.7z path: ${{ steps.tempdir.outputs.directory }}/archive.zip
retention-days: ${{ inputs.retention-days }} retention-days: ${{ inputs.retention-days }}
if-no-files-found: ignore if-no-files-found: ignore
overwrite: ${{ inputs.overwrite }}

View File

@ -79,7 +79,7 @@ runs:
# once it has the functionality # once it has the functionality
- name: Install Cosign - name: Install Cosign
if: inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != '' if: inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != ''
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- name: Install Rekor - name: Install Rekor
if: inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != '' if: inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != ''

View File

@ -42,7 +42,7 @@ runs:
- name: Docker metadata - name: Docker metadata
id: meta id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with: with:
images: | images: |
ghcr.io/${{ github.repository }}/${{ inputs.name }} ghcr.io/${{ github.repository }}/${{ inputs.name }}
@ -62,7 +62,7 @@ runs:
- name: Build and push container image - name: Build and push container image
id: build-micro-service id: build-micro-service
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with: with:
context: . context: .
file: ${{ inputs.dockerfile }} file: ${{ inputs.dockerfile }}

View File

@ -40,15 +40,8 @@ runs:
if: inputs.cloudProvider == 'azure' if: inputs.cloudProvider == 'azure'
shell: bash shell: bash
run: | run: |
UAMI=$(yq eval ".provider.azure.userAssignedIdentity" constellation-conf.yaml) UAMI=$(yq eval ".provider.azure.userAssignedIdentity | upcase" constellation-conf.yaml)
PRINCIPAL_ID=$(az identity show --ids "$UAMI" | yq ".principalId") PRINCIPAL_ID=$(az identity list | yq ".[] | select(.id | test(\"(?i)$UAMI\"; \"g\")) | .principalId")
if [ -z "$PRINCIPAL_ID" ]; then
echo "::error::PRINCIPAL_ID for \"$UAMI\" not found"
echo "::group::Available identities"
az identity list | yq ".[].id"
echo "::endgroup::"
exit 1
fi
az role assignment create --role "Key Vault Secrets User" \ az role assignment create --role "Key Vault Secrets User" \
--assignee "$PRINCIPAL_ID" \ --assignee "$PRINCIPAL_ID" \
--scope /subscriptions/0d202bbb-4fa7-4af8-8125-58c269a05435/resourceGroups/e2e-test-creds/providers/Microsoft.KeyVault/vaults/opensearch-creds --scope /subscriptions/0d202bbb-4fa7-4af8-8125-58c269a05435/resourceGroups/e2e-test-creds/providers/Microsoft.KeyVault/vaults/opensearch-creds
@ -61,7 +54,7 @@ runs:
- name: Login to AWS (IAM service principal) - name: Login to AWS (IAM service principal)
if: inputs.cloudProvider == 'aws' if: inputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM
aws-region: eu-central-1 aws-region: eu-central-1
@ -80,7 +73,7 @@ runs:
- name: Login to AWS (Cluster service principal) - name: Login to AWS (Cluster service principal)
if: inputs.cloudProvider == 'aws' if: inputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster
aws-region: eu-central-1 aws-region: eu-central-1
@ -91,11 +84,6 @@ runs:
shell: bash shell: bash
run: | run: |
echo "::group::cdbg deploy" echo "::group::cdbg deploy"
on_error() {
echo "::error::cdbg deploy failed"
}
trap on_error ERR
chmod +x $GITHUB_WORKSPACE/build/cdbg chmod +x $GITHUB_WORKSPACE/build/cdbg
cdbg deploy \ cdbg deploy \
--bootstrapper "${{ github.workspace }}/build/bootstrapper" \ --bootstrapper "${{ github.workspace }}/build/bootstrapper" \

View File

@ -1,64 +0,0 @@
name: Check measurements reproducibility
description: Check if the measurements of a given release are reproducible.
inputs:
version:
type: string
description: The version of the measurements that are downloaded from the CDN.
required: true
ref:
type: string
description: The git ref to check out. You probably want this to be the tag of the release you are testing.
required: true
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref }}
path: ./release
- name: Set up bazel
uses: ./.github/actions/setup_bazel_nix
with:
useCache: "false"
nixTools: |
systemdUkify
jq
jd-diff-patch
moreutils
- name: Allow unrestricted user namespaces
shell: bash
run: |
sudo sysctl --ignore --write kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl --ignore --write kernel.apparmor_restrict_unprivileged_userns=0
- name: Build images
id: build-images
shell: bash
run: |
set -euo pipefail
# Build required binaries
pushd release
bazel build //image/system:stable
echo "buildPath=$PWD/bazel-bin/image" | tee -a "$GITHUB_OUTPUT"
popd
- name: Download measurements
shell: bash
run: |
curl -fsLO https://cdn.confidential.cloud/constellation/v2/ref/-/stream/stable/${{ inputs.version }}/image/measurements.json
- name: Cleanup release measurements and generate our own
shell: bash
run: |
${{ github.action_path }}/create_measurements.sh "${{ steps.build-images.outputs.buildPath }}"
- name: Compare measurements
shell: bash
run: |
${{ github.action_path }}/compare_measurements.sh "${{ steps.build-images.outputs.buildPath }}"

View File

@ -1,31 +0,0 @@
#!/usr/bin/env bash
# no -e since we need to collect errors later
# no -u since it interferes with checking associative arrays
set -o pipefail
shopt -s extglob
declare -A errors
for directory in "$1"/system/!(mkosi_wrapper.sh); do
dirname="$(basename "$directory")"
attestationVariant="$(echo "$dirname" | cut -d_ -f2)"
echo "Their measurements for $attestationVariant:"
ts " " < "$attestationVariant"_their-measurements.json
echo "Own measurements for $attestationVariant:"
ts " " < "$attestationVariant"_own-measurements.json
diff="$(jd ./"$attestationVariant"_their-measurements.json ./"$attestationVariant"_own-measurements.json)"
if [[ -n $diff ]]; then
errors["$attestationVariant"]="$diff"
fi
done
for attestationVariant in "${!errors[@]}"; do
echo "Failed to reproduce measurements for $attestationVariant:"
echo "${errors["$attestationVariant"]}" | ts " "
done
if [[ ${#errors[@]} -ne 0 ]]; then
exit 1
fi

View File

@ -1,28 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
shopt -s extglob
for directory in "$1"/system/!(mkosi_wrapper.sh); do
dirname="$(basename "$directory")"
csp="$(echo "$dirname" | cut -d_ -f1)"
attestationVariant="$(echo "$dirname" | cut -d_ -f2)"
# This jq filter selects the measurements for the correct CSP and attestation variant
# and then removes all `warnOnly: true` measurements.
jq --arg attestation_variant "$attestationVariant" --arg csp "$csp" \
'
.list.[]
| select(
.attestationVariant == $attestation_variant
and (.csp | ascii_downcase) == $csp
)
| .measurements
| to_entries
| map(select(.value.warnOnly | not))
| from_entries
| del(.[] .warnOnly)
' \
measurements.json > "$attestationVariant"_their-measurements.json
bazel run --run_under "sudo --preserve-env" //image/measured-boot/cmd -- "$directory/constellation" /dev/stdout | jq '.measurements' > ./"$attestationVariant"_own-measurements.json
done

View File

@ -192,13 +192,6 @@ runs:
run: | run: |
echo "flag=--force" | tee -a $GITHUB_OUTPUT echo "flag=--force" | tee -a $GITHUB_OUTPUT
- name: Set conformance flag
id: set-conformance-flag
if: inputs.test == 'sonobuoy conformance'
shell: bash
run: |
echo "flag=--conformance" | tee -a $GITHUB_OUTPUT
- name: Constellation apply (Terraform) - name: Constellation apply (Terraform)
id: constellation-apply-terraform id: constellation-apply-terraform
if: inputs.clusterCreation == 'terraform' if: inputs.clusterCreation == 'terraform'
@ -211,7 +204,7 @@ runs:
if: inputs.clusterCreation != 'terraform' if: inputs.clusterCreation != 'terraform'
shell: bash shell: bash
run: | run: |
constellation apply --skip-phases=infrastructure --debug ${{ steps.set-force-flag.outputs.flag }} ${{ steps.set-conformance-flag.outputs.flag }} constellation apply --skip-phases=infrastructure --debug ${{ steps.set-force-flag.outputs.flag }}
- name: Get kubeconfig - name: Get kubeconfig
id: get-kubeconfig id: get-kubeconfig
@ -224,9 +217,31 @@ runs:
env: env:
KUBECONFIG: "${{ steps.get-kubeconfig.outputs.KUBECONFIG }}" KUBECONFIG: "${{ steps.get-kubeconfig.outputs.KUBECONFIG }}"
JOINTIMEOUT: "1200" # 20 minutes timeout for all nodes to join JOINTIMEOUT: "1200" # 20 minutes timeout for all nodes to join
CONTROL_NODES_COUNT: "${{ inputs.controlNodesCount }}" run: |
WORKER_NODES_COUNT: "${{ inputs.workerNodesCount }}" echo "::group::Wait for nodes"
run: ./.github/actions/constellation_create/wait-for-nodes.sh NODES_COUNT=$((${{ inputs.controlNodesCount }} + ${{ inputs.workerNodesCount }}))
JOINWAIT=0
until [[ "$(kubectl get nodes -o json | jq '.items | length')" == "${NODES_COUNT}" ]] || [[ $JOINWAIT -gt $JOINTIMEOUT ]];
do
echo "$(kubectl get nodes -o json | jq '.items | length')/"${NODES_COUNT}" nodes have joined.. waiting.."
JOINWAIT=$((JOINWAIT+30))
sleep 30
done
if [[ $JOINWAIT -gt $JOINTIMEOUT ]]; then
kubectl get nodes -o wide
echo "::error::Timed out waiting for nodes to join"
echo "::endgroup::"
exit 1
fi
echo "$(kubectl get nodes -o json | jq '.items | length')/"${NODES_COUNT}" nodes have joined"
if ! kubectl wait --for=condition=ready --all nodes --timeout=20m; then
kubectl get pods -n kube-system
kubectl get events -n kube-system
echo "::error::kubectl wait timed out before all nodes became ready"
echo "::endgroup::"
exit 1
fi
echo "::endgroup::"
- name: Download boot logs - name: Download boot logs
if: always() if: always()
@ -257,9 +272,9 @@ runs:
continue-on-error: true continue-on-error: true
uses: ./.github/actions/artifact_upload uses: ./.github/actions/artifact_upload
with: with:
name: debug-logs-${{ inputs.artifactNameSuffix }} name: serial-logs-${{ inputs.artifactNameSuffix }}
path: | path: >
*.log !(terraform).log
encryptionSecret: ${{ inputs.encryptionSecret }} encryptionSecret: ${{ inputs.encryptionSecret }}
- name: Prepare terraform state folders - name: Prepare terraform state folders
@ -268,12 +283,9 @@ runs:
run: | run: |
mkdir to-zip mkdir to-zip
cp -r constellation-terraform to-zip cp -r constellation-terraform to-zip
# constellation-iam-terraform is optional cp -r constellation-iam-terraform to-zip
if [ -d constellation-iam-terraform ]; then rm to-zip/constellation-terraform/plan.zip
cp -r constellation-iam-terraform to-zip rm -rf to-zip/constellation-terraform/.terraform to-zip/constellation-iam-terraform/.terraform
fi
rm -f to-zip/constellation-terraform/plan.zip
rm -rf to-zip/*/.terraform
- name: Upload terraform state - name: Upload terraform state
if: always() if: always()

View File

@ -1,51 +0,0 @@
#!/bin/bash
# We don't want to abort the script if there's a transient error in kubectl.
set +e
set -uo pipefail
NODES_COUNT=$((CONTROL_NODES_COUNT + WORKER_NODES_COUNT))
JOINWAIT=0
# Reports how many nodes are registered and fulfill condition=ready.
num_nodes_ready() {
kubectl get nodes -o json |
jq '.items | map(select(.status.conditions[] | .type == "Ready" and .status == "True")) | length'
}
# Reports how many API server pods are ready.
num_apiservers_ready() {
kubectl get pods -n kube-system -l component=kube-apiserver -o json |
jq '.items | map(select(.status.conditions[] | .type == "Ready" and .status == "True")) | length'
}
# Prints node joining progress.
report_join_progress() {
echo -n "nodes_joined=$(kubectl get nodes -o json | jq '.items | length')/${NODES_COUNT} "
echo -n "nodes_ready=$(num_nodes_ready)/${NODES_COUNT} "
echo "api_servers_ready=$(num_apiservers_ready)/${CONTROL_NODES_COUNT} ..."
}
# Indicates by exit code whether the cluster is ready, i.e. all nodes and API servers are ready.
cluster_ready() {
[[ "$(num_nodes_ready)" == "${NODES_COUNT}" && "$(num_apiservers_ready)" == "${CONTROL_NODES_COUNT}" ]]
}
echo "::group::Wait for nodes"
until cluster_ready || [[ ${JOINWAIT} -gt ${JOINTIMEOUT} ]]; do
report_join_progress
JOINWAIT=$((JOINWAIT + 30))
sleep 30
done
report_join_progress
if [[ ${JOINWAIT} -gt ${JOINTIMEOUT} ]]; then
set -x
kubectl get nodes -o wide
kubectl get pods -n kube-system -o wide
kubectl get events -n kube-system
set +x
echo "::error::timeout reached before all nodes became ready"
echo "::endgroup::"
exit 1
fi
echo "::endgroup::"

View File

@ -24,7 +24,6 @@ runs:
- name: Delete persistent volumes - name: Delete persistent volumes
if: inputs.kubeconfig != '' if: inputs.kubeconfig != ''
shell: bash shell: bash
continue-on-error: true
env: env:
KUBECONFIG: ${{ inputs.kubeconfig }} KUBECONFIG: ${{ inputs.kubeconfig }}
PV_DELETION_TIMEOUT: "120" # 2 minutes timeout for pv deletion PV_DELETION_TIMEOUT: "120" # 2 minutes timeout for pv deletion
@ -35,14 +34,6 @@ runs:
# Scrap namespaces that contain PVCs # Scrap namespaces that contain PVCs
for namespace in `kubectl get namespace --no-headers=true -o custom-columns=":metadata.name"`; do for namespace in `kubectl get namespace --no-headers=true -o custom-columns=":metadata.name"`; do
if [[ `kubectl get pvc -n $namespace --no-headers=true -o custom-columns=":metadata.name" | wc -l` -gt 0 ]]; then if [[ `kubectl get pvc -n $namespace --no-headers=true -o custom-columns=":metadata.name" | wc -l` -gt 0 ]]; then
if [[ "${namespace}" == "default" ]]; then
kubectl delete all --all --namespace "default" --wait
continue
fi
if [[ "${namespace}" == "kube-system" ]]; then
kubectl delete pvc --all --namespace "kube-system" --wait
continue
fi
kubectl delete namespace $namespace --wait kubectl delete namespace $namespace --wait
fi fi
done done
@ -67,7 +58,7 @@ runs:
- name: Login to AWS (Cluster role) - name: Login to AWS (Cluster role)
if: inputs.cloudProvider == 'aws' if: inputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster
aws-region: eu-central-1 aws-region: eu-central-1

View File

@ -14,10 +14,6 @@ inputs:
namePrefix: namePrefix:
description: "Name prefix to use for resources." description: "Name prefix to use for resources."
required: true required: true
additionalTags:
description: "Additional resource tags that will be written into the constellation configuration."
default: ""
required: false
# #
# AWS specific inputs # AWS specific inputs
# #
@ -27,9 +23,6 @@ inputs:
# #
# Azure specific inputs # Azure specific inputs
# #
azureSubscriptionID:
description: "Azure subscription ID to deploy Constellation in."
required: true
azureRegion: azureRegion:
description: "Azure region to deploy Constellation in." description: "Azure region to deploy Constellation in."
required: false required: false
@ -42,15 +35,6 @@ inputs:
gcpZone: gcpZone:
description: "The GCP zone to deploy Constellation in." description: "The GCP zone to deploy Constellation in."
required: false required: false
#
# STACKIT specific inputs
#
stackitZone:
description: "The STACKIT zone to deploy Constellation in."
required: false
stackitProjectID:
description: "The STACKIT project ID to deploy Constellation in."
required: false
runs: runs:
using: "composite" using: "composite"
@ -64,14 +48,8 @@ runs:
kubernetesFlag="--kubernetes=${{ inputs.kubernetesVersion }}" kubernetesFlag="--kubernetes=${{ inputs.kubernetesVersion }}"
fi fi
# TODO(v2.17): Remove this fallback and always use --tags flag
tagsFlag=""
if constellation config generate --help | grep -q -- --tags; then
tagsFlag="--tags=\"${{ inputs.additionalTags }}\""
fi
echo "flag=--update-config" | tee -a "$GITHUB_OUTPUT" echo "flag=--update-config" | tee -a "$GITHUB_OUTPUT"
constellation config generate ${{ inputs.cloudProvider }} ${kubernetesFlag} --attestation ${{ inputs.attestationVariant }} ${tagsFlag} constellation config generate ${{ inputs.cloudProvider }} ${kubernetesFlag} --attestation ${{ inputs.attestationVariant }}
- name: Constellation iam create aws - name: Constellation iam create aws
shell: bash shell: bash
@ -88,21 +66,14 @@ runs:
shell: bash shell: bash
if: inputs.cloudProvider == 'azure' if: inputs.cloudProvider == 'azure'
run: | run: |
extraFlags=""
if [[ $(constellation iam create azure --help | grep -c -- --subscriptionID) -ne 0 ]]; then
extraFlags="--subscriptionID=${{ inputs.azureSubscriptionID }}"
fi
constellation iam create azure \ constellation iam create azure \
--region="${{ inputs.azureRegion }}" \ --region="${{ inputs.azureRegion }}" \
--resourceGroup="${{ inputs.namePrefix }}-rg" \ --resourceGroup="${{ inputs.namePrefix }}-rg" \
--servicePrincipal="${{ inputs.namePrefix }}-sp" \ --servicePrincipal="${{ inputs.namePrefix }}-sp" \
--update-config \ --update-config \
--tf-log=DEBUG \ --tf-log=DEBUG \
--yes ${extraFlags} --yes
# TODO(@3u13r): Replace deprecated --serviceAccountID with --prefix
- name: Constellation iam create gcp - name: Constellation iam create gcp
shell: bash shell: bash
if: inputs.cloudProvider == 'gcp' if: inputs.cloudProvider == 'gcp'
@ -114,13 +85,3 @@ runs:
--update-config \ --update-config \
--tf-log=DEBUG \ --tf-log=DEBUG \
--yes --yes
- name: Set STACKIT-specific configuration
shell: bash
if: inputs.cloudProvider == 'stackit'
env:
STACKIT_PROJECT_ID: ${{ inputs.stackitProjectID }}
run: |
yq eval -i "(.provider.openstack.stackitProjectID) = \"${STACKIT_PROJECT_ID}\"" constellation-conf.yaml
yq eval -i "(.provider.openstack.availabilityZone) = \"${{ inputs.stackitZone }}\"" constellation-conf.yaml
yq eval -i "(.nodeGroups.[].zone) = \"${{ inputs.stackitZone }}\"" constellation-conf.yaml

View File

@ -23,7 +23,7 @@ runs:
- name: Login to AWS (IAM role) - name: Login to AWS (IAM role)
if: inputs.cloudProvider == 'aws' if: inputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM
aws-region: eu-central-1 aws-region: eu-central-1

View File

@ -17,7 +17,7 @@ runs:
steps: steps:
- name: Use docker for logging in - name: Use docker for logging in
if: runner.os != 'macOS' if: runner.os != 'macOS'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with: with:
registry: ${{ inputs.registry }} registry: ${{ inputs.registry }}
username: ${{ inputs.username }} username: ${{ inputs.username }}

View File

@ -19,7 +19,7 @@ runs:
steps: steps:
- name: Install Cosign - name: Install Cosign
if: inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != '' if: inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != ''
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- name: Download Syft & Grype - name: Download Syft & Grype
uses: ./.github/actions/install_syft_grype uses: ./.github/actions/install_syft_grype

View File

@ -67,7 +67,7 @@ runs:
# Make sure that helm is installed # Make sure that helm is installed
# This is not always the case, e.g. on MacOS runners # This is not always the case, e.g. on MacOS runners
- name: Install Helm - name: Install Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 uses: azure/setup-helm@29960d0f5f19214b88e1d9ba750a9914ab0f1a2f # v4.0.0
with: with:
version: v3.9.0 version: v3.9.0

View File

@ -5,51 +5,51 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Download CLI binaries darwin-amd64 - name: Download CLI binaries darwin-amd64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation-darwin-amd64 name: constellation-darwin-amd64
- name: Download CLI binaries darwin-arm64 - name: Download CLI binaries darwin-arm64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation-darwin-arm64 name: constellation-darwin-arm64
- name: Download CLI binaries linux-amd64 - name: Download CLI binaries linux-amd64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation-linux-amd64 name: constellation-linux-amd64
- name: Download CLI binaries linux-arm64 - name: Download CLI binaries linux-arm64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation-linux-arm64 name: constellation-linux-arm64
- name: Download CLI binaries windows-amd64 - name: Download CLI binaries windows-amd64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation-windows-amd64 name: constellation-windows-amd64
- name: Download Terraform module - name: Download Terraform module
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: terraform-module name: terraform-module
- name: Download Terraform provider binary darwin-amd64 - name: Download Terraform provider binary darwin-amd64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: terraform-provider-constellation-darwin-amd64 name: terraform-provider-constellation-darwin-amd64
- name: Download Terraform provider binary darwin-arm64 - name: Download Terraform provider binary darwin-arm64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: terraform-provider-constellation-darwin-arm64 name: terraform-provider-constellation-darwin-arm64
- name: Download Terraform provider binary linux-amd64 - name: Download Terraform provider binary linux-amd64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: terraform-provider-constellation-linux-amd64 name: terraform-provider-constellation-linux-amd64
- name: Download Terraform provider binary linux-arm64 - name: Download Terraform provider binary linux-arm64
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: terraform-provider-constellation-linux-arm64 name: terraform-provider-constellation-linux-arm64

View File

@ -2,9 +2,12 @@ name: E2E Attestationconfig API Test
description: "Test the attestationconfig CLI is functional." description: "Test the attestationconfig CLI is functional."
inputs: inputs:
attestationVariant: csp:
description: "attestation variant to run tests against" description: "Cloud provider to run tests against"
default: "azure-sev-snp" default: "azure"
buildBuddyApiKey:
description: "BuildBuddy API key for caching Bazel artifacts"
required: true
cosignPrivateKey: cosignPrivateKey:
description: "Cosign private key" description: "Cosign private key"
required: true required: true
@ -17,9 +20,12 @@ runs:
steps: steps:
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
- name: Login to AWS - name: Login to AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubTestResourceAPI role-to-assume: arn:aws:iam::795746500882:role/GithubTestResourceAPI
aws-region: eu-west-1 aws-region: eu-west-1
@ -30,4 +36,4 @@ runs:
COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }} COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }}
COSIGN_PASSWORD: ${{ inputs.cosignPassword }} COSIGN_PASSWORD: ${{ inputs.cosignPassword }}
run: | run: |
bazel run //internal/api/attestationconfigapi/cli:cli_e2e_test -- ${{ inputs.attestationVariant }} bazel run //internal/api/attestationconfigapi/cli:cli_e2e_test -- ${{ inputs.csp }}

View File

@ -82,30 +82,7 @@ runs:
KUBECONFIG: ${{ inputs.kubeconfig }} KUBECONFIG: ${{ inputs.kubeconfig }}
run: | run: |
worker_count=${{ steps.worker_count.outputs.worker_count }} worker_count=${{ steps.worker_count.outputs.worker_count }}
kubectl create -n default deployment nginx --image=nginx --replicas $(( 110 * (worker_count + 1) + 55 ))
cat <<EOF | kubectl apply -f -
kind: Deployment
apiVersion: apps/v1
metadata:
name: nginx
namespace: default
spec:
replicas: $(( 110 * (worker_count + 1) + 55 ))
strategy:
rollingUpdate:
maxUnavailable: 0 # Ensure "kubectl wait" actually waits for all pods to be ready
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
EOF
- name: Wait for autoscaling and check result - name: Wait for autoscaling and check result
shell: bash shell: bash

View File

@ -5,6 +5,7 @@ inputs:
cloudProvider: cloudProvider:
description: "Which cloud provider to use." description: "Which cloud provider to use."
required: true required: true
# TODO: Create different report depending on the attestation variant
attestationVariant: attestationVariant:
description: "Which attestation variant to use." description: "Which attestation variant to use."
required: true required: true
@ -32,9 +33,9 @@ runs:
steps: steps:
- name: Setup python - name: Setup python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with: with:
python-version: "3.13" python-version: "3.10"
- name: Install kubestr - name: Install kubestr
shell: bash shell: bash
@ -48,25 +49,25 @@ runs:
install kubestr /usr/local/bin install kubestr /usr/local/bin
- name: Checkout k8s-bench-suite - name: Checkout k8s-bench-suite
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
repository: "edgelesssys/k8s-bench-suite" repository: "edgelesssys/k8s-bench-suite"
ref: 67c64c854841165b778979375444da1c02e02210 ref: 67c64c854841165b778979375444da1c02e02210
path: k8s-bench-suite path: k8s-bench-suite
- name: Run FIO benchmark
- name: Run FIO benchmark without caching in Azure
if: inputs.cloudProvider == 'azure'
shell: bash shell: bash
env: env:
KUBECONFIG: ${{ inputs.kubeconfig }} KUBECONFIG: ${{ inputs.kubeconfig }}
run: | run: |
if [[ "${{ inputs.cloudProvider }}" == "azure" ]]
then
cat <<EOF | kubectl apply -f - cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1 apiVersion: storage.k8s.io/v1
kind: StorageClass kind: StorageClass
metadata: metadata:
name: fio-benchmark name: encrypted-rwo-no-cache
allowVolumeExpansion: true allowVolumeExpansion: true
allowedTopologies: [] allowedTopologies: []
mountOptions: [] mountOptions: []
@ -77,47 +78,34 @@ runs:
reclaimPolicy: Delete reclaimPolicy: Delete
volumeBindingMode: Immediate volumeBindingMode: Immediate
EOF EOF
fi mkdir -p out
kubestr fio -e "out/fio-constellation-${{ inputs.cloudProvider }}.json" -o json -s encrypted-rwo-no-cache -z 400Gi -f .github/actions/e2e_benchmark/fio.ini
if [[ "${{ inputs.cloudProvider }}" == "gcp" ]] - name: Run FIO benchmark
then if: inputs.cloudProvider == 'gcp'
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: |
cat <<EOF | kubectl apply -f - cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1 apiVersion: storage.k8s.io/v1
kind: StorageClass kind: StorageClass
metadata: metadata:
name: fio-benchmark name: encrypted-balanced-rwo
provisioner: gcp.csi.confidential.cloud provisioner: gcp.csi.confidential.cloud
volumeBindingMode: Immediate volumeBindingMode: Immediate
allowVolumeExpansion: true allowVolumeExpansion: true
parameters: parameters:
type: pd-balanced type: pd-balanced
EOF EOF
fi
if [[ "${{ inputs.cloudProvider }}" == "aws" ]]
then
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fio-benchmark
parameters:
type: gp3
provisioner: aws.csi.confidential.cloud
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
EOF
fi
mkdir -p out mkdir -p out
kubestr fio -e "out/fio-constellation-${{ inputs.attestationVariant }}.json" -o json -s fio-benchmark -z 400Gi -f .github/actions/e2e_benchmark/fio.ini kubestr fio -e "out/fio-constellation-${{ inputs.cloudProvider }}.json" -o json -s encrypted-balanced-rwo -z 400Gi -f .github/actions/e2e_benchmark/fio.ini
- name: Upload raw FIO benchmark results - name: Upload raw FIO benchmark results
if: (!env.ACT) if: (!env.ACT)
uses: ./.github/actions/artifact_upload uses: ./.github/actions/artifact_upload
with: with:
path: "out/fio-constellation-${{ inputs.attestationVariant }}.json" path: "out/fio-constellation-${{ inputs.cloudProvider }}.json"
name: "fio-constellation-${{ inputs.artifactNameSuffix }}.json" name: "fio-constellation-${{ inputs.artifactNameSuffix }}.json"
encryptionSecret: ${{ inputs.encryptionSecret }} encryptionSecret: ${{ inputs.encryptionSecret }}
@ -127,19 +115,19 @@ runs:
KUBECONFIG: ${{ inputs.kubeconfig }} KUBECONFIG: ${{ inputs.kubeconfig }}
TERM: xterm-256color TERM: xterm-256color
run: | run: |
workers="$(kubectl get nodes -o name -l '!node-role.kubernetes.io/control-plane')" workers="$(kubectl get nodes -o name | grep worker)"
echo -e "Found workers:\n$workers" echo -e "Found workers:\n$workers"
server="$(echo "$workers" | tail +1 | head -1 | cut -d '/' -f2)" server="$(echo "$workers" | tail +1 | head -1 | cut -d '/' -f2)"
echo "Server: $server" echo "Server: $server"
client="$(echo "$workers" | tail +2 | head -1 | cut -d '/' -f2)" client="$(echo "$workers" | tail +2 | head -1 | cut -d '/' -f2)"
echo "Client: $client" echo "Client: $client"
k8s-bench-suite/knb -f "out/knb-constellation-${{ inputs.attestationVariant }}.json" -o json --server-node "$server" --client-node "$client" k8s-bench-suite/knb -f "out/knb-constellation-${{ inputs.cloudProvider }}.json" -o json --server-node "$server" --client-node "$client"
- name: Upload raw knb benchmark results - name: Upload raw knb benchmark results
if: (!env.ACT) if: (!env.ACT)
uses: ./.github/actions/artifact_upload uses: ./.github/actions/artifact_upload
with: with:
path: "out/knb-constellation-${{ inputs.attestationVariant }}.json" path: "out/knb-constellation-${{ inputs.cloudProvider }}.json"
name: "knb-constellation-${{ inputs.artifactNameSuffix }}.json" name: "knb-constellation-${{ inputs.artifactNameSuffix }}.json"
encryptionSecret: ${{ inputs.encryptionSecret }} encryptionSecret: ${{ inputs.encryptionSecret }}
@ -151,7 +139,6 @@ runs:
# Working directory containing the previous results as JSON and to contain the graphs # Working directory containing the previous results as JSON and to contain the graphs
BDIR: benchmarks BDIR: benchmarks
CSP: ${{ inputs.cloudProvider }} CSP: ${{ inputs.cloudProvider }}
ATTESTATION_VARIANT: ${{ inputs.attestationVariant }}
run: | run: |
mkdir -p benchmarks mkdir -p benchmarks
python .github/actions/e2e_benchmark/evaluate/parse.py python .github/actions/e2e_benchmark/evaluate/parse.py
@ -161,12 +148,12 @@ runs:
uses: ./.github/actions/artifact_upload uses: ./.github/actions/artifact_upload
with: with:
path: > path: >
benchmarks/constellation-${{ inputs.attestationVariant }}.json benchmarks/constellation-${{ inputs.cloudProvider }}.json
name: "benchmarks-${{ inputs.artifactNameSuffix }}" name: "benchmarks-${{ inputs.artifactNameSuffix }}"
encryptionSecret: ${{ inputs.encryptionSecret }} encryptionSecret: ${{ inputs.encryptionSecret }}
- name: Assume AWS role to retrieve and update benchmarks in S3 - name: Assume AWS role to retrieve and update benchmarks in S3
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionUpdateBenchmarks role-to-assume: arn:aws:iam::795746500882:role/GithubActionUpdateBenchmarks
aws-region: us-east-2 aws-region: us-east-2
@ -179,10 +166,12 @@ runs:
- name: Get previous benchmark records from S3 - name: Get previous benchmark records from S3
shell: bash shell: bash
env:
CSP: ${{ inputs.cloudProvider }}
run: | run: |
if aws s3 cp "${S3_PATH}/constellation-${{ inputs.attestationVariant }}.json" ./ --no-progress aws s3 cp --recursive ${S3_PATH} ./ --no-progress
then if [[ -f constellation-${CSP}.json ]]; then
mv "constellation-${{ inputs.attestationVariant }}.json" "benchmarks/constellation-${{ inputs.attestationVariant }}-previous.json" mv constellation-${CSP}.json benchmarks/constellation-${CSP}-previous.json
else else
echo "::warning::Couldn't retrieve previous benchmark records from s3" echo "::warning::Couldn't retrieve previous benchmark records from s3"
fi fi
@ -191,15 +180,15 @@ runs:
shell: bash shell: bash
env: env:
# Paths to benchmark results as JSON of the previous run and the current run # Paths to benchmark results as JSON of the previous run and the current run
PREV_BENCH: benchmarks/constellation-${{ inputs.attestationVariant }}-previous.json PREV_BENCH: benchmarks/constellation-${{ inputs.cloudProvider }}-previous.json
CURR_BENCH: benchmarks/constellation-${{ inputs.attestationVariant }}.json CURR_BENCH: benchmarks/constellation-${{ inputs.cloudProvider }}.json
run: | run: |
if [[ -f "$PREV_BENCH" ]]; then if [[ -f "$PREV_BENCH" ]]; then
# Fails if the results are outside the threshold range # Fails if the results are outside the threshold range
python .github/actions/e2e_benchmark/evaluate/compare.py >> $GITHUB_STEP_SUMMARY python .github/actions/e2e_benchmark/evaluate/compare.py >> $GITHUB_STEP_SUMMARY
fi fi
- name: Upload benchmark results to OpenSearch - name: Upload benchmark results to opensearch
if: (!env.ACT) if: (!env.ACT)
shell: bash shell: bash
env: env:
@ -209,12 +198,14 @@ runs:
run: | run: |
curl -XPOST \ curl -XPOST \
-u "${OPENSEARCH_USER}:${OPENSEARCH_PWD}" \ -u "${OPENSEARCH_USER}:${OPENSEARCH_PWD}" \
"${OPENSEARCH_DOMAIN}/benchmarks-${{ inputs.attestationVariant }}-$(date '+%Y')"/_doc \ "${OPENSEARCH_DOMAIN}/benchmarks-${{ inputs.cloudProvider }}-$(date '+%Y')"/_doc \
--data-binary @benchmarks/constellation-${{ inputs.attestationVariant }}.json \ --data-binary @benchmarks/constellation-${{ inputs.cloudProvider }}.json \
-H 'Content-Type: application/json' -H 'Content-Type: application/json'
- name: Update benchmark records in S3 - name: Update benchmark records in S3
if: github.ref_name == 'main' if: github.ref_name == 'main'
shell: bash shell: bash
env:
CSP: ${{ inputs.cloudProvider }}
run: | run: |
aws s3 cp benchmarks/constellation-${{ inputs.attestationVariant }}.json ${S3_PATH}/constellation-${{ inputs.attestationVariant }}.json aws s3 cp benchmarks/constellation-${CSP}.json ${S3_PATH}/constellation-${CSP}.json

View File

@ -94,18 +94,18 @@ class BenchmarkComparer:
raise ValueError('Failed reading benchmark file: {e}'.format(e=e)) raise ValueError('Failed reading benchmark file: {e}'.format(e=e))
try: try:
name = bench_curr['attestationVariant'] name = bench_curr['provider']
except KeyError: except KeyError:
raise ValueError( raise ValueError(
'Current benchmark record file does not contain attestationVariant.') 'Current benchmark record file does not contain provider.')
try: try:
prev_name = bench_prev['attestationVariant'] prev_name = bench_prev['provider']
except KeyError: except KeyError:
raise ValueError( raise ValueError(
'Previous benchmark record file does not contain attestationVariant.') 'Previous benchmark record file does not contain provider.')
if name != prev_name: if name != prev_name:
raise ValueError( raise ValueError(
'Cloud attestationVariants of previous and current benchmark data do not match.') 'Cloud providers of previous and current benchmark data do not match.')
if 'fio' not in bench_prev.keys() or 'fio' not in bench_curr.keys(): if 'fio' not in bench_prev.keys() or 'fio' not in bench_curr.keys():
raise ValueError('Benchmarks do not both contain fio records.') raise ValueError('Benchmarks do not both contain fio records.')

View File

@ -7,7 +7,7 @@ from datetime import datetime
from evaluators import fio, knb from evaluators import fio, knb
def configure() -> Tuple[str, str, str, str, str | None, str, str, str, str]: def configure() -> Tuple[str, str, str, str | None, str, str, str, str]:
"""Read the benchmark data paths. """Read the benchmark data paths.
Expects ENV vars (required): Expects ENV vars (required):
@ -25,29 +25,27 @@ def configure() -> Tuple[str, str, str, str, str | None, str, str, str, str]:
""" """
base_path = os.environ.get('BENCH_RESULTS', None) base_path = os.environ.get('BENCH_RESULTS', None)
csp = os.environ.get('CSP', None) csp = os.environ.get('CSP', None)
attestation_variant = os.environ.get('ATTESTATION_VARIANT', None)
out_dir = os.environ.get('BDIR', None) out_dir = os.environ.get('BDIR', None)
if not base_path or not csp or not out_dir or not attestation_variant: if not base_path or not csp or not out_dir:
raise TypeError( raise TypeError(
'ENV variables BENCH_RESULTS, CSP, BDIR, ATTESTATION_VARIANT are required.') 'ENV variables BENCH_RESULTS, CSP, BDIR are required.')
ext_provider_name = os.environ.get('EXT_NAME', None) ext_provider_name = os.environ.get('EXT_NAME', None)
commit_hash = os.environ.get('GITHUB_SHA', 'N/A') commit_hash = os.environ.get('GITHUB_SHA', 'N/A')
commit_ref = os.environ.get('GITHUB_REF_NAME', 'N/A') commit_ref = os.environ.get('GITHUB_REF_NAME', 'N/A')
actor = os.environ.get('GITHUB_ACTOR', 'N/A') actor = os.environ.get('GITHUB_ACTOR', 'N/A')
workflow = os.environ.get('GITHUB_WORKFLOW', 'N/A') workflow = os.environ.get('GITHUB_WORKFLOW', 'N/A')
return base_path, csp, attestation_variant, out_dir, ext_provider_name, commit_hash, commit_ref, actor, workflow return base_path, csp, out_dir, ext_provider_name, commit_hash, commit_ref, actor, workflow
class BenchmarkParser: class BenchmarkParser:
def __init__(self, base_path, csp, attestation_variant, out_dir, ext_provider_name=None, commit_hash="N/A", commit_ref="N/A", actor="N/A", workflow="N/A"): def __init__(self, base_path, csp, out_dir, ext_provider_name=None, commit_hash="N/A", commit_ref="N/A", actor="N/A", workflow="N/A"):
self.base_path = base_path self.base_path = base_path
self.csp = csp self.csp = csp
self.attestation_variant = attestation_variant
self.out_dir = out_dir self.out_dir = out_dir
self.ext_provider_name = ext_provider_name self.ext_provider_name = ext_provider_name
if not self.ext_provider_name: if not self.ext_provider_name:
self.ext_provider_name = f'constellation-{attestation_variant}' self.ext_provider_name = f'constellation-{csp}'
self.commit_hash = commit_hash self.commit_hash = commit_hash
self.commit_ref = commit_ref self.commit_ref = commit_ref
self.actor = actor self.actor = actor
@ -90,7 +88,6 @@ class BenchmarkParser:
}, },
'@timestamp': str(timestamp), '@timestamp': str(timestamp),
'provider': self.ext_provider_name, 'provider': self.ext_provider_name,
'attestationVariant': self.attestation_variant,
'fio': {}, 'fio': {},
'knb': {}} 'knb': {}}
@ -104,8 +101,8 @@ class BenchmarkParser:
def main(): def main():
base_path, csp, attestation_variant, out_dir, ext_provider_name, commit_hash, commit_ref, actor, workflow = configure() base_path, csp, out_dir, ext_provider_name, commit_hash, commit_ref, actor, workflow = configure()
p = BenchmarkParser(base_path, csp, attestation_variant, out_dir, ext_provider_name, p = BenchmarkParser(base_path, csp, out_dir, ext_provider_name,
commit_hash, commit_ref, actor, workflow) commit_hash, commit_ref, actor, workflow)
p.parse() p.parse()

View File

@ -1,3 +1,3 @@
numpy ==2.2.4 numpy ==1.26.4
matplotlib ==3.10.1 matplotlib ==3.8.3
Pillow ==11.2.1 Pillow ==10.2.0

View File

@ -7,7 +7,7 @@ size=10Gi
time_based=1 time_based=1
group_reporting group_reporting
thread thread
cpus_allowed=0 cpus_allowed=1
[read_iops] [read_iops]

View File

@ -1,62 +0,0 @@
name: E2E cleanup over timeframe
description: Clean up old terraform resources of E2E tests
inputs:
ghToken:
description: 'The github token that is used with the github CLI.'
required: true
encryptionSecret:
description: 'The secret to use for decrypting the artifacts.'
required: true
azure_credentials:
description: "Credentials authorized to create Constellation on Azure."
required: true
openStackCloudsYaml:
description: "The contents of ~/.config/openstack/clouds.yaml"
required: false
stackitUat:
description: "The UAT for STACKIT"
required: false
runs:
using: "composite"
steps:
- name: Authenticate AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EDestroy
aws-region: eu-central-1
- name: Authenticate Azure
uses: ./.github/actions/login_azure
with:
azure_credentials: ${{ inputs.azure_credentials }}
- name: Authenticate GCP
uses: ./.github/actions/login_gcp
with:
service_account: "destroy-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Login to OpenStack
uses: ./.github/actions/login_openstack
with:
clouds_yaml: ${{ inputs.openStackCloudsYaml }}
- name: Login to STACKIT
uses: ./.github/actions/login_stackit
with:
serviceAccountToken: ${{ inputs.stackitUat }}
- name: Install tools
uses: ./.github/actions/setup_bazel_nix
with:
nixTools: |
_7zz
terraform
- name: Run cleanup
run: ./.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh
shell: bash
env:
GH_TOKEN: ${{ inputs.ghToken }}
ENCRYPTION_SECRET: ${{ inputs.encryptionSecret }}

View File

@ -1,97 +0,0 @@
#!/bin/bash
# get_e2e_test_ids_on_date gets all workflow IDs of workflows that contain "e2e" on a specific date.
function get_e2e_test_ids_on_date {
ids="$(gh run list --created "$1" --status failure --json createdAt,workflowName,databaseId --jq '.[] | select(.workflowName | contains("e2e") and (contains("MiniConstellation") | not)) | .databaseId' -L1000 -R edgelesssys/constellation || exit 1)"
echo "${ids}"
}
# download_tfstate_artifact downloads all artifacts matching the pattern terraform-state-* from a given workflow ID.
function download_tfstate_artifact {
gh run download "$1" -p "terraform-state-*" -R edgelesssys/constellation > /dev/null
}
# delete_resources runs terraform destroy on the constellation-terraform subfolder of a given folder.
function delete_resources {
if [[ -d "$1/constellation-terraform" ]]; then
cd "$1/constellation-terraform" || exit 1
terraform init > /dev/null || exit 1 # first, install plugins
terraform destroy -auto-approve || exit 1
cd ../../ || exit 1
fi
}
# delete_iam_config runs terraform destroy on the constellation-iam-terraform subfolder of a given folder.
function delete_iam_config {
if [[ -d "$1/constellation-iam-terraform" ]]; then
cd "$1/constellation-iam-terraform" || exit 1
terraform init > /dev/null || exit 1 # first, install plugins
terraform destroy -auto-approve || exit 1
cd ../../ || exit 1
fi
}
# check if the password for artifact decryption was given
if [[ -z ${ENCRYPTION_SECRET} ]]; then
echo "ENCRYPTION_SECRET is not set. Please set an environment variable with that secret."
exit 1
fi
artifact_pwd=${ENCRYPTION_SECRET}
shopt -s nullglob
start_date=$(date "+%Y-%m-%d")
end_date=$(date --date "-7 day" "+%Y-%m-%d")
dates_to_clean=()
# get all dates of the last week
while [[ ${end_date} != "${start_date}" ]]; do
dates_to_clean+=("${end_date}")
end_date=$(date --date "${end_date} +1 day" "+%Y-%m-%d")
done
echo "[*] retrieving run IDs for cleanup"
database_ids=()
for d in "${dates_to_clean[@]}"; do
echo " retrieving run IDs from $d"
mapfile -td " " tmp < <(get_e2e_test_ids_on_date "$d")
database_ids+=("${tmp[*]}")
done
# cleanup database_ids
mapfile -t database_ids < <(echo "${database_ids[@]}")
mapfile -td " " database_ids < <(echo "${database_ids[@]}")
echo "[*] downloading terraform state artifacts"
for id in "${database_ids[@]}"; do
if [[ ${id} == *[^[:space:]]* ]]; then
echo " downloading from workflow ${id}"
download_tfstate_artifact "${id}"
fi
done
echo "[*] extracting artifacts"
for directory in ./terraform-state-*; do
echo " extracting ${directory}"
# extract and decrypt the artifact
7zz x -t7z -p"${artifact_pwd}" -o"${directory}" "${directory}/archive.7z" > /dev/null || exit 1
done
# create terraform caching directory
mkdir "${HOME}/tf_plugin_cache"
export TF_PLUGIN_CACHE_DIR="${HOME}/tf_plugin_cache"
echo "[*] created terraform cache directory ${TF_PLUGIN_CACHE_DIR}"
echo "[*] deleting resources"
for directory in ./terraform-state-*; do
echo " deleting resources in ${directory}"
delete_resources "${directory}"
echo " deleting IAM configuration in ${directory}"
delete_iam_config "${directory}"
echo " deleting directory ${directory}"
rm -rf "${directory}"
done
exit 0

View File

@ -1,68 +0,0 @@
name: Emergency ssh
description: "Verify that an emergency ssh connection can be established."
inputs:
kubeconfig:
description: "The kubeconfig file for the cluster."
required: true
runs:
using: "composite"
steps:
- name: Test emergency ssh
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: |
set -euo pipefail
# Activate emergency ssh access to the cluster
pushd ./constellation-terraform
echo "emergency_ssh = true" >> terraform.tfvars
terraform apply -auto-approve
lb="$(terraform output -raw loadbalancer_address)"
popd
# write ssh config
cat > ssh_config <<EOF
Host $lb
ProxyJump none
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
IdentityFile ./access-key
PreferredAuthentications publickey
CertificateFile=constellation_cert.pub
User root
ProxyJump $lb
EOF
for i in {1..26}; do
if [[ "$i" -eq 26 ]]; then
echo "Port 22 never became reachable"
exit 1
fi
echo "Waiting until port 22 is reachable: $i/25"
if nc -z -w 25 "$lb" 22; then
break
fi
done
# generate and try keypair
ssh-keygen -t ecdsa -q -N "" -f ./access-key
constellation ssh --debug --key ./access-key.pub
internalIPs="$(kubectl get nodes -o=jsonpath='{.items[*].status.addresses}' | jq -r '.[] | select(.type == "InternalIP") | .address')"
for ip in $internalIPs; do
for i in {1..26}; do
if [[ "$i" -eq 26 ]]; then
echo "Failed to connect to $ip over $lb"
exit 1
fi
echo "Trying connection to $ip over $lb: $i/25"
if ssh -F ssh_config -o BatchMode=yes $ip true; then
echo "Connected to $ip successfully"
break
fi
done
done

View File

@ -5,9 +5,6 @@ inputs:
kubeconfig: kubeconfig:
description: "The kubeconfig of the cluster to test." description: "The kubeconfig of the cluster to test."
required: true required: true
cloudProvider:
description: "The CSP this test runs on. Some tests exercise functionality not supported everywhere."
required: false
runs: runs:
using: "composite" using: "composite"
@ -21,25 +18,7 @@ runs:
run: | run: |
kubectl apply -f ns.yml kubectl apply -f ns.yml
kubectl apply -f lb.yml kubectl apply -f lb.yml
bazel run --test_timeout=14400 //e2e/internal/lb:lb_test bazel run //e2e/internal/lb:lb_test
- name: Test AWS Ingress
if: inputs.cloudProvider == 'aws'
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
working-directory: ./.github/actions/e2e_lb
run: |
kubectl apply -f aws-ingress.yml
kubectl wait -n lb-test ing/whoami --for=jsonpath='{.status.loadBalancer.ingress}' --timeout=5m
host=$(kubectl get -n lb-test ingress whoami -o=jsonpath='{.status.loadBalancer.ingress[0].hostname}')
for i in $(seq 30); do
curl --silent --fail --connect-timeout 5 --output /dev/null http://$host && exit 0
sleep 10
done
echo "::error::Ingress did not become ready in the alloted time."
kubectl describe ing -n lb-test
exit 1
- name: Delete deployment - name: Delete deployment
if: always() if: always()
@ -49,5 +28,4 @@ runs:
working-directory: ./.github/actions/e2e_lb working-directory: ./.github/actions/e2e_lb
run: | run: |
kubectl delete -f lb.yml kubectl delete -f lb.yml
kubectl delete --ignore-not-found -f aws-ingress.yml
kubectl delete -f ns.yml --timeout=5m kubectl delete -f ns.yml --timeout=5m

View File

@ -1,35 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: whoami-internal
namespace: lb-test
spec:
selector:
app: whoami
ports:
- port: 80
targetPort: 80
type: NodePort
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: lb-test
name: whoami
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: instance
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: whoami-internal
port:
number: 80

View File

@ -32,7 +32,7 @@ runs:
KUBECONFIG: ${{ inputs.kubeconfig }} KUBECONFIG: ${{ inputs.kubeconfig }}
working-directory: e2e/malicious-join working-directory: e2e/malicious-join
run: | run: |
bazel run --test_timeout=14400 //e2e/malicious-join:stamp_and_push bazel run //e2e/malicious-join:stamp_and_push
yq eval -i "(.spec.template.spec.containers[0].command) = \ yq eval -i "(.spec.template.spec.containers[0].command) = \
[ \"/malicious-join_bin\", \ [ \"/malicious-join_bin\", \
\"--js-endpoint=join-service.kube-system:9090\", \ \"--js-endpoint=join-service.kube-system:9090\", \

View File

@ -11,8 +11,8 @@ inputs:
azureTenantID: azureTenantID:
description: "Azure tenant to use for login with OIDC" description: "Azure tenant to use for login with OIDC"
required: true required: true
azureIAMCredentials: buildBuddyApiKey:
description: "Azure IAM credentials used for cleaning up resources" description: "BuildBuddy API key for caching Bazel artifacts"
required: true required: true
registry: registry:
description: "Container registry to use" description: "Container registry to use"
@ -25,12 +25,15 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Install terraform - name: Install terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
with: with:
terraform_wrapper: false terraform_wrapper: false
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
- name: Log in to the Container registry - name: Log in to the Container registry
uses: ./.github/actions/container_registry_login uses: ./.github/actions/container_registry_login
@ -41,25 +44,9 @@ runs:
- name: MiniConstellation E2E - name: MiniConstellation E2E
shell: bash shell: bash
id: e2e-test
env: env:
ARM_CLIENT_ID: ${{ inputs.azureClientID }} ARM_CLIENT_ID: ${{ inputs.azureClientID }}
ARM_SUBSCRIPTION_ID: ${{ inputs.azureSubscriptionID }} ARM_SUBSCRIPTION_ID: ${{ inputs.azureSubscriptionID }}
ARM_TENANT_ID: ${{ inputs.azureTenantID }} ARM_TENANT_ID: ${{ inputs.azureTenantID }}
run: | run: |
bazel run --test_timeout=14400 //e2e/miniconstellation:push_remote_test bazel run //e2e/miniconstellation:push_remote_test
- name: Log in to azure
# only log in if e2e test failed or if the run was cancelled
if: (failure() && steps.e2e-test.conclusion == 'failure') || cancelled()
uses: ./.github/actions/login_azure
with:
azure_credentials: ${{ inputs.azureIAMCredentials }}
- name: Clean up after failure
shell: bash
# clean up if e2e test failed or if the run was cancelled
if: (failure() && steps.e2e-test.conclusion == 'failure') || cancelled()
run: |
echo "[*] Deleting resource group ${{ steps.e2e-test.outputs.rgname }}"
az group delete -y --resource-group "${{ steps.e2e-test.outputs.rgname }}"

View File

@ -11,6 +11,9 @@ inputs:
s3SecretKey: s3SecretKey:
description: "Secret key for s3proxy" description: "Secret key for s3proxy"
required: true required: true
buildBuddyApiKey:
description: "BuildBuddy API key"
required: true
githubToken: githubToken:
description: "GitHub token" description: "GitHub token"
required: true required: true
@ -20,6 +23,9 @@ runs:
steps: steps:
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
- name: Get pseudoversion - name: Get pseudoversion
id: pseudoversion id: pseudoversion

View File

@ -48,12 +48,6 @@ runs:
sonobuoy results *_sonobuoy_*.tar.gz sonobuoy results *_sonobuoy_*.tar.gz
sonobuoy results *_sonobuoy_*.tar.gz --mode detailed | jq 'select(.status!="passed")' | jq 'select(.status!="skipped")' || true sonobuoy results *_sonobuoy_*.tar.gz --mode detailed | jq 'select(.status!="passed")' | jq 'select(.status!="skipped")' || true
- name: Cleanup sonobuoy deployment
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
shell: bash
run: sonobuoy delete --wait
- name: Upload test results - name: Upload test results
if: always() && !env.ACT if: always() && !env.ACT
uses: ./.github/actions/artifact_upload uses: ./.github/actions/artifact_upload
@ -70,7 +64,7 @@ runs:
- name: Publish test results - name: Publish test results
if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e') if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e')
uses: mikepenz/action-junit-report@cf701569b05ccdd861a76b8607a66d76f6fd4857 # v5.5.1 uses: mikepenz/action-junit-report@5f47764eec0e1c1f19f40c8e60a5ba47e47015c5 # v4.1.0
with: with:
report_paths: "**/junit_01.xml" report_paths: "**/junit_01.xml"
fail_on_failure: true fail_on_failure: true

View File

@ -46,9 +46,6 @@ inputs:
description: "AWS OpenSearch User to upload the benchmark results." description: "AWS OpenSearch User to upload the benchmark results."
awsOpenSearchPwd: awsOpenSearchPwd:
description: "AWS OpenSearch Password to upload the benchmark results." description: "AWS OpenSearch Password to upload the benchmark results."
azureSubscriptionID:
description: "Azure subscription ID to deploy Constellation in."
required: true
azureClusterCreateCredentials: azureClusterCreateCredentials:
description: "Azure credentials authorized to create a Constellation cluster." description: "Azure credentials authorized to create a Constellation cluster."
required: true required: true
@ -56,10 +53,12 @@ inputs:
description: "Azure credentials authorized to create an IAM configuration." description: "Azure credentials authorized to create an IAM configuration."
required: true required: true
test: test:
description: "The test to run. Can currently be one of [sonobuoy full, sonobuoy quick, sonobuoy conformance, autoscaling, lb, perf-bench, verify, recover, malicious join, nop, upgrade, emergency ssh]." description: "The test to run. Can currently be one of [sonobuoy full, sonobuoy quick, autoscaling, lb, perf-bench, verify, recover, malicious join, nop, upgrade]."
required: true required: true
sonobuoyTestSuiteCmd: sonobuoyTestSuiteCmd:
description: "The sonobuoy test suite to run." description: "The sonobuoy test suite to run."
buildBuddyApiKey:
description: "BuildBuddy API key for caching Bazel artifacts"
registry: registry:
description: "Container registry to use" description: "Container registry to use"
required: true required: true
@ -91,17 +90,8 @@ inputs:
description: "Set the force-flag on apply to ignore version mismatches." description: "Set the force-flag on apply to ignore version mismatches."
required: false required: false
encryptionSecret: encryptionSecret:
description: "The secret to use for decrypting the artifact." description: 'The secret to use for decrypting the artifact.'
required: true required: true
openStackCloudsYaml:
description: "The contents of ~/.config/openstack/clouds.yaml"
required: false
stackitUat:
description: "The UAT for STACKIT"
required: false
stackitProjectID:
description: "The STACKIT project ID to deploy Constellation in."
required: false
outputs: outputs:
kubeconfig: kubeconfig:
@ -115,7 +105,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Check input - name: Check input
if: (!contains(fromJson('["sonobuoy full", "sonobuoy quick", "sonobuoy conformance", "autoscaling", "perf-bench", "verify", "lb", "recover", "malicious join", "s3proxy", "nop", "upgrade", "emergency ssh"]'), inputs.test)) if: (!contains(fromJson('["sonobuoy full", "sonobuoy quick", "autoscaling", "perf-bench", "verify", "lb", "recover", "malicious join", "s3proxy", "nop", "upgrade"]'), inputs.test))
shell: bash shell: bash
run: | run: |
echo "::error::Invalid input for test field: ${{ inputs.test }}" echo "::error::Invalid input for test field: ${{ inputs.test }}"
@ -150,7 +140,8 @@ runs:
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with: with:
nixTools: terraform useCache: ${{ inputs.buildBuddyApiKey != '' }}
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
- name: Log in to the Container registry - name: Log in to the Container registry
uses: ./.github/actions/container_registry_login uses: ./.github/actions/container_registry_login
@ -178,6 +169,8 @@ runs:
echo "$(pwd)" >> $GITHUB_PATH echo "$(pwd)" >> $GITHUB_PATH
export PATH="$PATH:$(pwd)" export PATH="$PATH:$(pwd)"
constellation version constellation version
# Do not spam license server from pipeline
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts'
- name: Build Terraform provider binary - name: Build Terraform provider binary
if: inputs.clusterCreation == 'terraform' && inputs.cliVersion == '' if: inputs.clusterCreation == 'terraform' && inputs.cliVersion == ''
@ -227,7 +220,7 @@ runs:
- name: Login to AWS (IAM role) - name: Login to AWS (IAM role)
if: inputs.cloudProvider == 'aws' if: inputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM
aws-region: eu-central-1 aws-region: eu-central-1
@ -240,30 +233,12 @@ runs:
with: with:
azure_credentials: ${{ inputs.azureIAMCreateCredentials }} azure_credentials: ${{ inputs.azureIAMCreateCredentials }}
- name: Login to OpenStack
if: inputs.cloudProvider == 'stackit'
uses: ./.github/actions/login_openstack
with:
clouds_yaml: ${{inputs.openStackCloudsYaml }}
- name: Login to STACKIT
if: inputs.cloudProvider == 'stackit'
uses: ./.github/actions/login_stackit
with:
serviceAccountToken: ${{ inputs.stackitUat }}
- name: Create prefix - name: Create prefix
id: create-prefix id: create-prefix
shell: bash shell: bash
run: | run: |
uuid=$(uuidgen | tr "[:upper:]" "[:lower:]") uuid=$(uuidgen | tr "[:upper:]" "[:lower:]")
uuid=${uuid%%-*} uuid=${uuid%%-*}
# GCP has a 6 character limit the additional uuid prefix since the full prefix length has a maximum of 24
if [[ ${{ inputs.cloudProvider }} == 'gcp' ]]; then
uuid=${uuid:0:6}
fi
echo "uuid=${uuid}" | tee -a $GITHUB_OUTPUT echo "uuid=${uuid}" | tee -a $GITHUB_OUTPUT
echo "prefix=e2e-${{ github.run_id }}-${{ github.run_attempt }}-${uuid}" | tee -a $GITHUB_OUTPUT echo "prefix=e2e-${{ github.run_id }}-${{ github.run_attempt }}-${uuid}" | tee -a $GITHUB_OUTPUT
@ -273,7 +248,7 @@ runs:
with: with:
attestationVariant: ${{ inputs.attestationVariant }} attestationVariant: ${{ inputs.attestationVariant }}
- name: Create Constellation config and IAM - name: Create IAM configuration
id: constellation-iam-create id: constellation-iam-create
uses: ./.github/actions/constellation_iam_create uses: ./.github/actions/constellation_iam_create
with: with:
@ -281,14 +256,10 @@ runs:
attestationVariant: ${{ inputs.attestationVariant }} attestationVariant: ${{ inputs.attestationVariant }}
namePrefix: ${{ steps.create-prefix.outputs.prefix }} namePrefix: ${{ steps.create-prefix.outputs.prefix }}
awsZone: ${{ inputs.regionZone || 'us-east-2c' }} awsZone: ${{ inputs.regionZone || 'us-east-2c' }}
azureSubscriptionID: ${{ inputs.azureSubscriptionID }}
azureRegion: ${{ inputs.regionZone || steps.pick-az-region.outputs.region }} azureRegion: ${{ inputs.regionZone || steps.pick-az-region.outputs.region }}
gcpProjectID: ${{ inputs.gcpProject }} gcpProjectID: ${{ inputs.gcpProject }}
gcpZone: ${{ inputs.regionZone || 'europe-west3-b' }} gcpZone: ${{ inputs.regionZone || 'europe-west3-b' }}
stackitZone: ${{ inputs.regionZone || 'eu01-2' }}
stackitProjectID: ${{ inputs.stackitProjectID }}
kubernetesVersion: ${{ inputs.kubernetesVersion }} kubernetesVersion: ${{ inputs.kubernetesVersion }}
additionalTags: "workflow=${{ github.run_id }}"
- name: Login to GCP (Cluster service account) - name: Login to GCP (Cluster service account)
if: inputs.cloudProvider == 'gcp' if: inputs.cloudProvider == 'gcp'
@ -298,7 +269,7 @@ runs:
- name: Login to AWS (Cluster role) - name: Login to AWS (Cluster role)
if: inputs.cloudProvider == 'aws' if: inputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster
aws-region: eu-central-1 aws-region: eu-central-1
@ -360,7 +331,7 @@ runs:
if: (inputs.test == 'nop') || (inputs.test == 'upgrade') if: (inputs.test == 'nop') || (inputs.test == 'upgrade')
shell: bash shell: bash
run: | run: |
echo "This test has a nop payload. It doesn't run any tests." echo "::warning::This test has a nop payload. It doesn't run any tests."
echo "Sleeping for 30 seconds to allow logs to propagate to the log collection service." echo "Sleeping for 30 seconds to allow logs to propagate to the log collection service."
sleep 30 sleep 30
@ -383,15 +354,6 @@ runs:
artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }} artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }}
encryptionSecret: ${{ inputs.encryptionSecret }} encryptionSecret: ${{ inputs.encryptionSecret }}
- name: Run sonobuoy conformance
if: inputs.test == 'sonobuoy conformance'
uses: ./.github/actions/e2e_sonobuoy
with:
sonobuoyTestSuiteCmd: "--plugin e2e --mode certified-conformance"
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }}
encryptionSecret: ${{ inputs.encryptionSecret }}
- name: Run autoscaling test - name: Run autoscaling test
if: inputs.test == 'autoscaling' if: inputs.test == 'autoscaling'
uses: ./.github/actions/e2e_autoscaling uses: ./.github/actions/e2e_autoscaling
@ -403,7 +365,6 @@ runs:
uses: ./.github/actions/e2e_lb uses: ./.github/actions/e2e_lb
with: with:
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }} kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
cloudProvider: ${{ inputs.cloudProvider }}
- name: Run Performance Benchmark - name: Run Performance Benchmark
if: inputs.test == 'perf-bench' if: inputs.test == 'perf-bench'
@ -451,10 +412,5 @@ runs:
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }} kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
s3AccessKey: ${{ inputs.s3AccessKey }} s3AccessKey: ${{ inputs.s3AccessKey }}
s3SecretKey: ${{ inputs.s3SecretKey }} s3SecretKey: ${{ inputs.s3SecretKey }}
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
githubToken: ${{ inputs.githubToken }} githubToken: ${{ inputs.githubToken }}
- name: Run emergency ssh test
if: inputs.test == 'emergency ssh'
uses: ./.github/actions/e2e_emergency_ssh
with:
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}

View File

@ -66,46 +66,45 @@ runs:
forwarderPID=$! forwarderPID=$!
sleep 5 sleep 5
case "${{ inputs.attestationVariant }}" if [[ ${{ inputs.attestationVariant }} == "azure-sev-snp" ]] || [[ ${{ inputs.attestationVariant }} == "aws-sev-snp" ]]; then
in echo "Extracting TCB versions for API update"
"azure-sev-snp"|"azure-tdx"|"aws-sev-snp"|"gcp-sev-snp") constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090 -o json > "snp-report-${node}.json"
echo "Extracting TCB versions for API update" else
constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090 -o json > "attestation-report-${node}.json" constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090
;; fi
*)
constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090
;;
esac
kill $forwarderPID kill $forwarderPID
done done
- name: Login to AWS - name: Login to AWS
if: github.ref_name == 'main' if: github.ref_name == 'main'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GitHubConstellationImagePipeline role-to-assume: arn:aws:iam::795746500882:role/GitHubConstellationImagePipeline
aws-region: eu-central-1 aws-region: eu-central-1
- name: Upload extracted TCBs - name: Upload extracted TCBs
if: github.ref_name == 'main' && (inputs.attestationVariant == 'azure-sev-snp' || inputs.attestationVariant == 'azure-tdx' || inputs.attestationVariant == 'aws-sev-snp' || inputs.attestationVariant == 'gcp-sev-snp') if: github.ref_name == 'main' && (inputs.attestationVariant == 'azure-sev-snp' || inputs.attestationVariant == 'aws-sev-snp')
shell: bash shell: bash
env: env:
COSIGN_PASSWORD: ${{ inputs.cosignPassword }} COSIGN_PASSWORD: ${{ inputs.cosignPassword }}
COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }} COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }}
run: | run: |
reports=attestation-report-*.json if [[ ${{ inputs.attestationVariant }} == "aws-sev-snp" ]] && constellation version | grep -q "v2.13."; then
echo "Skipping TCB upload for AWS on CLI v2.13"
exit 0
fi
# bazel run changes the working directory reports=(snp-report-*.json)
# convert the relative paths to absolute paths to avoid issues if [ -z ${#reports[@]} ]; then
absolute_reports="" exit 1
for report in ${reports}; do fi
absolute_reports="${absolute_reports} $(realpath "${report}")"
attestationVariant=${{ inputs.attestationVariant }}
cloudProvider=${attestationVariant%%-*}
for file in "${reports[@]}"; do
path=$(realpath "${file}")
cat "${path}"
bazel run //internal/api/attestationconfigapi/cli -- upload "${cloudProvider}" snp-report "${path}"
done done
report=$(bazel run //internal/api/attestationconfigapi/cli -- compare ${{ inputs.attestationVariant }} ${absolute_reports})
path=$(realpath "${report}")
cat "${path}"
bazel run //internal/api/attestationconfigapi/cli -- upload ${{ inputs.attestationVariant }} attestation-report "${path}"

View File

@ -26,25 +26,23 @@ runs:
steps: steps:
- name: Checkout head - name: Checkout head
if: inputs.imageVersion == '' && inputs.git-ref == 'head' if: inputs.imageVersion == '' && inputs.git-ref == 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref - name: Checkout ref
if: inputs.imageVersion == '' && inputs.git-ref != 'head' if: inputs.imageVersion == '' && inputs.git-ref != 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.git-ref }} ref: ${{ inputs.git-ref }}
- name: Login to AWS - name: Login to AWS
if: inputs.imageVersion == '' if: inputs.imageVersion == ''
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
aws-region: eu-central-1 aws-region: eu-central-1
- uses: ./.github/actions/setup_bazel_nix
- name: Find latest image - name: Find latest image
id: find-latest-image id: find-latest-image
if: inputs.imageVersion == '' if: inputs.imageVersion == ''

View File

@ -82,4 +82,4 @@ for major in "${allMajorVersions[@]}"; do
done done
# Print one elem per line | quote elems | create array | remove empty elems and print compact. # Print one elem per line | quote elems | create array | remove empty elems and print compact.
printf '%s\n' "${versionsToBuild[@]}" | jq -R | jq -s | jq -c 'map(select(length > 0))' printf '%s' "${versionsToBuild[@]}" | jq -R | jq -s | jq -c 'map(select(length > 0))'

View File

@ -10,6 +10,6 @@ runs:
# As described at: # As described at:
# https://github.com/Azure/login#configure-deployment-credentials # https://github.com/Azure/login#configure-deployment-credentials
- name: Login to Azure - name: Login to Azure
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d # v1.6.1
with: with:
creds: ${{ inputs.azure_credentials }} creds: ${{ inputs.azure_credentials }}

View File

@ -20,11 +20,11 @@ runs:
echo "GOOGLE_CLOUD_PROJECT=" >> "$GITHUB_ENV" echo "GOOGLE_CLOUD_PROJECT=" >> "$GITHUB_ENV"
- name: Authorize GCP access - name: Authorize GCP access
uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8 uses: google-github-actions/auth@a6e2e39c0a0331da29f7fd2c2a20a427e8d3ad1f # v2.1.1
with: with:
workload_identity_provider: projects/1052692473304/locations/global/workloadIdentityPools/constellation-ci-pool/providers/constellation-ci-provider workload_identity_provider: projects/796962942582/locations/global/workloadIdentityPools/constellation-ci-pool/providers/constellation-ci-provider
service_account: ${{ inputs.service_account }} service_account: ${{ inputs.service_account }}
# Even if preinstalled in Github Actions runner image, this setup does some magic authentication required for gsutil. # Even if preinstalled in Github Actions runner image, this setup does some magic authentication required for gsutil.
- name: Set up Cloud SDK - name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4 uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0

View File

@ -1,16 +0,0 @@
name: STACKIT login
description: "Login to STACKIT"
inputs:
serviceAccountToken:
description: "Credentials authorized to create Constellation on STACKIT."
required: true
runs:
using: "composite"
steps:
- name: Login to STACKIT
env:
UAT: ${{ inputs.serviceAccountToken }}
shell: bash
run: |
mkdir -p ~/.stackit
echo "${UAT}" > ~/.stackit/credentials.json

View File

@ -36,6 +36,12 @@ runs:
shell: bash shell: bash
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV run: echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Encode URI component
uses: Ablestor/encode-uri-component-action@790ea01bcf2d5ca4d0dbe8c15351a87b47f22f61 # v1.3
id: encode-uri-component
with:
string: ${{ inputs.test }}
- name: Create body template - name: Create body template
id: body-template id: body-template
shell: bash shell: bash
@ -63,15 +69,13 @@ runs:
fi fi
} }
e2eTestPayload=$(echo "${{ inputs.test }}" | jq -R -r @uri)
q=$(echo "(filters:!( q=$(echo "(filters:!(
$(queryGen cloud.provider "${{ inputs.provider }}") $(queryGen cloud.provider "${{ inputs.provider }}")
$(queryGen metadata.github.ref-stream "${{ inputs.refStream }}") $(queryGen metadata.github.ref-stream "${{ inputs.refStream }}")
$(queryGen metadata.github.kubernetes-version "${{ inputs.kubernetesVersion }}") $(queryGen metadata.github.kubernetes-version "${{ inputs.kubernetesVersion }}")
$(queryGen metadata.github.attestation-variant "${{ inputs.attestationVariant }}") $(queryGen metadata.github.attestation-variant "${{ inputs.attestationVariant }}")
$(queryGen metadata.github.cluster-creation "${{ inputs.clusterCreation }}") $(queryGen metadata.github.cluster-creation "${{ inputs.clusterCreation }}")
$(queryGen metadata.github.e2e-test-payload "${e2eTestPayload}") $(queryGen metadata.github.e2e-test-payload "${{ steps.encode-uri-component.outputs.string }}")
(query:(match_phrase:(metadata.github.run-id:${{ github.run_id }}))) (query:(match_phrase:(metadata.github.run-id:${{ github.run_id }})))
))" | tr -d "\t\n ") ))" | tr -d "\t\n ")

View File

@ -1,19 +0,0 @@
name: Notify STACKIT
description: "Notify STACKIT about test failure"
inputs:
slackToken:
description: "Slack access token."
required: true
runs:
using: "composite"
steps:
- name: Notify STACKIT
env:
SLACK_TOKEN: ${{ inputs.slackToken }}
shell: bash
run: |
curl -X POST \
-H "Authorization: Bearer $SLACK_TOKEN" \
-H "Content-type: application/json; charset=utf-8" \
-d "{\"channel\":\"C0827BT59SM\",\"text\":\"E2E test failed: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\"}" \
https://slack.com/api/chat.postMessage

View File

@ -1,27 +0,0 @@
# notify Teams action
This action is used to send a message to our Teams channel in case of a failure in the CI/CD pipeline.
The action will automatically choose an engineer to assign to the issue and tag them in the message.
Engineers are identified by their GitHub username and bound to a Microsoft Teams ID in `.attachments[0].content.msteams.entities`.
To add a new engineer, add a new entry to the entity list in the format:
```json
{
"type": "mention",
"text": "${github_username}",
"mentioned": {
"id": "${msteams_id}",
"name": "${name}"
}
}
```
Where `${github_username}` is the GitHub username of the engineer, `${msteams_id}` is the Microsoft Teams ID of the engineer, and `${name}` is the name of the engineer.
To find the Microsoft Teams ID use the following command:
```bash
az ad user show --id ${email} --query id
```
Where `${email}` is the email address of the engineer.

View File

@ -25,7 +25,7 @@ runs:
continue-on-error: true continue-on-error: true
shell: bash shell: bash
run: | run: |
cp .github/actions/notify_teams/teams_payload_template.json teams_payload.json cp .github/teams_payload_template.json teams_payload.json
# Add workflow name to the notification # Add workflow name to the notification
yq -oj -iP '.attachments[0].content.body[0].columns[1].items[0].text = "${{ inputs.title }}"' teams_payload.json yq -oj -iP '.attachments[0].content.body[0].columns[1].items[0].text = "${{ inputs.title }}"' teams_payload.json

View File

@ -15,6 +15,8 @@ runs:
run: | run: |
possibleAssignees=( possibleAssignees=(
"elchead" "elchead"
"malt3"
"3u13r"
"daniel-weisse" "daniel-weisse"
"msanft" "msanft"
"burgerdev" "burgerdev"

View File

@ -13,7 +13,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
repository: edgelesssys/helm repository: edgelesssys/helm
ref: main ref: main
@ -29,7 +29,7 @@ runs:
echo version=$(yq eval ".version" ${{ inputs.chartPath }}/Chart.yaml) | tee -a $GITHUB_OUTPUT echo version=$(yq eval ".version" ${{ inputs.chartPath }}/Chart.yaml) | tee -a $GITHUB_OUTPUT
- name: Create pull request - name: Create pull request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with: with:
path: helm path: helm
branch: "release/s3proxy/${{ steps.update-chart-version.outputs.version }}" branch: "release/s3proxy/${{ steps.update-chart-version.outputs.version }}"

View File

@ -3,22 +3,22 @@ description: Resolve string presets and shortpaths to shortpaths only
inputs: inputs:
osImage: osImage:
description: "Shortpath, main-debug, main-nightly, or release-stable" description: "Shortpath or main-debug or release-stable"
required: true required: true
outputs: outputs:
osImage: osImage:
description: "Shortpath of input string, original input if that was already a shortpath" description: "Shortpath of for input string, original input if that was already a shortpath"
value: ${{ steps.set-output.outputs.osImage }} value: ${{ steps.set-output.outputs.osImage }}
isDebugImage: isDebugImage:
description: "Input is a debug image or not" description: "Input represents a debug image or not"
value: ${{ steps.set-output.outputs.isDebugImage }} value: ${{ steps.set-output.outputs.isDebugImage }}
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Login to AWS - name: Login to AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
aws-region: eu-central-1 aws-region: eu-central-1
@ -27,7 +27,7 @@ runs:
id: input-is-preset id: input-is-preset
shell: bash shell: bash
run: | run: |
if [[ "${{ inputs.osImage }}" == "ref/main/stream/debug/?" || "${{ inputs.osImage }}" == "ref/main/stream/nightly/?" || "${{ inputs.osImage }}" == "ref/release/stream/stable/?" ]]; then if [[ "${{ inputs.osImage }}" == "ref/main/stream/debug/?" || "${{ inputs.osImage }}" == "ref/release/stream/stable/?" ]]; then
echo "result=true" | tee -a "$GITHUB_OUTPUT" echo "result=true" | tee -a "$GITHUB_OUTPUT"
else else
echo "result=false" | tee -a "$GITHUB_OUTPUT" echo "result=false" | tee -a "$GITHUB_OUTPUT"
@ -43,10 +43,6 @@ runs:
echo "ref=$(echo $REFSTREAM | cut -d/ -f2)" | tee -a "$GITHUB_OUTPUT" echo "ref=$(echo $REFSTREAM | cut -d/ -f2)" | tee -a "$GITHUB_OUTPUT"
echo "stream=$(echo $REFSTREAM | cut -d/ -f4)" | tee -a "$GITHUB_OUTPUT" echo "stream=$(echo $REFSTREAM | cut -d/ -f4)" | tee -a "$GITHUB_OUTPUT"
- name: Setup Bazel & Nix
if: steps.input-is-preset.outputs.result == 'true'
uses: ./.github/actions/setup_bazel_nix
- name: Find latest image - name: Find latest image
if: steps.input-is-preset.outputs.result == 'true' if: steps.input-is-preset.outputs.result == 'true'
id: find-latest-image id: find-latest-image

View File

@ -3,9 +3,12 @@ description: Setup Bazel and Nix for CI builds and tests
inputs: inputs:
useCache: useCache:
description: "Cache Bazel artifacts. Use 'rbe' to enable with remote execution, and 'false' to disable." description: "Cache Bazel artifacts. Use 'true' to enable with rw, 'readonly' to download, 'rbe' to enable with remote execution, 'log' to disable cache but upload logs, and 'false' to disable."
default: "false" default: "false"
required: true required: true
buildBuddyApiKey:
description: "BuildBuddy API key for caching Bazel artifacts"
required: false
rbePlatform: rbePlatform:
description: "RBE platform to use. If empty, RBE will not be used." description: "RBE platform to use. If empty, RBE will not be used."
required: false required: false
@ -22,8 +25,12 @@ runs:
shell: bash shell: bash
run: | run: |
echo "::group::Check inputs" echo "::group::Check inputs"
if [[ "${{ inputs.useCache }}" != "rbe" && "${{ inputs.useCache }}" != "false" ]]; then if [[ "${{ inputs.useCache }}" != "true" && "${{ inputs.useCache }}" != "readonly" && "${{ inputs.useCache }}" != "rbe" && "${{ inputs.useCache }}" != "logs" && "${{ inputs.useCache }}" != "false" ]]; then
echo "Invalid value for 'useCache' input: '${{ inputs.useCache }}'. Must be 'rbe', or 'false'." echo "Invalid value for 'useCache' input: '${{ inputs.useCache }}'. Must be 'true', 'readonly', or 'false'."
exit 1
fi
if [[ "${{ inputs.useCache }}" == "true" || "${{ inputs.useCache }}" == "readonly" || "${{ inputs.useCache }}" == "logs" ]] && [[ -z "${{ inputs.buildBuddyApiKey }}" ]]; then
echo "BuildBuddy API key is required when cache is enabled."
exit 1 exit 1
fi fi
if [[ "${{ inputs.useCache }}" == "rbe" && -z "${{ inputs.rbePlatform }}" ]]; then if [[ "${{ inputs.useCache }}" == "rbe" && -z "${{ inputs.rbePlatform }}" ]]; then
@ -75,7 +82,6 @@ runs:
echo "$RUNNER_ARCH not supported" echo "$RUNNER_ARCH not supported"
exit 1 exit 1
fi fi
echo "nixVersion=$(cat "${{ github.workspace }}/.nixversion")" | tee -a "$GITHUB_OUTPUT"
echo "::endgroup::" echo "::endgroup::"
- name: Install current Bash on macOS - name: Install current Bash on macOS
@ -114,9 +120,7 @@ runs:
- name: Install nix - name: Install nix
if: steps.check_inputs.outputs.nixPreinstalled == 'false' if: steps.check_inputs.outputs.nixPreinstalled == 'false'
uses: cachix/install-nix-action@d1ca217b388ee87b2507a9a93bf01368bde7cec2 # v31 uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
install_url: "https://releases.nixos.org/nix/nix-${{ steps.check_inputs.outputs.nixVersion }}/install"
- name: Set $USER if not set - name: Set $USER if not set
shell: bash shell: bash
@ -178,6 +182,57 @@ runs:
EOF EOF
echo "::endgroup::" echo "::endgroup::"
- name: Configure Bazel (rw)
if: inputs.useCache == 'true' || inputs.useCache == 'readonly'
shell: bash
env:
BUILDBUDDY_ORG_API_KEY: ${{ inputs.buildBuddyApiKey }}
WORKSPACE: ${{ github.workspace }}
run: |
echo "::group::Configure Bazel"
cat <<EOF >> "${WORKSPACE}/.bazeloverwriterc"
common --bes_results_url=https://app.buildbuddy.io/invocation/
common --bes_backend=grpcs://remote.buildbuddy.io
common --remote_cache=grpcs://remote.buildbuddy.io
common --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_ORG_API_KEY}
cquery --bes_results_url=
cquery --bes_backend=
cquery --remote_cache=
query --bes_results_url=
query --bes_backend=
query --remote_cache=
EOF
echo "::endgroup::"
- name: Configure Bazel (readonly)
if: inputs.useCache == 'readonly'
shell: bash
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "::group::Configure Bazel (readonly)"
echo "common --remote_upload_local_results=false" >> "${WORKSPACE}/.bazeloverwriterc"
echo "::endgroup::"
- name: Configure Bazel (logs)
if: inputs.useCache == 'logs'
shell: bash
env:
BUILDBUDDY_ORG_API_KEY: ${{ inputs.buildBuddyApiKey }}
WORKSPACE: ${{ github.workspace }}
run: |
echo "::group::Configure Bazel"
cat <<EOF >> "${WORKSPACE}/.bazeloverwriterc"
common --bes_results_url=https://app.buildbuddy.io/invocation/
common --bes_backend=grpcs://remote.buildbuddy.io
common --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_ORG_API_KEY}
cquery --bes_results_url=
cquery --bes_backend=
query --bes_results_url=
query --bes_backend=
EOF
echo "::endgroup::"
- name: Configure Bazel (rbe) - name: Configure Bazel (rbe)
if: inputs.useCache == 'rbe' if: inputs.useCache == 'rbe'
shell: bash shell: bash
@ -192,6 +247,24 @@ runs:
common --repo_env=GOPROXY=http://goproxy:3000 common --repo_env=GOPROXY=http://goproxy:3000
EOF EOF
echo "::endgroup::" echo "::endgroup::"
- name: Configure Bazel (rbe logs)
if: inputs.useCache == 'rbe' && inputs.buildBuddyApiKey != ''
shell: bash
env:
BUILDBUDDY_ORG_API_KEY: ${{ inputs.buildBuddyApiKey }}
WORKSPACE: ${{ github.workspace }}
run: |
echo "::group::Configure Bazel"
cat <<EOF >> "${WORKSPACE}/.bazeloverwriterc"
common --bes_results_url=https://app.buildbuddy.io/invocation/
common --bes_backend=grpcs://remote.buildbuddy.io
common --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_ORG_API_KEY}
cquery --bes_results_url=
cquery --bes_backend=
query --bes_results_url=
query --bes_backend=
EOF
echo "::endgroup::"
- name: Disable disk cache on GitHub Actions runners - name: Disable disk cache on GitHub Actions runners
if: startsWith(runner.name , 'GitHub Actions') if: startsWith(runner.name , 'GitHub Actions')
@ -221,7 +294,7 @@ runs:
{ tools, repository, rev }: { tools, repository, rev }:
let let
repoFlake = builtins.getFlake ("github:" + repository + "/" + rev); repoFlake = builtins.getFlake ("github:" + repository + "/" + rev);
nixpkgs = repoFlake.inputs.nixpkgs; nixpkgs = repoFlake.inputs.nixpkgsUnstable;
pkgs = import nixpkgs { system = builtins.currentSystem; }; pkgs = import nixpkgs { system = builtins.currentSystem; };
toolPkgs = map (p: pkgs.${p}) tools; toolPkgs = map (p: pkgs.${p}) tools;
in in

View File

@ -26,12 +26,6 @@ runs:
"gcpSEVES") "gcpSEVES")
attestationVariant="gcp-sev-es" attestationVariant="gcp-sev-es"
;; ;;
"gcpSEVSNP")
attestationVariant="gcp-sev-snp"
;;
"qemuVTPM")
attestationVariant="qemu-vtpm"
;;
*) *)
echo "Unknown attestation variant: $(yq '.attestation | keys | .[0]' constellation-conf.yaml)" echo "Unknown attestation variant: $(yq '.attestation | keys | .[0]' constellation-conf.yaml)"
exit 1 exit 1
@ -47,7 +41,7 @@ runs:
} }
random = { random = {
source = "hashicorp/random" source = "hashicorp/random"
version = "3.7.2" version = "3.6.0"
} }
} }
} }
@ -109,16 +103,6 @@ runs:
project_id = "$(yq '.infrastructure.gcp.projectID' constellation-state.yaml)" project_id = "$(yq '.infrastructure.gcp.projectID' constellation-state.yaml)"
service_account_key = sensitive("$(cat $(yq '.provider.gcp.serviceAccountKeyPath' constellation-conf.yaml) | base64 -w0)") service_account_key = sensitive("$(cat $(yq '.provider.gcp.serviceAccountKeyPath' constellation-conf.yaml) | base64 -w0)")
} }
openstack = {
cloud = "stackit"
clouds_yaml_path = "~/.config/openstack/clouds.yaml"
floating_ip_pool_id = "970ace5c-458f-484a-a660-0903bcfd91ad"
deploy_yawol_load_balancer = true
yawol_image_id = "bcd6c13e-75d1-4c3f-bf0f-8f83580cc1be"
yawol_flavor_id = "3b11b27e-6c73-470d-b595-1d85b95a8cdf"
network_id = "$(yq '.infrastructure.networkID' constellation-state.yaml)"
subnet_id = "$(yq '.infrastructure.subnetID' constellation-state.yaml)"
}
network_config = { network_config = {
ip_cidr_node = "$(yq '.infrastructure.ipCidrNode' constellation-state.yaml)" ip_cidr_node = "$(yq '.infrastructure.ipCidrNode' constellation-state.yaml)"
ip_cidr_service = "$(yq '.serviceCIDR' constellation-conf.yaml)" ip_cidr_service = "$(yq '.serviceCIDR' constellation-conf.yaml)"

View File

@ -1,64 +0,0 @@
name: Update TFState
description: "Update the terraform state artifact. We use this to either delete an artifact if the e2e test was cleaned up successfully or to update the artifact with the latest terraform state."
inputs:
name:
description: "The name of the artifact that contains the tfstate."
required: true
runID:
description: "The ID of your current run (github.run_id)."
required: true
encryptionSecret:
description: "The encryption secret for the artifacts."
required: true
runs:
using: "composite"
steps:
- name: Check if uploaded tfstate can be deleted
if: always()
shell: bash
run: |
if [[ ! -d constellation-terraform ]] && [[ ! -d constellation-iam-terraform ]]; then
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
else
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
fi
- name: Delete tfstate artifact if necessary
if: always() && env.DELETE_TF_STATE == 'true'
uses: ./.github/actions/artifact_delete
with:
name: ${{ inputs.name }}
workflowID: ${{ inputs.runID }}
- name: Prepare left over terraform state folders
if: always() && env.DELETE_TF_STATE == 'false'
shell: bash
run: |
rm -rf to-zip/*
mkdir -p to-zip
to_upload=""
if [[ -d constellation-terraform ]]; then
cp -r constellation-terraform to-zip
rm -f to-zip/constellation-terraform/plan.zip
rm -rf to-zip/constellation-terraform/.terraform
to_upload+="to-zip/constellation-terraform"
fi
if [[ -d constellation-iam-terraform ]]; then
cp -r constellation-iam-terraform to-zip
rm -rf to-zip/constellation-iam-terraform/.terraform
to_upload+=" to-zip/constellation-iam-terraform"
fi
echo "TO_UPLOAD=$to_upload" >> "$GITHUB_ENV"
- name: Update tfstate
if: always() && env.TO_UPLOAD != ''
uses: ./.github/actions/artifact_upload
with:
name: ${{ inputs.name }}
path: >
${{ env.TO_UPLOAD }}
encryptionSecret: ${{ inputs.encryptionSecret }}
overwrite: true

View File

@ -15,7 +15,7 @@ runs:
zip -r terraform-module.zip terraform-module zip -r terraform-module.zip terraform-module
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: terraform-module name: terraform-module
path: terraform-module.zip path: terraform-module.zip
@ -23,4 +23,4 @@ runs:
- name: Cleanup Terraform module dir - name: Cleanup Terraform module dir
shell: bash shell: bash
run: | run: |
rm -rf terraform-module terraform-module.zip rm -r terraform-module terraform-module.zip

21
.github/actions/versionsapi/Dockerfile vendored Normal file
View File

@ -0,0 +1,21 @@
FROM golang:1.22.1@sha256:34ce21a9696a017249614876638ea37ceca13cdd88f582caad06f87a8aa45bf3 as builder
# Download project root dependencies
WORKDIR /workspace
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
COPY . .
# Build
WORKDIR /workspace/internal/api/versionsapi/cli
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o versionsapi .
FROM scratch as release
COPY --from=builder /workspace/internal/api/versionsapi/cli/versionsapi .
CMD ["/notIntendedToBeExecuted"]

View File

@ -52,12 +52,19 @@ outputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Get versionsapi binary
shell: bash
# TODO: This should probably be `bazel run`.
run: |
containerID=$(docker create "ghcr.io/edgelesssys/constellation/versionsapi-ci-cli:latest")
docker cp ${containerID}:/versionsapi .
- name: Run versionsapi - name: Run versionsapi
id: run id: run
shell: bash shell: bash
run: | run: |
out=$( out=$(
bazel run //internal/api/versionsapi/cli:cli -- \ ./versionsapi \
${{ inputs.command }} \ ${{ inputs.command }} \
${{ inputs.ref != '' && format('--ref="{0}"', inputs.ref) || '' }} \ ${{ inputs.ref != '' && format('--ref="{0}"', inputs.ref) || '' }} \
${{ inputs.stream != '' && format('--stream="{0}"', inputs.stream) || '' }} \ ${{ inputs.stream != '' && format('--stream="{0}"', inputs.stream) || '' }} \

View File

@ -1,5 +1,5 @@
{ {
"type": "AdaptiveCard", "type": "message",
"attachments": [ "attachments": [
{ {
"contentType": "application/vnd.microsoft.card.adaptive", "contentType": "application/vnd.microsoft.card.adaptive",
@ -61,10 +61,10 @@
}, },
{ {
"type": "mention", "type": "mention",
"text": "<at>burgerdev</at>", "text": "<at>malt3</at>",
"mentioned": { "mentioned": {
"id": "c9efc581-58ca-4da6-93ce-79f69f89deeb", "id": "3012fe21-cff7-499d-88cf-48cf12f2e90c",
"name": "Markus Rudy" "name": "Malte Poll"
} }
} }
] ]

View File

@ -1,36 +0,0 @@
name: Assign Reviewer
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
- review_request_removed
- labeled
permissions:
pull-requests: write
jobs:
assign_reviewer:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'dependencies') && toJson(github.event.pull_request.requested_reviewers) == '[]' && github.event.pull_request.user.login == 'renovate[bot]'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Pick assignee
id: pick-assignee
uses: ./.github/actions/pick_assignee
- name: Assign reviewer
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.number }}
ASSIGNEE: ${{ steps.pick-assignee.outputs.assignee }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/edgelesssys/constellation/pulls/${PR}/requested_reviewers" \
-f "reviewers[]=${ASSIGNEE}"

View File

@ -8,20 +8,26 @@ on:
jobs: jobs:
run: run:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
path: constellation path: constellation
- name: Install necessary tools
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip
sudo python3 -m pip install --user --require-hashes -r constellation/.github/workflows/aws-snp-launchmeasurements-requirements.txt
- name: Install Nix - name: Install Nix
uses: cachix/install-nix-action@d1ca217b388ee87b2507a9a93bf01368bde7cec2 # v31 uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- name: Download Firmware release - name: Download Firmware release
id: download-firmware id: download-firmware
uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # v1.12 uses: robinraju/release-downloader@368754b9c6f47c345fcfbf42bcb577c2f0f5f395 # v1.9
with: with:
repository: aws/uefi repository: aws/uefi
latest: true latest: true
@ -44,7 +50,7 @@ jobs:
echo "ovmfPath=${ovmfPath}" | tee -a "$GITHUB_OUTPUT" echo "ovmfPath=${ovmfPath}" | tee -a "$GITHUB_OUTPUT"
popd || exit 1 popd || exit 1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
repository: virtee/sev-snp-measure-go.git repository: virtee/sev-snp-measure-go.git
ref: e42b6f8991ed5a671d5d1e02a6b61f6373f9f8d8 ref: e42b6f8991ed5a671d5d1e02a6b61f6373f9f8d8

View File

@ -0,0 +1,106 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --generate-hashes --output-file=aws-snp-launchmeasurements-requirements.txt input.txt
#
cffi==1.16.0 \
--hash=sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc \
--hash=sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a \
--hash=sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417 \
--hash=sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab \
--hash=sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520 \
--hash=sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36 \
--hash=sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743 \
--hash=sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8 \
--hash=sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed \
--hash=sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684 \
--hash=sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56 \
--hash=sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324 \
--hash=sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d \
--hash=sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235 \
--hash=sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e \
--hash=sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088 \
--hash=sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000 \
--hash=sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7 \
--hash=sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e \
--hash=sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673 \
--hash=sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c \
--hash=sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe \
--hash=sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2 \
--hash=sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098 \
--hash=sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8 \
--hash=sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a \
--hash=sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0 \
--hash=sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b \
--hash=sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896 \
--hash=sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e \
--hash=sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9 \
--hash=sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2 \
--hash=sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b \
--hash=sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6 \
--hash=sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404 \
--hash=sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f \
--hash=sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0 \
--hash=sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4 \
--hash=sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc \
--hash=sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936 \
--hash=sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba \
--hash=sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872 \
--hash=sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb \
--hash=sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614 \
--hash=sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1 \
--hash=sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d \
--hash=sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969 \
--hash=sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b \
--hash=sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4 \
--hash=sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627 \
--hash=sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956 \
--hash=sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357
# via cryptography
cryptography==42.0.4 \
--hash=sha256:01911714117642a3f1792c7f376db572aadadbafcd8d75bb527166009c9f1d1b \
--hash=sha256:0e89f7b84f421c56e7ff69f11c441ebda73b8a8e6488d322ef71746224c20fce \
--hash=sha256:12d341bd42cdb7d4937b0cabbdf2a94f949413ac4504904d0cdbdce4a22cbf88 \
--hash=sha256:15a1fb843c48b4a604663fa30af60818cd28f895572386e5f9b8a665874c26e7 \
--hash=sha256:1cdcdbd117681c88d717437ada72bdd5be9de117f96e3f4d50dab3f59fd9ab20 \
--hash=sha256:1df6fcbf60560d2113b5ed90f072dc0b108d64750d4cbd46a21ec882c7aefce9 \
--hash=sha256:3c6048f217533d89f2f8f4f0fe3044bf0b2090453b7b73d0b77db47b80af8dff \
--hash=sha256:3e970a2119507d0b104f0a8e281521ad28fc26f2820687b3436b8c9a5fcf20d1 \
--hash=sha256:44a64043f743485925d3bcac548d05df0f9bb445c5fcca6681889c7c3ab12764 \
--hash=sha256:4e36685cb634af55e0677d435d425043967ac2f3790ec652b2b88ad03b85c27b \
--hash=sha256:5f8907fcf57392cd917892ae83708761c6ff3c37a8e835d7246ff0ad251d9298 \
--hash=sha256:69b22ab6506a3fe483d67d1ed878e1602bdd5912a134e6202c1ec672233241c1 \
--hash=sha256:6bfadd884e7280df24d26f2186e4e07556a05d37393b0f220a840b083dc6a824 \
--hash=sha256:6d0fbe73728c44ca3a241eff9aefe6496ab2656d6e7a4ea2459865f2e8613257 \
--hash=sha256:6ffb03d419edcab93b4b19c22ee80c007fb2d708429cecebf1dd3258956a563a \
--hash=sha256:810bcf151caefc03e51a3d61e53335cd5c7316c0a105cc695f0959f2c638b129 \
--hash=sha256:831a4b37accef30cccd34fcb916a5d7b5be3cbbe27268a02832c3e450aea39cb \
--hash=sha256:887623fe0d70f48ab3f5e4dbf234986b1329a64c066d719432d0698522749929 \
--hash=sha256:a0298bdc6e98ca21382afe914c642620370ce0470a01e1bef6dd9b5354c36854 \
--hash=sha256:a1327f280c824ff7885bdeef8578f74690e9079267c1c8bd7dc5cc5aa065ae52 \
--hash=sha256:c1f25b252d2c87088abc8bbc4f1ecbf7c919e05508a7e8628e6875c40bc70923 \
--hash=sha256:c3a5cbc620e1e17009f30dd34cb0d85c987afd21c41a74352d1719be33380885 \
--hash=sha256:ce8613beaffc7c14f091497346ef117c1798c202b01153a8cc7b8e2ebaaf41c0 \
--hash=sha256:d2a27aca5597c8a71abbe10209184e1a8e91c1fd470b5070a2ea60cafec35bcd \
--hash=sha256:dad9c385ba8ee025bb0d856714f71d7840020fe176ae0229de618f14dae7a6e2 \
--hash=sha256:db4b65b02f59035037fde0998974d84244a64c3265bdef32a827ab9b63d61b18 \
--hash=sha256:e09469a2cec88fb7b078e16d4adec594414397e8879a4341c6ace96013463d5b \
--hash=sha256:e53dc41cda40b248ebc40b83b31516487f7db95ab8ceac1f042626bc43a2f992 \
--hash=sha256:f1e85a178384bf19e36779d91ff35c7617c885da487d689b05c1366f9933ad74 \
--hash=sha256:f47be41843200f7faec0683ad751e5ef11b9a56a220d57f300376cd8aba81660 \
--hash=sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925 \
--hash=sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449
# via sev-snp-measure
pycparser==2.21 \
--hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \
--hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
# via cffi
sev-snp-measure==0.0.9 \
--hash=sha256:32ac67a0db6b639186116d8806a730aac4743584e6ca810c65e8fc57b875f87d \
--hash=sha256:a1796822e15430c2db7749d1da269819b8cec1330600bb5589ed0ed61400dc41
# via -r input.txt
types-cryptography==3.3.23.2 \
--hash=sha256:09cc53f273dd4d8c29fa7ad11fefd9b734126d467960162397bc5e3e604dea75 \
--hash=sha256:b965d548f148f8e87f353ccf2b7bd92719fdf6c845ff7cedf2abb393a0643e4f
# via sev-snp-measure

View File

@ -22,7 +22,7 @@ jobs:
runs-on: [arc-runner-set] runs-on: [arc-runner-set]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
@ -31,6 +31,7 @@ jobs:
with: with:
useCache: "rbe" useCache: "rbe"
rbePlatform: "ubuntu-22.04" rbePlatform: "ubuntu-22.04"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Build all - name: Build all
shell: bash shell: bash

View File

@ -13,30 +13,30 @@ on:
jobs: jobs:
find-ccm-versions: find-ccm-versions:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
outputs: outputs:
versions: ${{ steps.find-versions.outputs.versions }} versions: ${{ steps.find-versions.outputs.versions }}
latest: ${{ steps.find-latest.outputs.latest }} latest: ${{ steps.find-latest.outputs.latest }}
steps: steps:
- name: Checkout Constellation - name: Checkout Constellation
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Checkout kubernetes/cloud-provider-gcp - name: Checkout kubernetes/cloud-provider-gcp
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
repository: "kubernetes/cloud-provider-gcp" repository: "kubernetes/cloud-provider-gcp"
path: "cloud-provider-gcp" path: "cloud-provider-gcp"
fetch-depth: 0 fetch-depth: 0
- name: Setup Go environment - name: Setup Go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with: with:
go-version: "1.24.2" go-version: "1.22.1"
cache: false cache: false
- name: Install Crane - name: Install Crane
run: | run: |
go install github.com/google/go-containerregistry/cmd/crane@c195f151efe3369874c72662cd69ad43ee485128 # v0.20.2 go install github.com/google/go-containerregistry/cmd/crane@latest
- name: Find versions - name: Find versions
id: find-versions id: find-versions
@ -54,7 +54,7 @@ jobs:
build-ccm-gcp: build-ccm-gcp:
# matrix cannot handle empty lists # matrix cannot handle empty lists
if: needs.find-ccm-versions.outputs.versions != '[]' if: needs.find-ccm-versions.outputs.versions != '[]'
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: read contents: read
packages: write packages: write
@ -65,10 +65,10 @@ jobs:
version: ${{ fromJson(needs.find-ccm-versions.outputs.versions) }} version: ${{ fromJson(needs.find-ccm-versions.outputs.versions) }}
steps: steps:
- name: Checkout Constellation - name: Checkout Constellation
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Checkout kubernetes/cloud-provider-gcp - name: Checkout kubernetes/cloud-provider-gcp
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
repository: "kubernetes/cloud-provider-gcp" repository: "kubernetes/cloud-provider-gcp"
path: "cloud-provider-gcp" path: "cloud-provider-gcp"
@ -76,7 +76,7 @@ jobs:
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with: with:
images: | images: |
ghcr.io/edgelesssys/cloud-provider-gcp ghcr.io/edgelesssys/cloud-provider-gcp
@ -113,7 +113,7 @@ jobs:
- name: Build and push container image - name: Build and push container image
id: build id: build
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with: with:
context: ./cloud-provider-gcp context: ./cloud-provider-gcp
push: ${{ github.ref_name == 'main' }} push: ${{ github.ref_name == 'main' }}

View File

@ -10,7 +10,7 @@ env:
jobs: jobs:
build-gcp-guest-agent: build-gcp-guest-agent:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: read contents: read
packages: write packages: write
@ -69,7 +69,7 @@ jobs:
- name: Checkout GoogleCloudPlatform/guest-agent - name: Checkout GoogleCloudPlatform/guest-agent
if: steps.needs-build.outputs.out == 'true' if: steps.needs-build.outputs.out == 'true'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
repository: "GoogleCloudPlatform/guest-agent" repository: "GoogleCloudPlatform/guest-agent"
ref: refs/tags/${{ steps.latest-release.outputs.latest }} ref: refs/tags/${{ steps.latest-release.outputs.latest }}
@ -77,7 +77,7 @@ jobs:
- name: Checkout Constellation - name: Checkout Constellation
if: steps.needs-build.outputs.out == 'true' if: steps.needs-build.outputs.out == 'true'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
path: "constellation" path: "constellation"
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
@ -85,7 +85,7 @@ jobs:
- name: Docker meta - name: Docker meta
id: meta id: meta
if: steps.needs-build.outputs.out == 'true' if: steps.needs-build.outputs.out == 'true'
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with: with:
images: | images: |
${{ env.REGISTRY }}/edgelesssys/gcp-guest-agent ${{ env.REGISTRY }}/edgelesssys/gcp-guest-agent
@ -114,7 +114,7 @@ jobs:
- name: Build and push container image - name: Build and push container image
if: steps.needs-build.outputs.out == 'true' if: steps.needs-build.outputs.out == 'true'
id: build id: build
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with: with:
context: ./guest-agent context: ./guest-agent
file: ./constellation/3rdparty/gcp-guest-agent/Dockerfile file: ./constellation/3rdparty/gcp-guest-agent/Dockerfile

View File

@ -13,17 +13,18 @@ on:
jobs: jobs:
build-container: build-container:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with: with:
useCache: "false"
nixTools: | nixTools: |
crane crane
gzip gzip

View File

@ -13,14 +13,14 @@ on:
jobs: jobs:
build-logcollector-debugd-images: build-logcollector-debugd-images:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Check out repository - name: Check out repository
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

View File

@ -4,15 +4,15 @@ on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: "0 21 * * 2" # At 21:00 on Tuesday. - cron: "0 21 * * 2" # At 21:00 on Tuesday.
- cron: "10 21 * * 2" # At 21:10 on Tuesday.
- cron: "20 21 * * 2" # At 21:20 on Tuesday. - cron: "20 21 * * 2" # At 21:20 on Tuesday.
- cron: "40 21 * * 2" # At 21:40 on Tuesday.
- cron: "0 21 * * 4" # At 21:00 on Thursday. - cron: "0 21 * * 4" # At 21:00 on Thursday.
- cron: "10 21 * * 4" # At 21:10 on Thursday.
- cron: "20 21 * * 4" # At 21:20 on Thursday. - cron: "20 21 * * 4" # At 21:20 on Thursday.
- cron: "40 21 * * 4" # At 21:40 on Thursday.
jobs: jobs:
stream: stream:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
outputs: outputs:
stream: ${{ steps.stream.outputs.stream }} stream: ${{ steps.stream.outputs.stream }}
steps: steps:
@ -28,10 +28,10 @@ jobs:
"0 21 * * 4" | "0 21 * * 2") "0 21 * * 4" | "0 21 * * 2")
echo "stream=debug" | tee -a "$GITHUB_OUTPUT" echo "stream=debug" | tee -a "$GITHUB_OUTPUT"
;; ;;
"20 21 * * 4" | "20 21 * * 2") "10 21 * * 4" | "10 21 * * 2")
echo "stream=console" | tee -a "$GITHUB_OUTPUT" echo "stream=console" | tee -a "$GITHUB_OUTPUT"
;; ;;
"40 21 * * 4" | "40 21 * * 2") "20 21 * * 4" | "20 21 * * 2")
echo "stream=nightly" | tee -a "$GITHUB_OUTPUT" echo "stream=nightly" | tee -a "$GITHUB_OUTPUT"
;; ;;
*) *)
@ -54,20 +54,22 @@ jobs:
update-code: update-code:
# On nightly stream only. # On nightly stream only.
if: needs.stream.outputs.stream == 'nightly' if: |
needs: ["build-image", "stream"] github.event_name == 'workflow_dispatch' ||
runs-on: ubuntu-24.04 github.event.schedule == '20 21 * * 4' ||
github.event.schedule == '20 21 * * 2'
needs: build-image
runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
token: ${{ secrets.CI_COMMIT_PUSH_PR }}
- name: Setup Go environment - name: Setup Go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with: with:
go-version: "1.24.2" go-version: "1.22.1"
cache: false cache: false
- name: Determine version - name: Determine version
@ -97,7 +99,7 @@ jobs:
run: rm -f internal/attestation/measurements/measurement-generator/generate run: rm -f internal/attestation/measurements/measurement-generator/generate
- name: Create pull request - name: Create pull request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with: with:
branch: "image/automated/update-measurements-${{ github.run_number }}" branch: "image/automated/update-measurements-${{ github.run_number }}"
base: main base: main
@ -109,7 +111,6 @@ jobs:
It updates the hardcoded measurements and the image version (for QEMU/MiniConstellation). It updates the hardcoded measurements and the image version (for QEMU/MiniConstellation).
commit-message: "image: update measurements and image version" commit-message: "image: update measurements and image version"
committer: edgelessci <edgelessci@users.noreply.github.com> committer: edgelessci <edgelessci@users.noreply.github.com>
author: edgelessci <edgelessci@users.noreply.github.com>
labels: no changelog labels: no changelog
# We need to push changes using a token, otherwise triggers like on:push and on:pull_request won't work. # We need to push changes using a token, otherwise triggers like on:push and on:pull_request won't work.
token: ${{ !github.event.pull_request.head.repo.fork && secrets.CI_COMMIT_PUSH_PR || '' }} token: ${{ !github.event.pull_request.head.repo.fork && secrets.CI_COMMIT_PUSH_PR || '' }}
@ -117,10 +118,10 @@ jobs:
notify-failure: notify-failure:
if: failure() if: failure()
needs: [ "stream", "build-image", "update-code" ] needs: [ "stream", "build-image", "update-code" ]
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}

View File

@ -47,7 +47,7 @@ on:
jobs: jobs:
build-settings: build-settings:
name: "Determine build settings" name: "Determine build settings"
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
outputs: outputs:
ref: ${{ steps.ref.outputs.ref }} ref: ${{ steps.ref.outputs.ref }}
stream: ${{ steps.stream.outputs.stream }} stream: ${{ steps.stream.outputs.stream }}
@ -59,7 +59,7 @@ jobs:
cliApiBasePath: ${{ steps.image-version.outputs.cliApiBasePath }} cliApiBasePath: ${{ steps.image-version.outputs.cliApiBasePath }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -138,7 +138,7 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -147,7 +147,7 @@ jobs:
useCache: "false" useCache: "false"
- name: Login to AWS - name: Login to AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GitHubConstellationImagePipeline role-to-assume: arn:aws:iam::795746500882:role/GitHubConstellationImagePipeline
aws-region: eu-central-1 aws-region: eu-central-1
@ -167,12 +167,6 @@ jobs:
with: with:
clouds_yaml: ${{ secrets.STACKIT_IMAGE_UPLOAD_CLOUDS_YAML }} clouds_yaml: ${{ secrets.STACKIT_IMAGE_UPLOAD_CLOUDS_YAML }}
- name: Allow unrestricted user namespaces
shell: bash
run: |
sudo sysctl --ignore --write kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl --ignore --write kernel.apparmor_restrict_unprivileged_userns=0
- name: Build and upload - name: Build and upload
id: build id: build
shell: bash shell: bash

View File

@ -0,0 +1,32 @@
name: Build and upload versionsapi CI image
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "internal/api/versionsapi/**"
- ".github/workflows/build-versionsapi-ci-image.yml"
- ".github/actions/versionsapi/**"
- "go.mod"
jobs:
build-versionsapi-ci-cli:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out repository
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Build and upload container image
uses: ./.github/actions/build_micro_service
with:
name: versionsapi-ci-cli
dockerfile: .github/actions/versionsapi/Dockerfile
githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@ -17,15 +17,15 @@ on:
jobs: jobs:
linkChecker: linkChecker:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Link Checker - name: Link Checker
uses: lycheeverse/lychee-action@1d97d84f0bc547f7b25f4c2170d87d810dc2fb2c # v2.4.0 uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
with: with:
args: "--config ./.lychee.toml './**/*.md' './**/*.html'" args: "--config ./.lychee.toml './**/*.md' './**/*.html'"
fail: true fail: true

View File

@ -1,25 +0,0 @@
name: Check measurements reproducibility
on:
workflow_dispatch:
inputs:
version:
type: string
description: The version of the measurements that are downloaded from the CDN.
required: true
ref:
type: string
description: The git ref to check out. You probably want this to be the tag of the release you are testing.
required: true
jobs:
check-reproducibility:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check reproducibility
uses: ./.github/actions/check_measurements_reproducibility
with:
version: ${{ github.event.inputs.version }}
ref: ${{ github.event.inputs.ref }}

View File

@ -17,7 +17,7 @@ on:
jobs: jobs:
codeql: codeql:
name: CodeQL name: CodeQL
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
env: env:
# Force CodeQL to run the extraction on the files compiled by our custom # Force CodeQL to run the extraction on the files compiled by our custom
# build command, as opposed to letting the autobuilder figure it out. # build command, as opposed to letting the autobuilder figure it out.
@ -34,17 +34,17 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go environment - name: Setup Go environment
if: matrix.language == 'go' if: matrix.language == 'go'
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with: with:
go-version: "1.24.2" go-version: "1.22.1"
cache: false cache: false
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 uses: github/codeql-action/init@cf7e9f23492505046de9a37830c3711dd0f25bb3 # v2.16.2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
@ -63,6 +63,6 @@ jobs:
echo "::endgroup::" echo "::endgroup::"
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 uses: github/codeql-action/analyze@cf7e9f23492505046de9a37830c3711dd0f25bb3 # v2.16.2
with: with:
category: "/language:${{ matrix.language }}" category: "/language:${{ matrix.language }}"

View File

@ -13,20 +13,15 @@ on:
jobs: jobs:
vale: vale:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
# Work around https://github.com/errata-ai/vale-action/issues/128.
- run: |
venv="$HOME/.local/share/venv"
python3 -m venv "$venv"
echo "$venv/bin" >> "$GITHUB_PATH"
- name: Vale - name: Vale
uses: errata-ai/vale-action@2690bc95f0ed3cb5220492575af09c51b04fbea9 # tag=reviewdog uses: errata-ai/vale-action@3f7188c866bcb3259339a09f517d7c4a8838303c # tag=reviewdog
with: with:
files: docs/docs files: docs/docs
fail_on_error: true fail_on_error: true
version: 3.9.3

View File

@ -50,7 +50,7 @@ on:
jobs: jobs:
build-cli: build-cli:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -72,7 +72,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -92,8 +92,8 @@ jobs:
cosignPassword: ${{ inputs.key == 'release' && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }} cosignPassword: ${{ inputs.key == 'release' && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }}
- name: Upload CLI as artifact (unix) - name: Upload CLI as artifact (unix)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ matrix.os != 'windows' }} if : ${{ matrix.os != 'windows' }}
with: with:
name: constellation-${{ matrix.os }}-${{ matrix.arch }} name: constellation-${{ matrix.os }}-${{ matrix.arch }}
path: | path: |
@ -101,8 +101,8 @@ jobs:
build/constellation-${{ matrix.os }}-${{ matrix.arch }}.sig build/constellation-${{ matrix.os }}-${{ matrix.arch }}.sig
- name: Upload CLI as artifact (windows) - name: Upload CLI as artifact (windows)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ matrix.os == 'windows' }} if : ${{ matrix.os == 'windows' }}
with: with:
name: constellation-${{ matrix.os }}-${{ matrix.arch }} name: constellation-${{ matrix.os }}-${{ matrix.arch }}
path: | path: |
@ -110,7 +110,7 @@ jobs:
build/constellation-${{ matrix.os }}-${{ matrix.arch }}.exe.sig build/constellation-${{ matrix.os }}-${{ matrix.arch }}.exe.sig
build-terraform-provider: build-terraform-provider:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -133,7 +133,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -149,27 +149,27 @@ jobs:
targetArch: ${{ matrix.arch }} targetArch: ${{ matrix.arch }}
- name: Upload Terraform Provider Binary as artifact (unix) - name: Upload Terraform Provider Binary as artifact (unix)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ matrix.os != 'windows' }} if : ${{ matrix.os != 'windows' }}
with: with:
name: terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }} name: terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }}
path: | path: |
build/terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }} build/terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }}
- name: Upload Terraform Provider Binary as artifact (windows) - name: Upload Terraform Provider Binary as artifact (windows)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ matrix.os == 'windows' }} if : ${{ matrix.os == 'windows' }}
with: with:
name: terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }} name: terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }}
path: | path: |
build/terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }}.exe build/terraform-provider-constellation-${{ matrix.os }}-${{ matrix.arch }}.exe
upload-terraform-module: upload-terraform-module:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -177,7 +177,7 @@ jobs:
uses: ./.github/actions/upload_terraform_module uses: ./.github/actions/upload_terraform_module
push-containers: push-containers:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
if: inputs.pushContainers if: inputs.pushContainers
permissions: permissions:
actions: read actions: read
@ -187,7 +187,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -208,7 +208,7 @@ jobs:
run: bazel run //bazel/release:push run: bazel run //bazel/release:push
provenance-subjects: provenance-subjects:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
needs: needs:
- build-cli - build-cli
- signed-sbom - signed-sbom
@ -219,7 +219,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -227,7 +227,7 @@ jobs:
uses: ./.github/actions/download_release_binaries uses: ./.github/actions/download_release_binaries
- name: Download CLI SBOM - name: Download CLI SBOM
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation.spdx.sbom name: constellation.spdx.sbom
@ -252,16 +252,16 @@ jobs:
echo provenance-subjects="${HASHESB64}" >> "$GITHUB_OUTPUT" echo provenance-subjects="${HASHESB64}" >> "$GITHUB_OUTPUT"
signed-sbom: signed-sbom:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
- name: Install Cosign - name: Install Cosign
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- name: Download Syft & Grype - name: Download Syft & Grype
uses: ./.github/actions/install_syft_grype uses: ./.github/actions/install_syft_grype
@ -296,13 +296,13 @@ jobs:
COSIGN_PASSWORD: ${{ inputs.key == 'release' && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }} COSIGN_PASSWORD: ${{ inputs.key == 'release' && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }}
- name: Upload Constellation CLI SBOM - name: Upload Constellation CLI SBOM
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: constellation.spdx.sbom name: constellation.spdx.sbom
path: constellation.spdx.sbom path: constellation.spdx.sbom
- name: Upload Constellation CLI SBOM's signature - name: Upload Constellation CLI SBOM's signature
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: constellation.spdx.sbom.sig name: constellation.spdx.sbom.sig
path: constellation.spdx.sbom.sig path: constellation.spdx.sbom.sig
@ -316,14 +316,14 @@ jobs:
- provenance-subjects - provenance-subjects
# This must not be pinned to digest. See: # This must not be pinned to digest. See:
# https://github.com/slsa-framework/slsa-github-generator#referencing-slsa-builders-and-generators # https://github.com/slsa-framework/slsa-github-generator#referencing-slsa-builders-and-generators
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0 uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0
with: with:
base64-subjects: "${{ needs.provenance-subjects.outputs.provenance-subjects }}" base64-subjects: "${{ needs.provenance-subjects.outputs.provenance-subjects }}"
provenance-verify: provenance-verify:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
env: env:
SLSA_VERIFIER_VERSION: "2.7.0" SLSA_VERIFIER_VERSION: "2.5.1"
needs: needs:
- build-cli - build-cli
- provenance - provenance
@ -332,7 +332,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -340,12 +340,14 @@ jobs:
uses: ./.github/actions/download_release_binaries uses: ./.github/actions/download_release_binaries
- name: Download CLI SBOM - name: Download CLI SBOM
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation.spdx.sbom name: constellation.spdx.sbom
- name: Download provenance - name: Download provenance
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 # Need to use the same major version as slsa-github-generator to find uploaded artifacts
# https://github.com/slsa-framework/slsa-github-generator/issues/3068
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with: with:
name: ${{ needs.provenance.outputs.provenance-name }} name: ${{ needs.provenance.outputs.provenance-name }}
@ -395,7 +397,7 @@ jobs:
release: release:
permissions: permissions:
contents: write contents: write
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
needs: needs:
- build-cli - build-cli
- provenance - provenance
@ -405,7 +407,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -418,17 +420,19 @@ jobs:
uses: ./.github/actions/download_release_binaries uses: ./.github/actions/download_release_binaries
- name: Download CLI SBOM - name: Download CLI SBOM
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation.spdx.sbom name: constellation.spdx.sbom
- name: Download Constellation CLI SBOM's signature - name: Download Constellation CLI SBOM's signature
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation.spdx.sbom.sig name: constellation.spdx.sbom.sig
- name: Download Constellation provenance - name: Download Constellation provenance
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 # Need to use the same major version as slsa-github-generator to find uploaded artifacts
# https://github.com/slsa-framework/slsa-github-generator/issues/3068
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with: with:
name: ${{ needs.provenance.outputs.provenance-name }} name: ${{ needs.provenance.outputs.provenance-name }}
@ -472,7 +476,7 @@ jobs:
- name: Create release with artifacts - name: Create release with artifacts
id: create-release id: create-release
# GitHub endorsed release project. See: https://github.com/actions/create-release # GitHub endorsed release project. See: https://github.com/actions/create-release
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with: with:
draft: true draft: true
generate_release_notes: true generate_release_notes: true
@ -487,7 +491,7 @@ jobs:
terraform-module.zip terraform-module.zip
- name: Create Terraform provider release with artifcats - name: Create Terraform provider release with artifcats
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with: with:
draft: true draft: true
generate_release_notes: false generate_release_notes: false

View File

@ -10,6 +10,11 @@ on:
- "internal/api/**" - "internal/api/**"
- ".github/workflows/e2e-attestationconfigapi.yml" - ".github/workflows/e2e-attestationconfigapi.yml"
- "go.mod" - "go.mod"
pull_request:
paths:
- "internal/api/**"
- ".github/workflows/e2e-attestationconfigapi.yml"
- "go.mod"
jobs: jobs:
e2e-api: e2e-api:
@ -17,8 +22,8 @@ jobs:
fail-fast: false fail-fast: false
max-parallel: 1 max-parallel: 1
matrix: matrix:
attestationVariant: ["azure-sev-snp", "azure-tdx", "aws-sev-snp", "gcp-sev-snp"] csp: ["azure", "aws"]
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -26,7 +31,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
# Don't trigger in forks, use head on pull requests, use default otherwise. # Don't trigger in forks, use head on pull requests, use default otherwise.
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || github.event.pull_request.head.sha || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || github.event.pull_request.head.sha || '' }}
@ -34,6 +39,7 @@ jobs:
- name: Run Attestationconfig API E2E - name: Run Attestationconfig API E2E
uses: ./.github/actions/e2e_attestationconfigapi uses: ./.github/actions/e2e_attestationconfigapi
with: with:
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
cosignPrivateKey: ${{ secrets.COSIGN_DEV_PRIVATE_KEY }} cosignPrivateKey: ${{ secrets.COSIGN_DEV_PRIVATE_KEY }}
cosignPassword: ${{ secrets.COSIGN_DEV_PASSWORD }} cosignPassword: ${{ secrets.COSIGN_DEV_PASSWORD }}
attestationVariant: ${{ matrix.attestationVariant }} csp: ${{ matrix.csp }}

View File

@ -1,26 +0,0 @@
name: e2e weekly cleanup
on:
schedule:
- cron: "0 0 * * 0" # At 00:00 every Sunday UTC
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Cleanup
uses: ./.github/actions/e2e_cleanup_timeframe
with:
ghToken: ${{ secrets.GITHUB_TOKEN }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
azure_credentials: ${{ secrets.AZURE_E2E_DESTROY_CREDENTIALS }}
openStackCloudsYaml: ${{ secrets.STACKIT_CI_CLOUDS_YAML }}
stackitUat: ${{ secrets.STACKIT_CI_UAT }}

View File

@ -20,7 +20,7 @@ on:
jobs: jobs:
e2e-mini: e2e-mini:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
environment: e2e environment: e2e
permissions: permissions:
id-token: write id-token: write
@ -29,12 +29,12 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.ref || github.event.workflow_run.head_branch || github.head_ref }} ref: ${{ inputs.ref || github.event.workflow_run.head_branch || github.head_ref }}
- name: Azure login OIDC - name: Azure login OIDC
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d # v1.6.1
with: with:
client-id: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }} client-id: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }}
@ -46,6 +46,6 @@ jobs:
azureClientID: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }} azureClientID: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azureTenantID: ${{ secrets.AZURE_TENANT_ID }} azureTenantID: ${{ secrets.AZURE_TENANT_ID }}
azureIAMCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
registry: ghcr.io registry: ghcr.io
githubToken: ${{ secrets.GITHUB_TOKEN }} githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@ -12,7 +12,7 @@ jobs:
matrix: matrix:
refStream: ["ref/main/stream/debug/?", "ref/release/stream/stable/?"] refStream: ["ref/main/stream/debug/?", "ref/release/stream/stable/?"]
name: Find latest image name: Find latest image
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -21,7 +21,7 @@ jobs:
image-release-stable: ${{ steps.relabel-output.outputs.image-release-stable }} image-release-stable: ${{ steps.relabel-output.outputs.image-release-stable }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
@ -45,21 +45,20 @@ jobs:
fail-fast: false fail-fast: false
max-parallel: 5 max-parallel: 5
matrix: matrix:
kubernetesVersion: ["1.30"] # This should correspond to the current default k8s minor. kubernetesVersion: ["1.28"] # should be default
attestationVariant: ["gcp-sev-es", "gcp-sev-snp", "azure-sev-snp", "azure-tdx", "aws-sev-snp"] attestationVariant: ["gcp-sev-es", "azure-sev-snp", "azure-tdx", "aws-sev-snp"]
refStream: ["ref/main/stream/debug/?", "ref/release/stream/stable/?"] refStream: ["ref/main/stream/debug/?", "ref/release/stream/stable/?"]
test: ["sonobuoy quick"] test: ["sonobuoy quick"]
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
checks: write checks: write
contents: read contents: read
packages: write packages: write
actions: write
needs: [find-latest-image] needs: [find-latest-image]
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
@ -90,7 +89,7 @@ jobs:
gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
kubernetesVersion: ${{ matrix.kubernetesVersion }} kubernetesVersion: ${{ matrix.kubernetesVersion }}
test: ${{ matrix.test }} test: ${{ matrix.test }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }} azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io registry: ghcr.io
@ -122,16 +121,6 @@ jobs:
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Update tfstate
if: always()
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/update_tfstate
with:
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
- name: Notify about failure - name: Notify about failure
if: | if: |
failure() && failure() &&
@ -150,7 +139,7 @@ jobs:
e2e-mini: e2e-mini:
name: Run miniconstellation E2E test name: Run miniconstellation E2E test
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
environment: e2e environment: e2e
permissions: permissions:
id-token: write id-token: write
@ -159,12 +148,12 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Azure login OIDC - name: Azure login OIDC
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d # v1.6.1
with: with:
client-id: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }} client-id: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }}
@ -176,7 +165,7 @@ jobs:
azureClientID: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }} azureClientID: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azureTenantID: ${{ secrets.AZURE_TENANT_ID }} azureTenantID: ${{ secrets.AZURE_TENANT_ID }}
azureIAMCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
registry: ghcr.io registry: ghcr.io
githubToken: ${{ secrets.GITHUB_TOKEN }} githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@ -11,20 +11,19 @@ on:
description: "Which attestation variant to use." description: "Which attestation variant to use."
type: choice type: choice
options: options:
- "aws-sev-snp" - "gcp-sev-es"
- "azure-sev-snp" - "azure-sev-snp"
- "azure-tdx" - "azure-tdx"
- "gcp-sev-es" - "aws-sev-snp"
- "gcp-sev-snp"
default: "azure-sev-snp" default: "azure-sev-snp"
required: true required: true
runner: runner:
description: "Architecture of the runner that executes the CLI" description: "Architecture of the runner that executes the CLI"
type: choice type: choice
options: options:
- "ubuntu-24.04" - "ubuntu-22.04"
- "macos-latest" - "macos-12"
default: "ubuntu-24.04" default: "ubuntu-22.04"
test: test:
description: "The test to run." description: "The test to run."
type: choice type: choice
@ -41,6 +40,7 @@ on:
required: true required: true
kubernetesVersion: kubernetesVersion:
description: "Kubernetes version to create the cluster from." description: "Kubernetes version to create the cluster from."
default: "1.28"
required: true required: true
cliVersion: cliVersion:
description: "Version of a released CLI to download. Leave empty to build the CLI from the checked out ref." description: "Version of a released CLI to download. Leave empty to build the CLI from the checked out ref."

View File

@ -11,20 +11,19 @@ on:
description: "Which attestation variant to use." description: "Which attestation variant to use."
type: choice type: choice
options: options:
- "aws-sev-snp" - "gcp-sev-es"
- "azure-sev-snp" - "azure-sev-snp"
- "azure-tdx" - "azure-tdx"
- "gcp-sev-es" - "aws-sev-snp"
- "gcp-sev-snp"
default: "azure-sev-snp" default: "azure-sev-snp"
required: true required: true
runner: runner:
description: "Architecture of the runner that executes the CLI" description: "Architecture of the runner that executes the CLI"
type: choice type: choice
options: options:
- "ubuntu-24.04" - "ubuntu-22.04"
- "macos-latest" - "macos-12"
default: "ubuntu-24.04" default: "ubuntu-22.04"
test: test:
description: "The test to run." description: "The test to run."
type: choice type: choice
@ -41,6 +40,7 @@ on:
required: true required: true
kubernetesVersion: kubernetesVersion:
description: "Kubernetes version to create the cluster from." description: "Kubernetes version to create the cluster from."
default: "1.28"
required: true required: true
cliVersion: cliVersion:
description: "Version of a released CLI to download. Leave empty to build the CLI from the checked out ref." description: "Version of a released CLI to download. Leave empty to build the CLI from the checked out ref."

View File

@ -31,7 +31,6 @@ on:
- "azure-sev-snp" - "azure-sev-snp"
- "azure-tdx" - "azure-tdx"
- "gcp-sev-es" - "gcp-sev-es"
- "gcp-sev-snp"
default: "azure-sev-snp" default: "azure-sev-snp"
required: true required: true
workflow_call: workflow_call:
@ -63,7 +62,7 @@ on:
jobs: jobs:
provider-example-test: provider-example-test:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -71,7 +70,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with: with:
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -113,6 +112,8 @@ jobs:
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with: with:
useCache: "true"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
nixTools: terraform nixTools: terraform
- name: Create prefix - name: Create prefix
@ -154,7 +155,7 @@ jobs:
- name: Login to AWS (IAM + Cluster role) - name: Login to AWS (IAM + Cluster role)
if: steps.determine.outputs.cloudProvider == 'aws' if: steps.determine.outputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ETerraform role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ETerraform
aws-region: eu-central-1 aws-region: eu-central-1
@ -264,21 +265,11 @@ jobs:
run: | run: |
region=$(echo ${{ inputs.regionZone || 'europe-west3-b' }} | rev | cut -c 3- | rev) region=$(echo ${{ inputs.regionZone || 'europe-west3-b' }} | rev | cut -c 3- | rev)
case "${{ inputs.attestationVariant }}" in
"gcp-sev-snp")
cc_tech="SEV_SNP"
;;
*)
cc_tech="SEV"
;;
esac
cat >> _override.tf <<EOF cat >> _override.tf <<EOF
locals { locals {
project_id = "constellation-e2e" project_id = "constellation-e2e"
region = "${region}" region = "${region}"
zone = "${{ inputs.regionZone || 'europe-west3-b' }}" zone = "${{ inputs.regionZone || 'europe-west3-b' }}"
cc_technology = "${cc_tech}"
} }
EOF EOF
cat _override.tf cat _override.tf
@ -306,19 +297,6 @@ jobs:
cat >> _override.tf <<EOF cat >> _override.tf <<EOF
locals { locals {
instance_type = "Standard_DC4es_v5" instance_type = "Standard_DC4es_v5"
subscription_id = "$(az account show --query id --output tsv)"
}
EOF
cat _override.tf
- name: Create Azure SEV-SNP Terraform overrides
if: inputs.attestationVariant == 'azure-sev-snp'
working-directory: ${{ github.workspace }}/cluster
shell: bash
run: |
cat >> _override.tf <<EOF
locals {
subscription_id = "$(az account show --query id --output tsv)"
} }
EOF EOF
cat _override.tf cat _override.tf
@ -334,15 +312,14 @@ jobs:
working-directory: ${{ github.workspace }}/cluster working-directory: ${{ github.workspace }}/cluster
shell: bash shell: bash
run: | run: |
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts'
terraform init terraform init
if [[ "${{ inputs.attestationVariant }}" == "azure-sev-snp" ]]; then if [[ "${{ inputs.attestationVariant }}" == "azure-sev-snp" ]]; then
timeout 1h terraform apply -target module.azure_iam -auto-approve terraform apply -target module.azure_iam -auto-approve
timeout 1h terraform apply -target module.azure_infrastructure -auto-approve terraform apply -target module.azure_infrastructure -auto-approve
${{ github.workspace }}/build/constellation maa-patch "$(terraform output -raw maa_url)" ${{ github.workspace }}/build/constellation maa-patch "$(terraform output -raw maa_url)"
timeout 1h terraform apply -target constellation_cluster.azure_example -auto-approve terraform apply -target constellation_cluster.azure_example -auto-approve
else else
timeout 1h terraform apply -auto-approve terraform apply -auto-approve
fi fi
- name: Cleanup Terraform Cluster on failure - name: Cleanup Terraform Cluster on failure
@ -353,7 +330,7 @@ jobs:
shell: bash shell: bash
run: | run: |
terraform init terraform init
terraform destroy -auto-approve -lock=false terraform destroy -auto-approve
- name: Add Provider to local Terraform registry # needed if release version was used before - name: Add Provider to local Terraform registry # needed if release version was used before
if: inputs.providerVersion != '' if: inputs.providerVersion != ''
@ -407,7 +384,7 @@ jobs:
shell: bash shell: bash
run: | run: |
terraform init --upgrade terraform init --upgrade
timeout 1h terraform apply -auto-approve terraform apply -auto-approve
- name: Assert upgrade successful - name: Assert upgrade successful
working-directory: ${{ github.workspace }}/cluster working-directory: ${{ github.workspace }}/cluster
@ -415,7 +392,7 @@ jobs:
IMAGE: ${{ inputs.toImage && inputs.toImage || steps.find-latest-image.outputs.image }} IMAGE: ${{ inputs.toImage && inputs.toImage || steps.find-latest-image.outputs.image }}
KUBERNETES: ${{ inputs.toKubernetes }} KUBERNETES: ${{ inputs.toKubernetes }}
MICROSERVICES: ${{ steps.build.outputs.build_version }} MICROSERVICES: ${{ steps.build.outputs.build_version }}
WORKERNODES: 1 WORKERNODES: 1
CONTROLNODES: 1 CONTROLNODES: 1
run: | run: |
terraform output -raw kubeconfig > constellation-admin.conf terraform output -raw kubeconfig > constellation-admin.conf
@ -466,20 +443,20 @@ jobs:
yq e '.nodeGroups.control_plane_default.zone = "eu-central-1a"' -i constellation-conf.yaml yq e '.nodeGroups.control_plane_default.zone = "eu-central-1a"' -i constellation-conf.yaml
yq e '.nodeGroups.worker_default.zone = "eu-central-1a"' -i constellation-conf.yaml yq e '.nodeGroups.worker_default.zone = "eu-central-1a"' -i constellation-conf.yaml
fi fi
KUBECONFIG=${{ github.workspace }}/cluster/constellation-admin.conf bazel run --test_timeout=14400 //e2e/provider-upgrade:provider-upgrade_test -- --want-worker "$WORKERNODES" --want-control "$CONTROLNODES" --cli "${{ github.workspace }}/build/constellation" "$IMAGE_FLAG" "$KUBERNETES_FLAG" "$MICROSERVICES_FLAG" KUBECONFIG=${{ github.workspace }}/cluster/constellation-admin.conf bazel run //e2e/provider-upgrade:provider-upgrade_test -- --want-worker "$WORKERNODES" --want-control "$CONTROLNODES" --cli "${{ github.workspace }}/build/constellation" "$IMAGE_FLAG" "$KUBERNETES_FLAG" "$MICROSERVICES_FLAG"
- name: Destroy Terraform Cluster - name: Destroy Terraform Cluster
# outcome is part of the steps context (https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context) # outcome is part of the steps context (https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context)
if: always() && steps.apply_terraform.outcome != 'skipped' if: always() && steps.apply_terraform.outcome != 'skipped'
working-directory: ${{ github.workspace }}/cluster working-directory: ${{ github.workspace }}/cluster
shell: bash shell: bash
run: | run: |
terraform init terraform init
terraform destroy -auto-approve -lock=false terraform destroy -auto-approve
- name: Notify about failure - name: Notify about failure
if: | if: |
(failure() || cancelled()) && failure() &&
github.ref == 'refs/heads/main' && github.ref == 'refs/heads/main' &&
github.event_name == 'schedule' github.event_name == 'schedule'
continue-on-error: true continue-on-error: true

View File

@ -47,256 +47,197 @@ jobs:
# sonobuoy full test on all k8s versions # sonobuoy full test on all k8s versions
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "azure-tdx"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.27"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.27"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.27"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.27"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.29"
runner: "ubuntu-24.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.29"
runner: "ubuntu-24.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.29"
runner: "ubuntu-24.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "azure-tdx"
kubernetes-version: "v1.29"
runner: "ubuntu-24.04"
clusterCreation: "cli"
- test: "sonobuoy full"
attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.29"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
# verify test on latest k8s version # verify test on latest k8s version
- test: "verify" - test: "verify"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "verify"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
# recover test on latest k8s version # recover test on latest k8s version
- test: "recover" - test: "recover"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "recover"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "recover" - test: "recover"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "recover" - test: "recover"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "recover" - test: "recover"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
# lb test on latest k8s version # lb test on latest k8s version
- test: "lb" - test: "lb"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "lb"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "lb" - test: "lb"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "lb" - test: "lb"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "lb" - test: "lb"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
# autoscaling test on latest k8s version # autoscaling test on latest k8s version
- test: "autoscaling" - test: "autoscaling"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "autoscaling"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "autoscaling" - test: "autoscaling"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "autoscaling" - test: "autoscaling"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "autoscaling" - test: "autoscaling"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
# perf-bench test on latest k8s version # perf-bench test on latest k8s version, not supported on AWS
- test: "perf-bench" - test: "perf-bench"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "perf-bench"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
- test: "perf-bench" - test: "perf-bench"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli"
- test: "perf-bench"
attestationVariant: "azure-tdx"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli"
- test: "perf-bench"
attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30"
runner: "ubuntu-24.04"
clusterCreation: "cli" clusterCreation: "cli"
# s3proxy test on latest k8s version # s3proxy test on latest k8s version
- test: "s3proxy" - test: "s3proxy"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "ubuntu-24.04" runner: "ubuntu-22.04"
clusterCreation: "cli" clusterCreation: "cli"
# malicious join test on latest k8s version # malicious join test on latest k8s version
- test: "malicious join" - test: "malicious join"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
runner: "ubuntu-24.04"
- test: "malicious join"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli"
runner: "ubuntu-24.04"
- test: "malicious join" - test: "malicious join"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
runner: "ubuntu-24.04"
- test: "malicious join" - test: "malicious join"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
runner: "ubuntu-24.04"
- test: "malicious join" - test: "malicious join"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
runner: "ubuntu-24.04"
# #
# Tests on macOS runner # Tests on macOS runner
@ -305,12 +246,12 @@ jobs:
# TODO(3u13r): Update verify test to work on MacOS runners # TODO(3u13r): Update verify test to work on MacOS runners
# - test: "verify" # - test: "verify"
# attestationVariant: "azure-sev-snp" # attestationVariant: "azure-sev-snp"
# kubernetes-version: "v1.30" # kubernetes-version: "v1.29"
# runner: "macos-latest" # runner: "macos-12"
- test: "recover" - test: "recover"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
runner: "macos-latest" runner: "macos-12"
clusterCreation: "cli" clusterCreation: "cli"
runs-on: ${{ matrix.runner }} runs-on: ${{ matrix.runner }}
permissions: permissions:
@ -318,7 +259,6 @@ jobs:
checks: write checks: write
contents: read contents: read
packages: write packages: write
actions: write
steps: steps:
- name: Install the basics tools (macOS) - name: Install the basics tools (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
@ -326,7 +266,7 @@ jobs:
run: brew install coreutils kubectl bash run: brew install coreutils kubectl bash
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ inputs.ref || github.head_ref }} ref: ${{ inputs.ref || github.head_ref }}
@ -342,7 +282,7 @@ jobs:
- name: Set up gcloud CLI (macOS) - name: Set up gcloud CLI (macOS)
if: steps.split-attestationVariant.outputs.provider == 'gcp' && runner.os == 'macOS' if: steps.split-attestationVariant.outputs.provider == 'gcp' && runner.os == 'macOS'
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4 uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
- name: Run E2E test - name: Run E2E test
id: e2e_test id: e2e_test
@ -364,7 +304,7 @@ jobs:
gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com" gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com"
gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
test: ${{ matrix.test }} test: ${{ matrix.test }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }} azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io registry: ghcr.io
@ -394,23 +334,13 @@ jobs:
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Update tfstate
if: always()
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/update_tfstate
with:
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
e2e-upgrade: e2e-upgrade:
strategy: strategy:
fail-fast: false fail-fast: false
max-parallel: 1 max-parallel: 1
matrix: matrix:
fromVersion: ["v2.22.0"] fromVersion: ["v2.15.1"]
attestationVariant: ["gcp-sev-snp", "azure-sev-snp", "azure-tdx", "aws-sev-snp"] attestationVariant: ["gcp-sev-es", "azure-sev-snp", "azure-tdx", "aws-sev-snp"]
name: Run upgrade tests name: Run upgrade tests
secrets: inherit secrets: inherit
permissions: permissions:
@ -418,7 +348,6 @@ jobs:
contents: read contents: read
checks: write checks: write
packages: write packages: write
actions: write
uses: ./.github/workflows/e2e-upgrade.yml uses: ./.github/workflows/e2e-upgrade.yml
with: with:
fromVersion: ${{ matrix.fromVersion }} fromVersion: ${{ matrix.fromVersion }}

View File

@ -1,153 +0,0 @@
name: e2e test STACKIT
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Every day at midnight.
jobs:
find-latest-image:
name: Find latest image
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
outputs:
image-release-stable: ${{ steps.relabel-output.outputs.image-release-stable }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Select relevant image
id: select-image-action
uses: ./.github/actions/select_image
with:
osImage: "ref/release/stream/stable/?"
- name: Relabel output
id: relabel-output
shell: bash
run: |
ref=$(echo 'ref/release/stream/stable/?' | cut -d/ -f2)
stream=$(echo 'ref/release/stream/stable/?' | cut -d/ -f4)
echo "image-$ref-$stream=${{ steps.select-image-action.outputs.osImage }}" | tee -a "$GITHUB_OUTPUT"
e2e-stackit:
strategy:
fail-fast: false
max-parallel: 6
matrix:
kubernetesVersion: [ "1.29", "1.30", "1.31" ]
clusterCreation: [ "cli", "terraform" ]
test: [ "sonobuoy quick" ]
runs-on: ubuntu-24.04
permissions:
id-token: write
checks: write
contents: read
packages: write
actions: write
needs: [find-latest-image]
steps:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup bazel
uses: ./.github/actions/setup_bazel_nix
with:
nixTools: terraform
- name: Run E2E test
id: e2e_test
uses: ./.github/actions/e2e_test
with:
workerNodesCount: "1"
controlNodesCount: "1"
cloudProvider: stackit
attestationVariant: qemu-vtpm
osImage: ${{ needs.find-latest-image.outputs.image-release-stable }}
isDebugImage: false
cliVersion: ${{ needs.find-latest-image.outputs.image-release-stable || '' }}
kubernetesVersion: ${{ matrix.kubernetesVersion }}
awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }}
awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }}
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}
gcpProject: constellation-e2e
gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com"
gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
test: ${{ matrix.test }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io
githubToken: ${{ secrets.GITHUB_TOKEN }}
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
fetchMeasurements: false
clusterCreation: ${{ matrix.clusterCreation }}
s3AccessKey: ${{ secrets.AWS_ACCESS_KEY_ID_S3PROXY }}
s3SecretKey: ${{ secrets.AWS_SECRET_ACCESS_KEY_S3PROXY }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
openStackCloudsYaml: ${{ secrets.STACKIT_CI_CLOUDS_YAML }}
stackitUat: ${{ secrets.STACKIT_CI_UAT }}
stackitProjectID: ${{ secrets.STACKIT_CI_PROJECT_ID }}
- name: Always terminate cluster
if: always()
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
clusterCreation: ${{ matrix.clusterCreation }}
cloudProvider: stackit
azureClusterDeleteCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
gcpClusterDeleteServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Always delete IAM configuration
if: always()
uses: ./.github/actions/constellation_iam_destroy
with:
cloudProvider: stackit
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Update tfstate
if: always()
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/update_tfstate
with:
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
- name: Notify about failure
if: |
failure() &&
github.ref == 'refs/heads/main' &&
github.event_name == 'schedule'
continue-on-error: true
uses: ./.github/actions/notify_e2e_failure
with:
projectWriteToken: ${{ secrets.PROJECT_WRITE_TOKEN }}
refStream: "ref/release/stream/stable/?"
test: ${{ matrix.test }}
kubernetesVersion: ${{ matrix.kubernetesVersion }}
provider: stackit
attestationVariant: qemu-vtpm
clusterCreation: ${{ matrix.clusterCreation }}
- name: Notify STACKIT
if: |
failure() &&
github.ref == 'refs/heads/main' &&
github.event_name == 'schedule'
continue-on-error: true
uses: ./.github/actions/notify_stackit
with:
slackToken: ${{ secrets.SLACK_TOKEN }}

View File

@ -11,20 +11,19 @@ on:
description: "Which attestation variant to use." description: "Which attestation variant to use."
type: choice type: choice
options: options:
- "aws-sev-snp" - "gcp-sev-es"
- "azure-sev-snp" - "azure-sev-snp"
- "azure-tdx" - "azure-tdx"
- "gcp-sev-es" - "aws-sev-snp"
- "gcp-sev-snp"
default: "azure-sev-snp" default: "azure-sev-snp"
required: true required: true
runner: runner:
description: "Architecture of the runner that executes the CLI" description: "Architecture of the runner that executes the CLI"
type: choice type: choice
options: options:
- "ubuntu-24.04" - "ubuntu-22.04"
- "macos-latest" - "macos-12"
default: "ubuntu-24.04" default: "ubuntu-22.04"
test: test:
description: "The test to run." description: "The test to run."
type: choice type: choice
@ -41,6 +40,7 @@ on:
required: true required: true
kubernetesVersion: kubernetesVersion:
description: "Kubernetes version to create the cluster from." description: "Kubernetes version to create the cluster from."
default: "1.28"
required: true required: true
releaseVersion: releaseVersion:
description: "Version of a released provider to download. Leave empty to build the provider from the checked out ref." description: "Version of a released provider to download. Leave empty to build the provider from the checked out ref."

View File

@ -10,9 +10,9 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
refStream: ["ref/main/stream/nightly/?", "ref/main/stream/debug/?", "ref/release/stream/stable/?"] refStream: ["ref/main/stream/nightly/?","ref/main/stream/debug/?", "ref/release/stream/stable/?"]
name: Find latest image name: Find latest image
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -22,7 +22,7 @@ jobs:
image-main-nightly: ${{ steps.relabel-output.outputs.image-main-nightly }} image-main-nightly: ${{ steps.relabel-output.outputs.image-main-nightly }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
@ -51,261 +51,184 @@ jobs:
# Tests on main-debug refStream # Tests on main-debug refStream
# #
# Emergency SSH test on latest k8s version
- test: "emergency ssh"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30"
clusterCreation: "cli"
- test: "emergency ssh"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli"
- test: "emergency ssh"
refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli"
- test: "emergency ssh"
refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx"
kubernetes-version: "v1.30"
clusterCreation: "cli"
- test: "emergency ssh"
refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli"
# Sonobuoy full test on latest k8s version # Sonobuoy full test on latest k8s version
- test: "sonobuoy full" - test: "sonobuoy full"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
- test: "sonobuoy full"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy full" - test: "sonobuoy full"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
# Sonobuoy conformance test
- test: "sonobuoy conformance"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
# Sonobuoy quick test on all but the latest k8s versions # Sonobuoy quick test on all but the latest k8s versions
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli"
- test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.29" kubernetes-version: "v1.27"
clusterCreation: "cli"
- test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.29" kubernetes-version: "v1.27"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.29" kubernetes-version: "v1.27"
clusterCreation: "cli" clusterCreation: "cli"
- test: "sonobuoy quick" - test: "sonobuoy quick"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.29" kubernetes-version: "v1.27"
clusterCreation: "cli" clusterCreation: "cli"
# verify test on latest k8s version # verify test on latest k8s version
- test: "verify" - test: "verify"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
- test: "verify"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
azureSNPEnforcementPolicy: "equal" # This run checks for unknown ID Key disgests. azureSNPEnforcementPolicy: "equal" # This run checks for unknown ID Key disgests.
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
# recover test on latest k8s version # recover test on latest k8s version
- test: "recover" - test: "recover"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
- test: "recover"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "recover" - test: "recover"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "recover" - test: "recover"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "recover" - test: "recover"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
# lb test on latest k8s version # lb test on latest k8s version
- test: "lb" - test: "lb"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
- test: "lb"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "lb" - test: "lb"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "lb" - test: "lb"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "lb" - test: "lb"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
# autoscaling test on latest k8s version # autoscaling test on latest k8s version
- test: "autoscaling" - test: "autoscaling"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
- test: "autoscaling"
refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "autoscaling" - test: "autoscaling"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "autoscaling" - test: "autoscaling"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "autoscaling" - test: "autoscaling"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
# perf-bench test on latest k8s version # perf-bench test on latest k8s version, not supported on AWS
- test: "perf-bench" - test: "perf-bench"
refStream: "ref/main/stream/nightly/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
- test: "perf-bench" - test: "perf-bench"
refStream: "ref/main/stream/nightly/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli"
- test: "perf-bench"
refStream: "ref/main/stream/nightly/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli"
- test: "perf-bench"
refStream: "ref/main/stream/nightly/?"
attestationVariant: "azure-tdx"
kubernetes-version: "v1.30"
clusterCreation: "cli"
- test: "perf-bench"
refStream: "ref/main/stream/nightly/?"
attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
# TODO: check what needs to be done for perf-bench on Azure TDX
#- test: "perf-bench"
# refStream: "ref/main/stream/debug/?"
# attestationVariant: "azure-tdx"
# kubernetes-version: "v1.29"
# clusterCreation: "cli"
# s3proxy test on latest k8s version # s3proxy test on latest k8s version
- test: "s3proxy" - test: "s3proxy"
refStream: "ref/main/stream/debug/?" refStream: "ref/main/stream/debug/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.29"
clusterCreation: "cli" clusterCreation: "cli"
# #
@ -316,40 +239,34 @@ jobs:
- test: "verify" - test: "verify"
refStream: "ref/release/stream/stable/?" refStream: "ref/release/stream/stable/?"
attestationVariant: "gcp-sev-es" attestationVariant: "gcp-sev-es"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli"
- test: "verify"
refStream: "ref/release/stream/stable/?"
attestationVariant: "gcp-sev-snp"
kubernetes-version: "v1.30"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
refStream: "ref/release/stream/stable/?" refStream: "ref/release/stream/stable/?"
attestationVariant: "azure-sev-snp" attestationVariant: "azure-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
refStream: "ref/release/stream/stable/?" refStream: "ref/release/stream/stable/?"
attestationVariant: "azure-tdx" attestationVariant: "azure-tdx"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli" clusterCreation: "cli"
- test: "verify" - test: "verify"
refStream: "ref/release/stream/stable/?" refStream: "ref/release/stream/stable/?"
attestationVariant: "aws-sev-snp" attestationVariant: "aws-sev-snp"
kubernetes-version: "v1.30" kubernetes-version: "v1.28"
clusterCreation: "cli" clusterCreation: "cli"
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
checks: write checks: write
contents: read contents: read
packages: write packages: write
actions: write
needs: [find-latest-image] needs: [find-latest-image]
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
@ -371,7 +288,7 @@ jobs:
controlNodesCount: "3" controlNodesCount: "3"
cloudProvider: ${{ steps.split-attestationVariant.outputs.cloudProvider }} cloudProvider: ${{ steps.split-attestationVariant.outputs.cloudProvider }}
attestationVariant: ${{ matrix.attestationVariant }} attestationVariant: ${{ matrix.attestationVariant }}
osImage: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || matrix.refStream == 'ref/main/stream/nightly/?' && needs.find-latest-image.outputs.image-main-nightly || needs.find-latest-image.outputs.image-main-debug }} osImage: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || needs.find-latest-image.outputs.image-main-debug }}
isDebugImage: ${{ matrix.refStream == 'ref/main/stream/debug/?' }} isDebugImage: ${{ matrix.refStream == 'ref/main/stream/debug/?' }}
cliVersion: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || '' }} cliVersion: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || '' }}
kubernetesVersion: ${{ matrix.kubernetes-version }} kubernetesVersion: ${{ matrix.kubernetes-version }}
@ -383,7 +300,7 @@ jobs:
gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com" gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com"
gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
test: ${{ matrix.test }} test: ${{ matrix.test }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }} azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io registry: ghcr.io
@ -415,16 +332,6 @@ jobs:
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Update tfstate
if: always()
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/update_tfstate
with:
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
- name: Notify about failure - name: Notify about failure
if: | if: |
failure() && failure() &&
@ -446,8 +353,8 @@ jobs:
fail-fast: false fail-fast: false
max-parallel: 1 max-parallel: 1
matrix: matrix:
fromVersion: ["v2.22.0"] fromVersion: ["v2.15.1"]
attestationVariant: ["gcp-sev-snp", "azure-sev-snp", "azure-tdx", "aws-sev-snp"] attestationVariant: ["gcp-sev-es", "azure-sev-snp", "azure-tdx", "aws-sev-snp"]
name: Run upgrade tests name: Run upgrade tests
secrets: inherit secrets: inherit
permissions: permissions:
@ -455,7 +362,6 @@ jobs:
checks: write checks: write
contents: read contents: read
packages: write packages: write
actions: write
uses: ./.github/workflows/e2e-upgrade.yml uses: ./.github/workflows/e2e-upgrade.yml
with: with:
fromVersion: ${{ matrix.fromVersion }} fromVersion: ${{ matrix.fromVersion }}
@ -465,7 +371,7 @@ jobs:
e2e-mini: e2e-mini:
name: Run miniconstellation E2E test name: Run miniconstellation E2E test
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
environment: e2e environment: e2e
permissions: permissions:
id-token: write id-token: write
@ -474,12 +380,12 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
id: checkout id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Azure login OIDC - name: Azure login OIDC
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d # v1.6.1
with: with:
client-id: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }} client-id: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }}
@ -491,7 +397,7 @@ jobs:
azureClientID: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }} azureClientID: ${{ secrets.AZURE_E2E_MINI_CLIENT_ID }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azureTenantID: ${{ secrets.AZURE_TENANT_ID }} azureTenantID: ${{ secrets.AZURE_TENANT_ID }}
azureIAMCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
registry: ghcr.io registry: ghcr.io
githubToken: ${{ secrets.GITHUB_TOKEN }} githubToken: ${{ secrets.GITHUB_TOKEN }}
@ -514,7 +420,6 @@ jobs:
id-token: write id-token: write
contents: read contents: read
packages: write packages: write
checks: write
secrets: inherit secrets: inherit
uses: ./.github/workflows/e2e-windows.yml uses: ./.github/workflows/e2e-windows.yml
with: with:
@ -525,7 +430,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
attestationVariant: ["gcp-sev-snp", "azure-sev-snp", "azure-tdx", "aws-sev-snp"] attestationVariant: ["gcp-sev-es", "azure-sev-snp", "azure-tdx", "aws-sev-snp"]
permissions: permissions:
id-token: write id-token: write
contents: read contents: read

View File

@ -12,27 +12,24 @@ on:
type: choice type: choice
options: options:
- "gcp-sev-es" - "gcp-sev-es"
- "gcp-sev-snp"
- "azure-sev-snp" - "azure-sev-snp"
- "azure-tdx" - "azure-tdx"
- "aws-sev-snp" - "aws-sev-snp"
- "stackit-qemu-vtpm"
default: "azure-sev-snp" default: "azure-sev-snp"
required: true required: true
runner: runner:
description: "Architecture of the runner that executes the CLI" description: "Architecture of the runner that executes the CLI"
type: choice type: choice
options: options:
- "ubuntu-24.04" - "ubuntu-22.04"
- "macos-latest" - "macos-12"
default: "ubuntu-24.04" default: "ubuntu-22.04"
test: test:
description: "The test to run. The conformance test is only supported for clusterCreation=cli." description: "The test to run."
type: choice type: choice
options: options:
- "sonobuoy quick" - "sonobuoy quick"
- "sonobuoy full" - "sonobuoy full"
- "sonobuoy conformance"
- "autoscaling" - "autoscaling"
- "lb" - "lb"
- "perf-bench" - "perf-bench"
@ -40,12 +37,11 @@ on:
- "recover" - "recover"
- "malicious join" - "malicious join"
- "s3proxy" - "s3proxy"
- "emergency ssh"
- "nop" - "nop"
required: true required: true
kubernetesVersion: kubernetesVersion:
description: "Kubernetes version to create the cluster from." description: "Kubernetes version to create the cluster from."
default: "1.30" default: "1.28"
required: true required: true
cliVersion: cliVersion:
description: "Version of a released CLI to download. Leave empty to build the CLI from the checked out ref." description: "Version of a released CLI to download. Leave empty to build the CLI from the checked out ref."
@ -85,7 +81,7 @@ on:
type: string type: string
required: true required: true
test: test:
description: "The test to run. The conformance test is only supported for clusterCreation=cli." description: "The test to run."
type: string type: string
required: true required: true
kubernetesVersion: kubernetesVersion:
@ -131,7 +127,7 @@ on:
jobs: jobs:
generate-input-parameters: generate-input-parameters:
name: Generate input parameters name: Generate input parameters
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -139,7 +135,6 @@ jobs:
workerNodes: ${{ steps.split-nodeCount.outputs.workerNodes }} workerNodes: ${{ steps.split-nodeCount.outputs.workerNodes }}
controlPlaneNodes: ${{ steps.split-nodeCount.outputs.controlPlaneNodes }} controlPlaneNodes: ${{ steps.split-nodeCount.outputs.controlPlaneNodes }}
cloudProvider: ${{ steps.split-attestationVariant.outputs.cloudProvider }} cloudProvider: ${{ steps.split-attestationVariant.outputs.cloudProvider }}
attestationVariant: ${{ steps.split-attestationVariant.outputs.attestationVariant }}
steps: steps:
- name: Split nodeCount - name: Split nodeCount
id: split-nodeCount id: split-nodeCount
@ -164,17 +159,11 @@ jobs:
attestationVariant="${{ inputs.attestationVariant }}" attestationVariant="${{ inputs.attestationVariant }}"
cloudProvider="${attestationVariant%%-*}" cloudProvider="${attestationVariant%%-*}"
# special case for STACKIT, as there's no special attestation variant for it
if [[ "${cloudProvider}" == "stackit" ]]; then
attestationVariant="qemu-vtpm"
fi
echo "attestationVariant=${attestationVariant}" | tee -a "$GITHUB_OUTPUT"
echo "cloudProvider=${cloudProvider}" | tee -a "$GITHUB_OUTPUT" echo "cloudProvider=${cloudProvider}" | tee -a "$GITHUB_OUTPUT"
find-latest-image: find-latest-image:
name: Select image name: Select image
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -184,13 +173,13 @@ jobs:
steps: steps:
- name: Checkout head - name: Checkout head
if: inputs.git-ref == 'head' if: inputs.git-ref == 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref - name: Checkout ref
if: inputs.git-ref != 'head' if: inputs.git-ref != 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.git-ref }} ref: ${{ inputs.git-ref }}
@ -210,7 +199,6 @@ jobs:
checks: write checks: write
contents: read contents: read
packages: write packages: write
actions: write
needs: [find-latest-image, generate-input-parameters] needs: [find-latest-image, generate-input-parameters]
if: always() && !cancelled() if: always() && !cancelled()
steps: steps:
@ -221,19 +209,19 @@ jobs:
- name: Checkout head - name: Checkout head
if: inputs.git-ref == 'head' if: inputs.git-ref == 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref - name: Checkout ref
if: inputs.git-ref != 'head' if: inputs.git-ref != 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ inputs.git-ref }} ref: ${{ inputs.git-ref }}
- name: Set up gcloud CLI (macOS) - name: Set up gcloud CLI (macOS)
if: needs.generate-input-parameters.outputs.cloudProvider == 'gcp' && runner.os == 'macOS' if: needs.generate-input-parameters.outputs.cloudProvider == 'gcp' && runner.os == 'macOS'
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4 uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
- name: Run manual E2E test - name: Run manual E2E test
id: e2e_test id: e2e_test
@ -242,7 +230,7 @@ jobs:
workerNodesCount: ${{ needs.generate-input-parameters.outputs.workerNodes }} workerNodesCount: ${{ needs.generate-input-parameters.outputs.workerNodes }}
controlNodesCount: ${{ needs.generate-input-parameters.outputs.controlPlaneNodes }} controlNodesCount: ${{ needs.generate-input-parameters.outputs.controlPlaneNodes }}
cloudProvider: ${{ needs.generate-input-parameters.outputs.cloudProvider }} cloudProvider: ${{ needs.generate-input-parameters.outputs.cloudProvider }}
attestationVariant: ${{ needs.generate-input-parameters.outputs.attestationVariant }} attestationVariant: ${{ inputs.attestationVariant }}
machineType: ${{ inputs.machineType }} machineType: ${{ inputs.machineType }}
regionZone: ${{ inputs.regionZone }} regionZone: ${{ inputs.regionZone }}
gcpProject: constellation-e2e gcpProject: constellation-e2e
@ -256,7 +244,7 @@ jobs:
osImage: ${{ needs.find-latest-image.outputs.image }} osImage: ${{ needs.find-latest-image.outputs.image }}
cliVersion: ${{ inputs.cliVersion }} cliVersion: ${{ inputs.cliVersion }}
isDebugImage: ${{ needs.find-latest-image.outputs.isDebugImage }} isDebugImage: ${{ needs.find-latest-image.outputs.isDebugImage }}
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }} azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io registry: ghcr.io
@ -271,9 +259,6 @@ jobs:
marketplaceImageVersion: ${{ inputs.marketplaceImageVersion }} marketplaceImageVersion: ${{ inputs.marketplaceImageVersion }}
force: ${{ inputs.force }} force: ${{ inputs.force }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }} encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
openStackCloudsYaml: ${{ secrets.STACKIT_CI_CLOUDS_YAML }}
stackitUat: ${{ secrets.STACKIT_CI_UAT }}
stackitProjectID: ${{ secrets.STACKIT_CI_PROJECT_ID }}
- name: Always terminate cluster - name: Always terminate cluster
if: always() if: always()
@ -292,13 +277,3 @@ jobs:
cloudProvider: ${{ needs.generate-input-parameters.outputs.cloudProvider }} cloudProvider: ${{ needs.generate-input-parameters.outputs.cloudProvider }}
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Update tfstate
if: always()
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/update_tfstate
with:
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}

View File

@ -7,11 +7,10 @@ on:
description: "Which attestation variant to use." description: "Which attestation variant to use."
type: choice type: choice
options: options:
- "aws-sev-snp" - "gcp-sev-es"
- "azure-sev-snp" - "azure-sev-snp"
- "azure-tdx" - "azure-tdx"
- "gcp-sev-es" - "aws-sev-snp"
- "gcp-sev-snp"
default: "azure-sev-snp" default: "azure-sev-snp"
required: true required: true
nodeCount: nodeCount:
@ -22,10 +21,6 @@ on:
description: CLI version to create a new cluster with. This has to be a released version, e.g., 'v2.1.3'. description: CLI version to create a new cluster with. This has to be a released version, e.g., 'v2.1.3'.
type: string type: string
required: true required: true
fromKubernetes:
description: Kubernetes version for the origin cluster, empty for origin target's default version.
type: string
required: false
gitRef: gitRef:
description: Ref to build upgrading CLI on, empty for HEAD. description: Ref to build upgrading CLI on, empty for HEAD.
type: string type: string
@ -36,11 +31,11 @@ on:
type: string type: string
required: false required: false
toKubernetes: toKubernetes:
description: Kubernetes version to target for the upgrade, empty for upgrade target's default version. description: Kubernetes version to target for the upgrade, empty for target's default version.
type: string type: string
required: false required: false
toMicroservices: toMicroservices:
description: Microservice version to target for the upgrade, empty for upgrade target's default version. description: Microservice version to target for the upgrade, empty for target's default version.
type: string type: string
required: false required: false
simulatedTargetVersion: simulatedTargetVersion:
@ -64,10 +59,6 @@ on:
description: CLI version to create a new cluster with. This has to be a released version, e.g., 'v2.1.3'. description: CLI version to create a new cluster with. This has to be a released version, e.g., 'v2.1.3'.
type: string type: string
required: true required: true
fromKubernetes:
description: Kubernetes version for the origin cluster, empty for origin target's default version.
type: string
required: false
gitRef: gitRef:
description: Ref to build upgrading CLI on. description: Ref to build upgrading CLI on.
type: string type: string
@ -98,7 +89,7 @@ on:
jobs: jobs:
generate-input-parameters: generate-input-parameters:
name: Generate input parameters name: Generate input parameters
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
@ -132,9 +123,63 @@ jobs:
echo "cloudProvider=${cloudProvider}" | tee -a "$GITHUB_OUTPUT" echo "cloudProvider=${cloudProvider}" | tee -a "$GITHUB_OUTPUT"
build-target-cli:
name: Build upgrade target version CLI
runs-on: ubuntu-22.04
permissions:
id-token: write
checks: write
contents: read
packages: write
steps:
- name: Checkout
if: inputs.gitRef == 'head'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref
if: inputs.gitRef != 'head'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
ref: ${{ inputs.gitRef }}
- name: Setup Bazel & Nix
uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Log in to the Container registry
uses: ./.github/actions/container_registry_login
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Simulate patch upgrade
if: inputs.simulatedTargetVersion != ''
run: |
echo ${{ inputs.simulatedTargetVersion }} > version.txt
- name: Build CLI
uses: ./.github/actions/build_cli
with:
enterpriseCLI: true
outputPath: "build/constellation"
push: true
- name: Upload CLI binary
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: constellation-upgrade-${{ inputs.attestationVariant }}
path: build/constellation
create-cluster: create-cluster:
name: Create upgrade origin version cluster name: Create upgrade origin version cluster
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
checks: write checks: write
@ -143,23 +188,25 @@ jobs:
needs: [generate-input-parameters] needs: [generate-input-parameters]
outputs: outputs:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }} kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
e2e-name-prefix: ${{ steps.e2e_test.outputs.namePrefix }}
steps: steps:
- name: Checkout - name: Checkout
if: inputs.gitRef == 'head' if: inputs.gitRef == 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref - name: Checkout ref
if: inputs.gitRef != 'head' if: inputs.gitRef != 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ inputs.gitRef }} ref: ${{ inputs.gitRef }}
- uses: ./.github/actions/setup_bazel_nix - uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Create cluster with 'fromVersion' CLI. - name: Create cluster with 'fromVersion' CLI.
id: e2e_test id: e2e_test
@ -172,13 +219,12 @@ jobs:
osImage: ${{ inputs.fromVersion }} osImage: ${{ inputs.fromVersion }}
isDebugImage: "false" isDebugImage: "false"
cliVersion: ${{ inputs.fromVersion }} cliVersion: ${{ inputs.fromVersion }}
kubernetesVersion: ${{ inputs.fromKubernetes }}
regionZone: ${{ inputs.regionZone }} regionZone: ${{ inputs.regionZone }}
gcpProject: constellation-e2e gcpProject: constellation-e2e
gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com" gcpClusterCreateServiceAccount: "infrastructure-e2e@constellation-e2e.iam.gserviceaccount.com"
gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpIAMCreateServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
test: "upgrade" test: "upgrade"
azureSubscriptionID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }} azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }}
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io registry: ghcr.io
@ -220,7 +266,7 @@ jobs:
e2e-upgrade: e2e-upgrade:
name: Run upgrade test name: Run upgrade test
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
checks: write checks: write
@ -228,53 +274,31 @@ jobs:
packages: write packages: write
needs: needs:
- generate-input-parameters - generate-input-parameters
- build-target-cli
- create-cluster - create-cluster
steps: steps:
- name: Checkout - name: Checkout
if: inputs.gitRef == 'head' if: inputs.gitRef == 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref - name: Checkout ref
if: inputs.gitRef != 'head' if: inputs.gitRef != 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ inputs.gitRef }} ref: ${{ inputs.gitRef }}
- name: Setup Bazel & Nix - name: Setup Bazel & Nix
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
- name: Log in to the Container registry
uses: ./.github/actions/container_registry_login
with: with:
registry: ghcr.io useCache: "true"
username: ${{ github.actor }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
password: ${{ secrets.GITHUB_TOKEN }}
# applying the version manipulation here so that the upgrade test tool is also on the simulated target version
- name: Simulate patch upgrade
if: inputs.simulatedTargetVersion != ''
run: |
echo ${{ inputs.simulatedTargetVersion }} > version.txt
- name: Build CLI
uses: ./.github/actions/build_cli
with:
enterpriseCLI: true
outputPath: "build/constellation"
push: true
- name: Upload CLI binary # is needed for the cleanup step
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: constellation-upgrade-${{ inputs.attestationVariant }}
path: build/constellation
- name: Login to AWS - name: Login to AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
aws-region: eu-central-1 aws-region: eu-central-1
@ -296,7 +320,7 @@ jobs:
- name: Login to AWS (IAM role) - name: Login to AWS (IAM role)
if: needs.generate-input-parameters.outputs.cloudProvider == 'aws' if: needs.generate-input-parameters.outputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EIAM
aws-region: eu-central-1 aws-region: eu-central-1
@ -309,6 +333,11 @@ jobs:
with: with:
azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
- name: Download CLI
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: constellation-upgrade-${{ inputs.attestationVariant }}
path: build
- name: Download Working Directory (Pre-test) - name: Download Working Directory (Pre-test)
uses: ./.github/actions/artifact_download uses: ./.github/actions/artifact_download
@ -347,7 +376,7 @@ jobs:
- name: Login to AWS (Cluster role) - name: Login to AWS (Cluster role)
if: always() && needs.generate-input-parameters.outputs.cloudProvider == 'aws' if: always() && needs.generate-input-parameters.outputs.cloudProvider == 'aws'
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2ECluster
aws-region: eu-central-1 aws-region: eu-central-1
@ -366,16 +395,21 @@ jobs:
IMAGE: ${{ inputs.toImage && inputs.toImage || steps.find-image.outputs.output }} IMAGE: ${{ inputs.toImage && inputs.toImage || steps.find-image.outputs.output }}
KUBERNETES: ${{ inputs.toKubernetes }} KUBERNETES: ${{ inputs.toKubernetes }}
MICROSERVICES: ${{ inputs.toMicroservices }} MICROSERVICES: ${{ inputs.toMicroservices }}
WORKERNODES: ${{ needs.generate-input-parameters.outputs.workerNodes }} WORKERNODES: ${{ needs.generate-input-parameters.outputs.workerNodes }}
CONTROLNODES: ${{ needs.generate-input-parameters.outputs.controlPlaneNodes }} CONTROLNODES: ${{ needs.generate-input-parameters.outputs.controlPlaneNodes }}
run: | run: |
echo "Image target: $IMAGE" echo "Image target: $IMAGE"
echo "K8s target: $KUBERNETES" echo "K8s target: $KUBERNETES"
echo "Microservice target: $MICROSERVICES" echo "Microservice target: $MICROSERVICES"
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' if [[ -n ${MICROSERVICES} ]]; then
CLI=$(realpath ./build/constellation) MICROSERVICES_FLAG="--target-microservices=$MICROSERVICES"
bazel run --test_timeout=14400 //e2e/internal/upgrade:upgrade_test -- --want-worker "$WORKERNODES" --want-control "$CONTROLNODES" --target-image "$IMAGE" --target-kubernetes "$KUBERNETES" --target-microservices "$MICROSERVICES" --cli "$CLI" fi
if [[ -n ${KUBERNETES} ]]; then
KUBERNETES_FLAG="--target-kubernetes=$KUBERNETES"
fi
bazel run //e2e/internal/upgrade:upgrade_test -- --want-worker "$WORKERNODES" --want-control "$CONTROLNODES" --target-image "$IMAGE" "$KUBERNETES_FLAG" "$MICROSERVICES_FLAG"
- name: Remove Terraform plugin cache - name: Remove Terraform plugin cache
if: always() if: always()
@ -399,32 +433,31 @@ jobs:
clean-up: clean-up:
name: Clean up resources name: Clean up resources
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
checks: write checks: write
contents: read contents: read
packages: write packages: write
actions: write
if: always() if: always()
needs: [generate-input-parameters, create-cluster, e2e-upgrade] needs: [generate-input-parameters, create-cluster, e2e-upgrade]
steps: steps:
- name: Checkout - name: Checkout
if: inputs.gitRef == 'head' if: inputs.gitRef == 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Checkout ref - name: Checkout ref
if: inputs.gitRef != 'head' if: inputs.gitRef != 'head'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ inputs.gitRef }} ref: ${{ inputs.gitRef }}
- name: Download CLI - name: Download CLI
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: constellation-upgrade-${{ inputs.attestationVariant }} name: constellation-upgrade-${{ inputs.attestationVariant }}
path: build path: build
@ -470,17 +503,6 @@ jobs:
constellation-version.yaml constellation-version.yaml
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }} encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
- name: Prepare terraform state artifact upload
if: always()
shell: bash
run: |
mkdir -p to-zip
cp -r constellation-terraform to-zip
rm -f to-zip/constellation-terraform/plan.zip
rm -rf to-zip/constellation-terraform/.terraform
cp -r constellation-iam-terraform to-zip
rm -rf to-zip/constellation-iam-terraform/.terraform
- name: Always terminate cluster - name: Always terminate cluster
if: always() if: always()
uses: ./.github/actions/constellation_destroy uses: ./.github/actions/constellation_destroy
@ -499,16 +521,6 @@ jobs:
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Update tfstate
if: always()
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/update_tfstate
with:
name: terraform-state-${{ needs.create-cluster.outputs.e2e-name-prefix }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
- name: Notify about failure - name: Notify about failure
if: | if: |
always() && always() &&

View File

@ -13,27 +13,18 @@ on:
jobs: jobs:
build-cli: build-cli:
name: Build Windows CLI name: Build Windows CLI
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions:
id-token: write
checks: write
contents: read
packages: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
- name: Log in to the Container registry
uses: ./.github/actions/container_registry_login
with: with:
registry: ghcr.io useCache: "true"
username: ${{ github.actor }} buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build CLI - name: Build CLI
uses: ./.github/actions/build_cli uses: ./.github/actions/build_cli
@ -41,35 +32,33 @@ jobs:
targetOS: "windows" targetOS: "windows"
targetArch: "amd64" targetArch: "amd64"
enterpriseCLI: true enterpriseCLI: true
outputPath: "build/constellation"
push: true
- name: Upload CLI artifact - name: Upload CLI artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
path: build/constellation.exe path: "bazel-bin/cli/cli_enterprise_windows_amd64"
name: "constell-exe" name: "constell-exe"
e2e-test: e2e-test:
name: E2E Test Windows name: E2E Test Windows
runs-on: windows-2025 runs-on: windows-2022
needs: build-cli needs: build-cli
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Download CLI artifact - name: Download CLI artifact
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
name: "constell-exe" name: "constell-exe"
- name: Check CLI version - name: Check CLI version
shell: pwsh shell: pwsh
run: | run: |
Move-Item -Path .\cli_enterprise_windows_amd64 -Destination .\constellation.exe
.\constellation.exe version .\constellation.exe version
Add-Content -Path $env:windir\System32\drivers\etc\hosts -Value "`n127.0.0.1`tlicense.confidential.cloud" -Force
- name: Login to Azure (IAM service principal) - name: Login to Azure (IAM service principal)
uses: ./.github/actions/login_azure uses: ./.github/actions/login_azure
@ -77,14 +66,10 @@ jobs:
azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
- name: Create IAM configuration - name: Create IAM configuration
id: iam-create
shell: pwsh shell: pwsh
run: | run: |
$uid = Get-Random -Minimum 1000 -Maximum 9999 .\constellation.exe config generate azure
$rgName = "e2e-win-${{ github.run_id }}-${{ github.run_attempt }}-$uid" .\constellation.exe iam create azure --region=westus --resourceGroup=e2eWindoewsRG --servicePrincipal=e2eWindoewsSP --update-config --debug -y
"rgName=$($rgName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
.\constellation.exe config generate azure -t "workflow=${{ github.run_id }}"
.\constellation.exe iam create azure --subscriptionID=${{ secrets.AZURE_SUBSCRIPTION_ID }} --region=westus --resourceGroup=$rgName-rg --servicePrincipal=$rgName-sp --update-config --debug -y
- name: Login to Azure (Cluster service principal) - name: Login to Azure (Cluster service principal)
uses: ./.github/actions/login_azure uses: ./.github/actions/login_azure
@ -110,31 +95,24 @@ jobs:
Write-Host "Retry ${retryCount}: Checking node status..." Write-Host "Retry ${retryCount}: Checking node status..."
$nodesOutput = & kubectl get nodes --kubeconfig "$PWD\constellation-admin.conf" $nodesOutput = & kubectl get nodes --kubeconfig "$PWD\constellation-admin.conf"
$status = $?
$nodesOutput $lines = $nodesOutput -split "`r?`n" | Select-Object -Skip 1
if ($status) { $allNodesReady = $true
$lines = $nodesOutput -split "`r?`n" | Select-Object -Skip 1
if ($lines.count -eq 4) { foreach ($line in $lines) {
$allNodesReady = $true $columns = $line -split '\s+' | Where-Object { $_ -ne '' }
foreach ($line in $lines) { $nodeName = $columns[0]
$columns = $line -split '\s+' | Where-Object { $_ -ne '' } $status = $columns[1]
$nodeName = $columns[0] if ($status -ne "Ready") {
$status = $columns[1] Write-Host "Node $nodeName is not ready!"
$allNodesReady = $false
if ($status -ne "Ready") {
Write-Host "Node $nodeName is not ready!"
$allNodesReady = $false
}
}
} }
} }
if (-not $allNodesReady -and $retryCount -lt $maxRetries) { if (-not $allNodesReady) {
Write-Host "Retrying in $retryIntervalSeconds seconds..." Write-Host "Retrying in $retryIntervalSeconds seconds..."
Start-Sleep -Seconds $retryIntervalSeconds Start-Sleep -Seconds $retryIntervalSeconds
} }
@ -149,7 +127,6 @@ jobs:
} }
- name: Terminate cluster - name: Terminate cluster
id: terminate-cluster
if: always() if: always()
shell: pwsh shell: pwsh
run: | run: |
@ -162,23 +139,14 @@ jobs:
azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
- name: Delete IAM configuration - name: Delete IAM configuration
id: delete-iam
if: always() if: always()
shell: pwsh shell: pwsh
run: | run: |
.\constellation.exe iam destroy --debug -y .\constellation.exe iam destroy --debug -y
- name: Clean up after failure
# run on a cleanup failure or if cancelled
if: (failure() && (steps.terminate-cluster.conclusion == 'failure' || steps.delete-iam.conclusion == 'failure')) || cancelled()
shell: pwsh
run: |
az group delete --name ${{ steps.iam-create.outputs.rgName }}-rg --yes
az group delete --name ${{ steps.iam-create.outputs.rgName }}-rg-identity --yes
notify-failure: notify-failure:
name: Notify about failure name: Notify about failure
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
needs: e2e-test needs: e2e-test
if: | if: |
failure() && failure() &&
@ -186,12 +154,15 @@ jobs:
inputs.scheduled inputs.scheduled
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Notify about failure - name: Notify about failure
continue-on-error: true continue-on-error: true

View File

@ -15,7 +15,7 @@ on:
jobs: jobs:
complete-release-branch-transaction: complete-release-branch-transaction:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: write contents: write
@ -26,7 +26,7 @@ jobs:
WORKING_BRANCH: ${{ env.WORKING_BRANCH }} WORKING_BRANCH: ${{ env.WORKING_BRANCH }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
fetch-depth: 0 # fetch all history fetch-depth: 0 # fetch all history
@ -44,12 +44,12 @@ jobs:
git push origin "${WORKING_BRANCH}":"${RELEASE_BRANCH}" git push origin "${WORKING_BRANCH}":"${RELEASE_BRANCH}"
update: update:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
outputs: outputs:
latest: ${{ steps.input-passthrough.outputs.latest }}${{ steps.check-last-release.outputs.latest }} latest: ${{ steps.input-passthrough.outputs.latest }}${{ steps.check-last-release.outputs.latest }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Override latest - name: Override latest
if: github.event.inputs.latest == 'true' if: github.event.inputs.latest == 'true'
@ -117,13 +117,13 @@ jobs:
add-image-version-to-versionsapi, add-image-version-to-versionsapi,
add-cli-version-to-versionsapi, add-cli-version-to-versionsapi,
] ]
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: write contents: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Remove temporary branch - name: Remove temporary branch
run: git push origin --delete "${{needs.complete-release-branch-transaction.outputs.WORKING_BRANCH}}" run: git push origin --delete "${{needs.complete-release-branch-transaction.outputs.WORKING_BRANCH}}"
@ -131,18 +131,20 @@ jobs:
mirror-gcp-mpi: mirror-gcp-mpi:
name: "Mirror GCP Marketplace Image" name: "Mirror GCP Marketplace Image"
needs: [add-image-version-to-versionsapi] needs: [add-image-version-to-versionsapi]
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup_bazel_nix - uses: ./.github/actions/setup_bazel_nix
with:
useCache: "false"
- name: Login to AWS - name: Login to AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GitHubConstellationImagePipeline role-to-assume: arn:aws:iam::795746500882:role/GitHubConstellationImagePipeline
aws-region: eu-central-1 aws-region: eu-central-1
@ -160,7 +162,7 @@ jobs:
shell: bash shell: bash
run: | run: |
aws s3 cp s3://cdn-constellation-backend/constellation/v2/ref/-/stream/stable/${{ steps.fetch-version.outputs.output }}/image/info.json . aws s3 cp s3://cdn-constellation-backend/constellation/v2/ref/-/stream/stable/${{ steps.fetch-version.outputs.output }}/image/info.json .
FULL_REF=$(yq e -r -oy '.list.[] | select(.attestationVariant == "gcp-sev-snp") | .reference' info.json) FULL_REF=$(yq e -r -oy '.list.[] | select(.attestationVariant == "gcp-sev-es") | .reference' info.json)
IMAGE_NAME=$(echo "${FULL_REF}" | cut -d / -f 5) IMAGE_NAME=$(echo "${FULL_REF}" | cut -d / -f 5)
echo "reference=$IMAGE_NAME" | tee -a "$GITHUB_OUTPUT" echo "reference=$IMAGE_NAME" | tee -a "$GITHUB_OUTPUT"

View File

@ -10,7 +10,7 @@ on:
jobs: jobs:
find-version: find-version:
name: Delete version from main ref name: Delete version from main ref
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
outputs: outputs:
version: ${{ steps.find.outputs.version }} version: ${{ steps.find.outputs.version }}
permissions: permissions:
@ -18,12 +18,12 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: Login to AWS - name: Login to AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
aws-region: eu-central-1 aws-region: eu-central-1
@ -47,8 +47,6 @@ jobs:
;; ;;
esac esac
- uses: ./.github/actions/setup_bazel_nix
- name: List versions - name: List versions
id: list id: list
uses: ./.github/actions/versionsapi uses: ./.github/actions/versionsapi

View File

@ -1,79 +0,0 @@
name: 'Release: on-publish'
on:
release:
types:
- published
workflow_dispatch:
inputs:
tag:
description: 'Semantic version tag of the release (vX.Y.Z).'
required: true
jobs:
post-release-actions:
runs-on: ubuntu-24.04
permissions:
issues: write
env:
FULL_VERSION: ${{ github.event.release.tag_name }}${{ github.event.inputs.tag }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Mark milestone as complete
run: |
milestones=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/edgelesssys/constellation/milestones)
current_milestone=$(echo "${milestones}" | jq -r ".[] | select(.title == \"${FULL_VERSION}\")")
echo "current milestone: ${current_milestone}"
if [[ -z "${current_milestone}" ]]; then
echo "milestone ${FULL_VERSION} does not exist, nothing to do..."
exit 0
fi
current_milestone_state=$(echo "${current_milestone}" | jq -r '.state')
echo "current milestone state: ${current_milestone_state}"
if [[ "${current_milestone_state}" != "open" ]]; then
echo "milestone ${FULL_VERSION} is already closed, nothing to do..."
exit 0
fi
milestone_number=$(echo "${current_milestone}" | jq -r '.number')
echo "milestone number: ${milestone_number}"
if [[ -z "${milestone_number}" ]]; then
echo "failed parsing milestone number"
exit 1
fi
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/edgelesssys/constellation/milestones/${milestone_number}" \
-f state=closed
- name: Create next milestone
run: |
WITHOUT_V=${FULL_VERSION#v}
PART_MAJOR=${WITHOUT_V%%.*}
PART_MINOR=${WITHOUT_V#*.}
PART_MINOR=${PART_MINOR%%.*}
NEXT_MINOR=v${PART_MAJOR}.$((PART_MINOR + 1)).0
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/edgelesssys/constellation/milestones |
jq -r '.[].title' | \
grep -xqF "${NEXT_MINOR}" && exit 0
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/edgelesssys/constellation/milestones \
-f title="${NEXT_MINOR}" \
-f state='open' \
-f "due_on=$(date -d '2 months' +'%Y-%m-%dT00:00:00Z')"

View File

@ -19,7 +19,7 @@ concurrency:
jobs: jobs:
verify-inputs: verify-inputs:
name: Verify inputs name: Verify inputs
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
env: env:
FULL_VERSION: ${{ inputs.version }} FULL_VERSION: ${{ inputs.version }}
outputs: outputs:
@ -33,7 +33,7 @@ jobs:
RELEASE_BRANCH: ${{ steps.version-info.outputs.RELEASE_BRANCH }} RELEASE_BRANCH: ${{ steps.version-info.outputs.RELEASE_BRANCH }}
WORKING_BRANCH: ${{ steps.version-info.outputs.WORKING_BRANCH }} WORKING_BRANCH: ${{ steps.version-info.outputs.WORKING_BRANCH }}
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Working branch - name: Working branch
run: echo "WORKING_BRANCH=$(git branch --show-current)" | tee -a "$GITHUB_ENV" run: echo "WORKING_BRANCH=$(git branch --show-current)" | tee -a "$GITHUB_ENV"
@ -72,9 +72,10 @@ jobs:
echo "WORKING_BRANCH=${WORKING_BRANCH}" echo "WORKING_BRANCH=${WORKING_BRANCH}"
} | tee -a "$GITHUB_OUTPUT" } | tee -a "$GITHUB_OUTPUT"
update-main-branch: docs:
name: Update main branch with release changes name: Create docs release (from main)
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
if: inputs.kind == 'minor'
needs: verify-inputs needs: verify-inputs
permissions: permissions:
contents: write contents: write
@ -84,61 +85,36 @@ jobs:
MAJOR_MINOR: ${{ needs.verify-inputs.outputs.MAJOR_MINOR }} MAJOR_MINOR: ${{ needs.verify-inputs.outputs.MAJOR_MINOR }}
BRANCH: docs/${{ needs.verify-inputs.outputs.MAJOR_MINOR }} BRANCH: docs/${{ needs.verify-inputs.outputs.MAJOR_MINOR }}
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: main ref: main
- name: Configure git
run: |
git config --global user.name "edgelessci"
git config --global user.email "edgelessci@users.noreply.github.com"
- name: Create docs release - name: Create docs release
if: inputs.kind == 'minor'
working-directory: docs working-directory: docs
run: | run: |
npm ci npm install
npm run docusaurus docs:version "${MAJOR_MINOR}" npm run docusaurus docs:version "${MAJOR_MINOR}"
git add .
git commit -am "docs: release ${MAJOR_MINOR}"
# Clean up auxiliary files, so next steps run on a clean tree
git clean -fdx :/
- name: Update version.txt
if: inputs.kind == 'minor'
run: |
pre_release_version="v${{ needs.verify-inputs.outputs.PART_MAJOR }}.$((${{ needs.verify-inputs.outputs.PART_MINOR }} + 1)).0-pre"
echo "${pre_release_version}" > version.txt
git add version.txt
git commit -m "chore: update version.txt to ${pre_release_version}"
- name: Update CI for new version
run: |
sed -i 's/fromVersion: \["[^"]*"\]/fromVersion: ["${{ inputs.version }}"]/g' .github/workflows/e2e-test-release.yml
sed -i 's/fromVersion: \["[^"]*"\]/fromVersion: ["${{ inputs.version }}"]/g' .github/workflows/e2e-test-weekly.yml
- name: Create docs pull request - name: Create docs pull request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with: with:
branch: ${{ env.BRANCH }} branch: ${{ env.BRANCH }}
base: main base: main
title: "Post ${{ env.VERSION }} release updates to main" title: "docs: add release ${{ env.VERSION }}"
body: | body: |
:robot: *This is an automated PR.* :robot: :robot: *This is an automated PR.* :robot:
The PR is triggered as part of the automated release process of version ${{ env.VERSION }}. The PR is triggered as part of the automated release process of version ${{ env.VERSION }}.
commit-message: "chore: update CI for ${{ env.VERSION }}" It releases a new version of the documentation.
commit-message: "docs: add release ${{ env.VERSION }}"
committer: edgelessci <edgelessci@users.noreply.github.com> committer: edgelessci <edgelessci@users.noreply.github.com>
author: edgelessci <edgelessci@users.noreply.github.com>
labels: no changelog labels: no changelog
assignees: ${{ github.actor }}
reviewers: ${{ github.actor }}
# We need to push changes using a token, otherwise triggers like on:push and on:pull_request won't work. # We need to push changes using a token, otherwise triggers like on:push and on:pull_request won't work.
token: ${{ !github.event.pull_request.head.repo.fork && secrets.CI_COMMIT_PUSH_PR || '' }} token: ${{ !github.event.pull_request.head.repo.fork && secrets.CI_COMMIT_PUSH_PR || '' }}
check-working-branch: check-working-branch:
name: Check temporary working branch name: Check temporary working branch
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
needs: verify-inputs needs: verify-inputs
permissions: permissions:
contents: write contents: write
@ -147,7 +123,7 @@ jobs:
WORKING_BRANCH: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }} WORKING_BRANCH: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }} ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}
@ -176,7 +152,7 @@ jobs:
update-versions: update-versions:
name: Update container image versions name: Update container image versions
needs: [verify-inputs, check-working-branch] needs: [verify-inputs, check-working-branch]
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
packages: read packages: read
@ -185,7 +161,7 @@ jobs:
WITHOUT_V: ${{ needs.verify-inputs.outputs.WITHOUT_V }} WITHOUT_V: ${{ needs.verify-inputs.outputs.WITHOUT_V }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }} ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}
@ -205,7 +181,7 @@ jobs:
yq eval -i ".version = \"$WITHOUT_V\"" s3proxy/deploy/s3proxy/Chart.yaml yq eval -i ".version = \"$WITHOUT_V\"" s3proxy/deploy/s3proxy/Chart.yaml
yq eval -i ".image = \"ghcr.io/edgelesssys/constellation/s3proxy:$VERSION\"" s3proxy/deploy/s3proxy/values.yaml yq eval -i ".image = \"ghcr.io/edgelesssys/constellation/s3proxy:$VERSION\"" s3proxy/deploy/s3proxy/values.yaml
git add s3proxy/deploy/s3proxy/Chart.yaml s3proxy/deploy/s3proxy/values.yaml git add s3proxy/deploy/s3proxy/Chart.yaml
- name: Commit - name: Commit
run: | run: |
@ -239,36 +215,25 @@ jobs:
stream: "stable" stream: "stable"
ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }} ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}
check-measurements-reproducibility:
name: Check measurements reproducibility
needs: [verify-inputs, os-image]
runs-on: ubuntu-24.04
steps:
- name: Check reproducibility
uses: ./.github/actions/check_measurements_reproducibility
with:
version: ${{ inputs.version }}
ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}
update-hardcoded-measurements: update-hardcoded-measurements:
name: Update hardcoded measurements (in the CLI) name: Update hardcoded measurements (in the CLI)
needs: [verify-inputs, os-image] needs: [verify-inputs, os-image]
permissions: permissions:
contents: write contents: write
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
env: env:
VERSION: ${{ inputs.version }} VERSION: ${{ inputs.version }}
WITHOUT_V: ${{ needs.verify-inputs.outputs.WITHOUT_V }} WITHOUT_V: ${{ needs.verify-inputs.outputs.WITHOUT_V }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }} ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}
- name: Setup Go environment - name: Setup Go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with: with:
go-version: "1.24.2" go-version: "1.22.1"
cache: true cache: true
- name: Build generateMeasurements tool - name: Build generateMeasurements tool
@ -285,12 +250,8 @@ jobs:
run: | run: |
git config --global user.name "edgelessci" git config --global user.name "edgelessci"
git config --global user.email "edgelessci@users.noreply.github.com" git config --global user.email "edgelessci@users.noreply.github.com"
if git diff-index --quiet HEAD --; then git commit -m "attestation: hardcode measurements for ${VERSION}"
echo "No changes to commit" git push
else
git commit -m "attestation: hardcode measurements for ${VERSION}"
git push
fi
draft-release: draft-release:
name: Draft release (CLI) name: Draft release (CLI)
@ -317,7 +278,6 @@ jobs:
packages: write packages: write
id-token: write id-token: write
contents: read contents: read
actions: write
secrets: inherit secrets: inherit
with: with:
ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }} ref: ${{ needs.verify-inputs.outputs.WORKING_BRANCH }}

View File

@ -1,9 +1,8 @@
# Verify that Constellation builds are reproducible. # Verify that Constellation builds are reproducible.
# #
# The build-* jobs' matrix has three dimensions: a list of targets to build, a # The build-* jobs' matrix has two dimensions: a list of targets to build and
# list of runners to build on and a method of installing dependencies. The # a list of runners to build on. The produced binaries and OS images are
# produced binaries and OS images are expected to be bit-for-bit identical, # expected to be bit-for-bit identical, regardless of the chosen build runner.
# without any dependencies on the runtime setup details.
# #
# The compare-* jobs only have the target dimension. They obtain the built # The compare-* jobs only have the target dimension. They obtain the built
# targets from all runners and check that there are no diffs between them. # targets from all runners and check that there are no diffs between them.
@ -13,9 +12,6 @@ on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: "45 06 * * 1" # Every Monday at 6:45am - cron: "45 06 * * 1" # Every Monday at 6:45am
pull_request:
paths:
- .github/workflows/reproducible-builds.yml
jobs: jobs:
build-binaries: build-binaries:
@ -28,39 +24,22 @@ jobs:
- "cli_enterprise_linux_amd64" - "cli_enterprise_linux_amd64"
- "cli_enterprise_linux_arm64" - "cli_enterprise_linux_arm64"
- "cli_enterprise_windows_amd64" - "cli_enterprise_windows_amd64"
runner: runner: ["ubuntu-22.04", "ubuntu-20.04"]
- "ubuntu-24.04"
- "ubuntu-22.04"
deps:
- conventional
- eccentric
env: env:
bazel_target: "//cli:${{ matrix.target }}" bazel_target: "//cli:${{ matrix.target }}"
binary: "${{ matrix.target }}-${{ matrix.runner }}-${{ matrix.deps }}" binary: "${{ matrix.target }}-${{ matrix.runner }}"
runs-on: ${{ matrix.runner }} runs-on: ${{ matrix.runner }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup dependencies - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
if: matrix.deps == 'conventional' with:
useCache: "logs"
- name: Setup dependencies (eccentric) buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
if: matrix.deps == 'eccentric'
run: |
bazelVersion=$(cat .bazelversion)
mkdir -p "$HOME/.local/bin"
curl -fsSL -o "$HOME/.local/bin/bazel" "https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-linux-x86_64"
chmod a+x "$HOME/.local/bin/bazel"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
curl -fsSL -o "$HOME/.local/bin/nix-installer" https://github.com/DeterminateSystems/nix-installer/releases/download/v3.2.1/nix-installer-x86_64-linux # renovate:github-release
nixVersion=$(cat .nixversion)
chmod a+x "$HOME/.local/bin/nix-installer"
"$HOME/.local/bin/nix-installer" install --no-confirm --nix-package-url "https://releases.nixos.org/nix/nix-$nixVersion/nix-$nixVersion-x86_64-linux.tar.xz"
- name: Build - name: Build
shell: bash shell: bash
@ -81,15 +60,15 @@ jobs:
run: shasum -a 256 "${binary}" | tee "${binary}.sha256" run: shasum -a 256 "${binary}" | tee "${binary}.sha256"
- name: Upload binary artifact - name: Upload binary artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: "binaries-${{ matrix.target }}-${{ matrix.runner }}-${{ matrix.deps }}" name: "binaries-${{ matrix.target }}-${{ matrix.runner }}"
path: "${{ env.binary }}" path: "${{ env.binary }}"
- name: Upload hash artifact - name: Upload hash artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: "sha256sums-${{ matrix.target }}-${{ matrix.runner }}-${{ matrix.deps }}" name: "sha256sums-${{ matrix.target }}-${{ matrix.runner }}"
path: "${{ env.binary }}.sha256" path: "${{ env.binary }}.sha256"
build-osimages: build-osimages:
@ -101,31 +80,22 @@ jobs:
- "aws_aws-nitro-tpm_console" - "aws_aws-nitro-tpm_console"
- "qemu_qemu-vtpm_debug" - "qemu_qemu-vtpm_debug"
- "gcp_gcp-sev-snp_nightly" - "gcp_gcp-sev-snp_nightly"
runner: ["ubuntu-24.04", "ubuntu-22.04"] runner: ["ubuntu-22.04", "ubuntu-20.04"]
env: env:
bazel_target: "//image/system:${{ matrix.target }}" bazel_target: "//image/system:${{ matrix.target }}"
binary: "osimage-${{ matrix.target }}-${{ matrix.runner }}" binary: "osimage-${{ matrix.target }}-${{ matrix.runner }}"
runs-on: ${{ matrix.runner }} runs-on: ${{ matrix.runner }}
steps: steps:
- name: Remove security hardening features
if: matrix.runner == 'ubuntu-24.04'
shell: bash
run: |
# Taken from https://github.com/systemd/mkosi/blob/fcacc94b9f72d9b6b1f03779b0c6e07209ceb54b/action.yaml#L42-L57.
sudo sysctl --ignore --write kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl --ignore --write kernel.apparmor_restrict_unprivileged_userns=0
# This command fails with a non-zero error code even though it unloads the apparmor profiles.
# https://gitlab.com/apparmor/apparmor/-/issues/403
sudo aa-teardown || true
sudo apt-get remove -y apparmor
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with:
useCache: "logs"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Build - name: Build
shell: bash shell: bash
@ -146,13 +116,13 @@ jobs:
run: shasum -a 256 "${binary}" | tee "${binary}.sha256" run: shasum -a 256 "${binary}" | tee "${binary}.sha256"
- name: Upload binary artifact - name: Upload binary artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: "osimages-${{ matrix.target }}-${{ matrix.runner }}" name: "osimages-${{ matrix.target }}-${{ matrix.runner }}"
path: "${{ env.binary }}" path: "${{ env.binary }}"
- name: Upload hash artifact - name: Upload hash artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: "sha256sums-${{ matrix.target }}-${{ matrix.runner }}" name: "sha256sums-${{ matrix.target }}-${{ matrix.runner }}"
path: "${{ env.binary }}.sha256" path: "${{ env.binary }}.sha256"
@ -168,14 +138,14 @@ jobs:
- "cli_enterprise_linux_amd64" - "cli_enterprise_linux_amd64"
- "cli_enterprise_linux_arm64" - "cli_enterprise_linux_arm64"
- "cli_enterprise_windows_amd64" - "cli_enterprise_windows_amd64"
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Download binaries - name: Download binaries
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
pattern: "binaries-${{ matrix.target }}-*" pattern: "binaries-${{ matrix.target }}-*"
merge-multiple: true merge-multiple: true
@ -202,14 +172,14 @@ jobs:
- "aws_aws-nitro-tpm_console" - "aws_aws-nitro-tpm_console"
- "qemu_qemu-vtpm_debug" - "qemu_qemu-vtpm_debug"
- "gcp_gcp-sev-snp_nightly" - "gcp_gcp-sev-snp_nightly"
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Download os images - name: Download os images
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with: with:
pattern: "osimages-${{ matrix.target }}-*" pattern: "osimages-${{ matrix.target }}-*"
merge-multiple: true merge-multiple: true

View File

@ -9,7 +9,7 @@ on:
jobs: jobs:
analysis: analysis:
name: Scorecard analysis name: Scorecard analysis
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
# Needed to upload the results to code-scanning dashboard. # Needed to upload the results to code-scanning dashboard.
security-events: write security-events: write
@ -18,25 +18,25 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
persist-credentials: false persist-credentials: false
- name: Run analysis - name: Run analysis
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif
publish_results: true publish_results: true
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
retention-days: 5 retention-days: 5
- name: Upload to code-scanning - name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 uses: github/codeql-action/upload-sarif@cf7e9f23492505046de9a37830c3711dd0f25bb3 # v2.16.2
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -18,14 +18,14 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout constellation repo - name: Checkout constellation repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
fetch-depth: 0 fetch-depth: 0
path: constellation path: constellation
- name: Checkout terraform-provider-constellation repo - name: Checkout terraform-provider-constellation repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
repository: edgelesssys/terraform-provider-constellation repository: edgelesssys/terraform-provider-constellation
ref: main ref: main
@ -40,7 +40,7 @@ jobs:
- name: Create pull request - name: Create pull request
id: create-pull-request id: create-pull-request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with: with:
path: terraform-provider-constellation path: terraform-provider-constellation
branch: "feat/docs/update" branch: "feat/docs/update"

View File

@ -20,17 +20,20 @@ on:
jobs: jobs:
integration-test: integration-test:
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
env: env:
CTEST_OUTPUT_ON_FAILURE: True CTEST_OUTPUT_ON_FAILURE: True
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup bazel - name: Setup bazel
uses: ./.github/actions/setup_bazel_nix uses: ./.github/actions/setup_bazel_nix
with:
useCache: "true"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Integration Tests - name: Integration Tests
env: env:

View File

@ -18,17 +18,17 @@ on:
jobs: jobs:
govulncheck: govulncheck:
name: check-codegen name: check-codegen
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup Go environment - name: Setup Go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with: with:
go-version: "1.24.2" go-version: "1.22.1"
cache: true cache: true
- name: Run code generation - name: Run code generation

View File

@ -17,13 +17,13 @@ on:
jobs: jobs:
tfsec: tfsec:
name: tfsec name: tfsec
runs-on: ubuntu-24.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

View File

@ -17,7 +17,7 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
# No token available for forks, so we can't push changes # No token available for forks, so we can't push changes
@ -34,10 +34,11 @@ jobs:
with: with:
useCache: "rbe" useCache: "rbe"
rbePlatform: "ubuntu-22.04" rbePlatform: "ubuntu-22.04"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Assume AWS role to upload Bazel dependencies to S3 - name: Assume AWS role to upload Bazel dependencies to S3
if: startsWith(github.head_ref, 'renovate/') if: startsWith(github.head_ref, 'renovate/')
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationMirrorWrite role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationMirrorWrite
aws-region: eu-central-1 aws-region: eu-central-1
@ -51,9 +52,7 @@ jobs:
- name: Run Bazel tidy - name: Run Bazel tidy
shell: bash shell: bash
run: | run: bazel run //:tidy
bazel run //:tidy
bazel mod deps --lockfile_mode=update
- name: Check if untidy - name: Check if untidy
id: untidy id: untidy
@ -98,11 +97,10 @@ jobs:
exit 0 exit 0
fi fi
# Use quadruple backticks to escape triple backticks in diff'ed files.
cat << EOF >> "${GITHUB_STEP_SUMMARY}" cat << EOF >> "${GITHUB_STEP_SUMMARY}"
\`\`\`\`diff \`\`\`diff
${diff} ${diff}
\`\`\`\` \`\`\`
EOF EOF
if [[ "${{ steps.untidy.outputs.untidy }}" == "true" ]] && if [[ "${{ steps.untidy.outputs.untidy }}" == "true" ]] &&

View File

@ -30,7 +30,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with: with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
fetch-depth: 0 fetch-depth: 0
@ -40,6 +40,7 @@ jobs:
with: with:
useCache: "rbe" useCache: "rbe"
rbePlatform: "ubuntu-22.04" rbePlatform: "ubuntu-22.04"
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
- name: Install AWS cli - name: Install AWS cli
run: | run: |
@ -49,7 +50,7 @@ jobs:
rm -rf awscliv2.zip aws rm -rf awscliv2.zip aws
- name: Login to AWS (IAM role) - name: Login to AWS (IAM role)
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with: with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionGocoverage role-to-assume: arn:aws:iam::795746500882:role/GithubActionGocoverage
aws-region: eu-central-1 aws-region: eu-central-1
@ -69,7 +70,7 @@ jobs:
- name: Comment coverage - name: Comment coverage
if: steps.coverage.outputs.uploadable == 'true' && github.event_name == 'pull_request' if: steps.coverage.outputs.uploadable == 'true' && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2 uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
with: with:
header: coverage header: coverage
path: coverage_diff.md path: coverage_diff.md

Some files were not shown because too many files have changed in this diff Show More