Skip to content

Commit 5584755

Browse files
chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@12c9ee0 (#523)
Reference-to: stackabletech/operator-templating@12c9ee0 (fix: include Rust components in operator SBOMs)
1 parent 4866165 commit 5584755

File tree

5 files changed

+122
-6
lines changed

5 files changed

+122
-6
lines changed
+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
name: Integration Test
3+
run-name: |
4+
Integration Test on ${{ inputs.test-platform }}-${{ inputs.test-architecture }} (${{ inputs.test-run == 'all' && 'all' || format('{0}={1}', inputs.test-run, inputs.test-parameter) }})
5+
6+
env:
7+
DEFAULT_TEST_PLATFORM: kind-1.31.0
8+
DEFAULT_TEST_ARCHITECTURE: amd64
9+
DEFAULT_TEST_RUN: all
10+
DEFAULT_TEST_PARAMETER: "" # Unused when the test-run is 'all'
11+
TEST_PLATFORM: ${{ inputs.test-platform }}
12+
TEST_ARCHITECTURE: ${{ inputs.test-architecture }}
13+
TEST_RUN: ${{ inputs.test-run }}
14+
TEST_PARAMETER: ${{ inputs.test-parameter }}
15+
16+
on:
17+
# schedule:
18+
# At 00:00 on Sunday. See: https://crontab.guru/#0_0_*_*_0
19+
# - cron: "0 0 * * 0"
20+
workflow_dispatch:
21+
inputs:
22+
test-platform:
23+
description: |
24+
The test platform to run on (kind doesn't support `arm64`)
25+
required: true
26+
type: choice
27+
options:
28+
- kind-1.31.0
29+
- kind-1.30.3
30+
- aks-1.29
31+
- aks-1.28
32+
- aks-1.27
33+
- eks-1.29
34+
- eks-1.28
35+
- eks-1.27
36+
- gke-1.29
37+
- gke-1.28
38+
- gke-1.27
39+
- okd-4.15
40+
- okd-4.14
41+
- okd-4.13
42+
test-architecture:
43+
description: |
44+
The architecture the tests will run on
45+
required: true
46+
type: choice
47+
options:
48+
- amd64
49+
- arm64
50+
test-run:
51+
description: Type of test run
52+
required: true
53+
type: choice
54+
options:
55+
- all
56+
- test-suite
57+
- test
58+
test-parameter:
59+
description: Parameter to `--test-suite` or `--test` (ignored for `all`)
60+
default: smoke
61+
62+
jobs:
63+
test:
64+
name: Run Integration Test
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Override integration test options for scheduled run
68+
if: github.event_name == 'schedule'
69+
shell: bash
70+
run: |
71+
set -euo pipefail
72+
73+
echo "TEST_PLATFORM=$DEFAULT_TEST_PLATFORM" | tee -a "$GITHUB_ENV"
74+
echo "TEST_ARCHITECTURE=$DEFAULT_TEST_ARCHITECTURE" | tee -a "$GITHUB_ENV"
75+
echo "TEST_RUN=$DEFAULT_TEST_RUN" | tee -a "$GITHUB_ENV"
76+
echo "TEST_PARAMETER=$DEFAULT_TEST_PARAMETER" | tee -a "$GITHUB_ENV"
77+
78+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
79+
with:
80+
submodules: recursive
81+
82+
- name: Run Integration Test
83+
id: test
84+
uses: stackabletech/actions/run-integration-test@5b66858af3597c4ea34f9b33664b8034a1d28427 # v0.3.0
85+
with:
86+
test-platform: ${{ env.TEST_PLATFORM }}-${{ env.TEST_ARCHITECTURE }}
87+
test-run: ${{ env.TEST_RUN }}
88+
test-parameter: ${{ env.TEST_PARAMETER }}
89+
replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }}
90+
91+
- name: Send Notification
92+
if: ${{ failure() }}
93+
env:
94+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
95+
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
96+
with:
97+
channel-id: "C07UYJYSMSN" # notifications-integration-tests
98+
payload: |
99+
{
100+
"text": "Integration Test *${{ github.repository }}* failed",
101+
"attachments": [
102+
{
103+
"pretext": "Started at ${{ steps.test.outputs.start-time }}, failed at ${{ steps.test.outputs.end-time }}",
104+
"color": "#aa0000",
105+
"actions": [
106+
{
107+
"type": "button",
108+
"text": "Go to integration test run",
109+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
110+
}
111+
]
112+
}
113+
]
114+
}

