-
Notifications
You must be signed in to change notification settings - Fork 654
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
[no-relnotes] Use reusable workflows for CI #1154
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "basic checks" | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
version: | ||
description: "The short SHA to use as a version string" | ||
value: ${{ jobs.variables.outputs.version }} | ||
golang_version: | ||
description: "The golang version for this project" | ||
value: ${{ jobs.variables.outputs.golang_version }} | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
branches: | ||
- main | ||
- release-* | ||
|
||
jobs: | ||
variables: | ||
uses: ./.github/workflows/variables.yaml | ||
|
||
golang: | ||
needs: | ||
- variables | ||
uses: ./.github/workflows/golang.yaml | ||
with: | ||
golang_version: ${{ needs.variables.outputs.golang_version }} | ||
|
||
helm: | ||
needs: | ||
- variables | ||
uses: ./.github/workflows/helm.yaml | ||
with: | ||
golang_version: ${{ needs.variables.outputs.golang_version }} | ||
|
||
code-scanning: | ||
needs: | ||
- variables | ||
uses: ./.github/workflows/code_scanning.yaml | ||
with: | ||
golang_version: ${{ needs.variables.outputs.golang_version }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright 2025 NVIDIA CORPORATION | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- "pull-request/[0-9]+" | ||
- main | ||
- release-* | ||
|
||
jobs: | ||
basic: | ||
uses: ./.github/workflows/basic-checks.yaml | ||
|
||
image: | ||
uses: ./.github/workflows/image.yaml | ||
needs: | ||
- basic | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.basic.outputs.version }} | ||
build_multi_arch_images: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release-') }} | ||
|
||
e2e-test: | ||
needs: | ||
- image | ||
- basic | ||
secrets: inherit | ||
uses: ./.github/workflows/e2e.yaml | ||
with: | ||
version: ${{ needs.basic.outputs.version }} | ||
golang_version: ${{ needs.basic.outputs.golang_version }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2024 NVIDIA CORPORATION | ||
# Copyright 2025 NVIDIA CORPORATION | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -15,69 +15,73 @@ | |
name: End-to-end Tests | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Image] | ||
types: | ||
- completed | ||
branches: | ||
- "pull-request/[0-9]+" | ||
- main | ||
- release-* | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
golang_version: | ||
required: true | ||
type: string | ||
secrets: | ||
AWS_ACCESS_KEY_ID: | ||
required: true | ||
AWS_SECRET_ACCESS_KEY: | ||
required: true | ||
AWS_SSH_KEY: | ||
required: true | ||
SLACK_BOT_TOKEN: | ||
required: true | ||
SLACK_CHANNEL_ID: | ||
required: true | ||
|
||
jobs: | ||
e2e-tests: | ||
runs-on: linux-amd64-cpu4 | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ${{ github.event.workflow_run.event == 'push' }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Calculate build vars | ||
id: vars | ||
run: | | ||
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV | ||
GOLANG_VERSION=$(./hack/golang-version.sh) | ||
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.golang_version }} | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GOLANG_VERSION }} | ||
- name: Set up Holodeck | ||
uses: NVIDIA/[email protected] | ||
with: | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }} | ||
holodeck_config: "tests/e2e/infra/aws.yaml" | ||
|
||
- name: Set up Holodeck | ||
uses: NVIDIA/[email protected] | ||
with: | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }} | ||
holodeck_config: "tests/e2e/infra/aws.yaml" | ||
- name: Run e2e tests | ||
env: | ||
KUBECONFIG: ${{ github.workspace }}/kubeconfig | ||
E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-device-plugin | ||
E2E_IMAGE_TAG: ${{ inputs.version }}-ubi9 | ||
LOG_ARTIFACTS: ${{ github.workspace }}/e2e_logs | ||
run: | | ||
make test-e2e | ||
|
||
- name: Run e2e tests | ||
env: | ||
KUBECONFIG: ${{ github.workspace }}/kubeconfig | ||
E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-device-plugin | ||
E2E_IMAGE_TAG: ${COMMIT_SHORT_SHA}-ubi9 | ||
LOG_ARTIFACTS: ${{ github.workspace }}/e2e_logs | ||
run: | | ||
make test-e2e | ||
- name: Archive test logs | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: e2e-test-logs | ||
path: ./e2e_logs/ | ||
retention-days: 15 | ||
|
||
- name: Archive test logs | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: e2e-test-logs | ||
path: ./e2e_logs/ | ||
retention-days: 15 | ||
- name: Send Slack alert notification | ||
id: slack | ||
if: false | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
with: | ||
channel-id: ${{ secrets.SLACK_CHANNEL_ID }} | ||
slack-message: | | ||
:x: On repository ${{ github.repository }} the Workflow *${{ github.workflow }}* has failed. | ||
|
||
- name: Send Slack alert notification | ||
if: ${{ failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
method: chat.postMessage | ||
token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
payload: | | ||
channel: ${{ secrets.SLACK_CHANNEL_ID }} | ||
text: | | ||
:x: On repository ${{ github.repository }}, the Workflow *${{ github.workflow }}* has failed. | ||
|
||
Details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
Details: ${{ env.SUMMARY_URL }} |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ArangoGutierrez the upgrade to v2.0.0 has broken this step. I believe the API has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check and take action for our repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed