Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(KFLUXDP-140): Add logic to the tekton task that add a new step to send results to sealights #1493

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
psturc marked this conversation as resolved.
Show resolved Hide resolved
)

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
Loading