Run aix test CI job on changes - #55896
Open
pgimalac wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
AI review by Codex (OpenAI) - workflow run
Patch is correct. The new rule automatically runs the AIX unit-test job when its job definition or remote execution template changes, while preserving existing scheduled and manual behavior.
Contributor
Gitlab CI Configuration ChangesModified Jobstests_aix-ppc64 tests_aix-ppc64:
allow_failure: true
before_script:
- export AIX_HOST="$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER
hostname)"
- export AIX_PORT="$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER
port)"
- export AIX_USER="$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER
user)"
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SITEOX_AIX_CI_RUNNER key > ~/.ssh/aix_ci_key
|| exit $?
- chmod 600 ~/.ssh/aix_ci_key
- ssh-keyscan -p $AIX_PORT $AIX_HOST >> ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/aix_ci_key
- 'echo "=== AIX: cloning agent source at $CI_COMMIT_SHA ==="'
- "ssh -T -p $AIX_PORT $AIX_USER@$AIX_HOST bash -s <<EOF\nset -eu\nexport PATH=/opt/freeware/bin:/usr/bin:\\\
$PATH\nif [ ! -d \"$AIX_AGENT_SRC/.git\" ]; then\n git clone --progress \"$AIX_GIT_REMOTE\"\
\ \"$AIX_AGENT_SRC\"\nfi\ncd \"$AIX_AGENT_SRC\"\ngit clean -df\ngit reset --hard\n\
git fetch --progress origin\n# The commit under test may not be reachable from\
\ origin yet (e.g. a\n# brand-new branch push); fetch the branch ref as a fallback.\n\
git fetch --progress origin \"$CI_COMMIT_REF_NAME\" || true\ngit checkout \"$CI_COMMIT_SHA\"\
\nEOF\n"
- 'echo "=== AIX: provisioning host (setup-host.sh) ==="'
- ssh -tt -p $AIX_PORT $AIX_USER@$AIX_HOST "sh $AIX_AGENT_SRC/packaging/aix/setup-host.sh"
image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
needs: []
resource_group: aix_ci_host
rules:
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- if: $DDR_WORKFLOW_ID != null && $CI_COMMIT_BRANCH == "main"
when: always
+ - changes:
+ compare_to: $COMPARE_TO_BRANCH
+ paths:
+ - .gitlab/aix/aix_remote.yml
+ - .gitlab/aix/test/aix_unit_tests.yml
- variables:
EXTRA_TEST_FLAGS: --only-modified-packages
when: manual
script:
- 'echo "=== AIX: running unit tests ==="'
- "ssh -tt -p $AIX_PORT $AIX_USER@$AIX_HOST \"bash -c '\n set -eu\n cd $AIX_AGENT_SRC\n\
\ . ./packaging/aix/lib/env.sh\n python3.12 -m invoke -e test $EXTRA_TEST_FLAGS\
\ --build-exclude=python --build-cpus=1\n'\"\n"
stage: source_test
tags:
- arch:amd64
- specific:true
timeout: 2h
variables:
AIX_AGENT_SRC: /opt/dd-build/datadog-agent
AIX_GIT_REMOTE: https://github.com/DataDog/datadog-agent.git
EXTRA_TEST_FLAGS: ''
GIT_DEPTH: 1Changes Summary
ℹ️ Diff available in the job log. |
Contributor
|
🎯 Code Coverage (details) 🔗 Commit SHA: 621fecb | Docs | View more details | Give us feedback! |
Contributor
Files inventory check summaryFile checks results against ancestor cc466279: Results for datadog-agent_7.85.0~devel.git.16.621fecb.pipeline.135537206-1_amd64.deb:No change detected Results for datadog-iot-agent_7.85.0~devel.git.16.621fecb.pipeline.135537206-1_amd64.deb:No change detected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Update the AIX unit test job to run automatically when changing it.
Motivation
Makes it simpler to validate changes to the job itself, and avoids breaking it by accident.
Describe how you validated your changes
CI
Additional Notes