.github/workflows/pr_pre-commit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525
submodules: recursive
26-
- uses: stackabletech/actions/run-pre-commit@e8781161bc1eb037198098334cec6061fe24b6c3 # v0.0.2
26+
- uses: stackabletech/actions/run-pre-commit@5b66858af3597c4ea34f9b33664b8034a1d28427 # v0.3.0
2727
with:
2828
python-version: ${{ env.PYTHON_VERSION }}
2929
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ docker-publish:
4848
# Uses the keyless signing flow with Github Actions as identity provider\
4949
cosign sign -y "${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE";\
5050
# Generate the SBOM for the operator image, this leverages the already generated SBOM for the operator binary by cargo-cyclonedx\
51-
syft scan --output cyclonedx-json=sbom.json --select-catalogers "-cargo-auditable-binary-cataloger" --scope all-layers --source-name "${OPERATOR_NAME}" --source-version "${VERSION}-${ARCH}" "${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE";\
51+
syft scan --output cyclonedx-json@1.5=sbom.json --select-catalogers "-cargo-auditable-binary-cataloger,+sbom-cataloger" --scope all-layers --source-name "${OPERATOR_NAME}" --source-version "${VERSION}-${ARCH}" "${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE";\
5252
# Determine the PURL for the container image\
5353
URLENCODED_REPO_DIGEST_OF_IMAGE=$$(echo "$$REPO_DIGEST_OF_IMAGE" | sed 's/:/%3A/g');\
5454
PURL="pkg:oci/${OPERATOR_NAME}@$$URLENCODED_REPO_DIGEST_OF_IMAGE?arch=${ARCH}&repository_url=${DOCKER_REPO}%2F${ORGANIZATION}%2F${OPERATOR_NAME}";\
@@ -74,7 +74,7 @@ docker-publish:
7474
# Uses the keyless signing flow with Github Actions as identity provider\
7575
cosign sign -y "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE";\
7676
# Generate the SBOM for the operator image, this leverages the already generated SBOM for the operator binary by cargo-cyclonedx\
77-
syft scan --output cyclonedx-json=sbom.json --select-catalogers "-cargo-auditable-binary-cataloger" --scope all-layers --source-name "${OPERATOR_NAME}" --source-version "${VERSION}-${ARCH}" "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE";\
77+
syft scan --output cyclonedx-json@1.5=sbom.json --select-catalogers "-cargo-auditable-binary-cataloger,+sbom-cataloger" --scope all-layers --source-name "${OPERATOR_NAME}" --source-version "${VERSION}-${ARCH}" "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE";\
7878
# Determine the PURL for the container image\
7979
URLENCODED_REPO_DIGEST_OF_IMAGE=$$(echo "$$REPO_DIGEST_OF_IMAGE" | sed 's/:/%3A/g');\
8080
PURL="pkg:oci/${OPERATOR_NAME}@$$URLENCODED_REPO_DIGEST_OF_IMAGE?arch=${ARCH}&repository_url=${OCI_REGISTRY_HOSTNAME}%2F${OCI_REGISTRY_PROJECT_IMAGES}%2F${OPERATOR_NAME}";\

renovate.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"extends": [
44
"local>stackabletech/.github:renovate-config"
55
],
6-
"ignorePaths": [".github/workflows/build.yml", ".github/workflows/general_daily_security.yml", ".github/workflows/pr_pre-commit.yaml"]
6+
"ignorePaths": [".github/workflows/build.yml", ".github/workflows/general_daily_security.yml", ".github/workflows/integration-test.yml", ".github/workflows/pr_pre-commit.yaml"]
77
}

scripts/run-tests

+4-2
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def maybe_install_release(skip_release: bool, release_file: str) -> None:
313313
raise TestRunnerException()
314314

315315

316-
def gen_tests(test_suite: str) -> None:
316+
def gen_tests(test_suite: str, namespace: str) -> None:
317317
try:
318318
beku_cmd = [
319319
"beku",
@@ -328,6 +328,8 @@ def gen_tests(test_suite: str) -> None:
328328
]
329329
if test_suite:
330330
beku_cmd.extend(["--suite", test_suite])
331+
if namespace:
332+
beku_cmd.extend(["--namespace", namespace])
331333

332334
logging.debug(f"Running : {beku_cmd}")
333335
subprocess.run(
@@ -386,7 +388,7 @@ def main(argv) -> int:
386388
opts = parse_args(argv[1:])
387389
logging.basicConfig(encoding="utf-8", level=opts.log_level)
388390
have_requirements()
389-
gen_tests(opts.test_suite)
391+
gen_tests(opts.test_suite, opts.namespace)
390392
with release_file(opts.operator, opts.skip_operator) as f:
391393
maybe_install_release(opts.skip_release, f)
392394
if opts.skip_tests:

0 commit comments

Comments
 (0)