Skip to content

Commit

Permalink
feat(KFLUXDP-140): Add logic to the tekton task that add a new step t…
Browse files Browse the repository at this point in the history
…o send results to sealights and add SEALIGHTS_TOKEN env to installation
  • Loading branch information
flacatus committed Jan 26, 2025
1 parent 48eb3cd commit 94901af
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
6 changes: 5 additions & 1 deletion default.env
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,8 @@ export GITLAB_API_URL=

# GitLab Project ID used for helper functions in magefiles
# Required: no
export GITLAB_PROJECT_ID=
export GITLAB_PROJECT_ID=

# Sealights is used when konflux controllers are deploying with sealights instrumentation.
# Required: no
export SEALIGHTS_TOKEN=
1 change: 1 addition & 0 deletions integration-tests/scripts/konflux-e2e-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ load_envs() {
[MULTI_PLATFORM_IBM_API_KEY]="${konflux_ci_secrets_file}/multi-platform-ibm-api-key"
[DOCKER_IO_AUTH]="${konflux_ci_secrets_file}/docker_io"
[GITLAB_BOT_TOKEN]="${konflux_ci_secrets_file}/gitlab-bot-token"
[SEALIGHTS_TOKEN]="${konflux_ci_secrets_file}/sealights-token"
)

for var in "${!config_envs[@]}"; do
Expand Down
31 changes: 31 additions & 0 deletions integration-tests/tasks/konflux-e2e-tests-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ spec:
- name: ginkgo-procs
description: "Number of processes to run in parallel in ginkgo"
default: 20
- name: sealights-bsid
description: "A unique identifier (Build Session ID) assigned to the current Sealights build session. This ID is used to associate test results with a specific build in Sealights for detailed analysis and reporting."
default: ""
- name: test-stage
description: "The name or identifier of the test suite being executed (e.g., 'integration', 'e2e'). This value will be recorded in Sealights to help categorize and trace test results within the platform."
default: "konflux-e2e"
- name: enable-sealights
description: "A flag to enable or disable the Sealights integration feature. When set to 'true', test results are sent to Sealights for analysis; otherwise, this feature is skipped."
default: "false"
volumes:
- name: konflux-secret-volume
secret:
Expand Down Expand Up @@ -148,6 +157,28 @@ spec:
make ci/prepare/e2e-branch 2>&1 | tee "${ARTIFACT_DIR}"/e2e-branch.log
/bin/bash -c "integration-tests/scripts/konflux-e2e-runner.sh"
- name: sealights-reporter
onError: continue
when:
- input: $(params.enable-sealights)
operator: in
values: ["true"]
ref:
resolver: git
params:
- name: url
value: https://github.com/konflux-ci/tekton-integration-catalog.git
- name: revision
value: main
- name: pathInRepo
value: stepactions/sealights/upload-ginkgo-results/0.1/upload-ginkgo-results.yaml
params:
- name: ginkgo-json-report-path
value: /workspace/artifact-dir/e2e-report.json
- name: test-stage
value: $(params.test-stage)
- name: sealights-bsid
value: $(params.sealights-bsid)
- name: secure-push-oci
ref:
resolver: git
Expand Down

0 comments on commit 94901af

Please sign in to comment.