-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create PSDB.yml enabling psdb for github emu staging branch (#2)
# Create PSDB.yml enabling psdb for github emu staging branch ## What type of PR is this? (check all applicable) - [ ] Refactor - [x] Feature - [ ] Bug Fix - [ ] Optimization - [ ] Documentation Update ## Technical details Moving internal repo from github to github EMU ## Added/updated tests? _We encourage you to keep the code coverage percentage at 80% and above._ - [ ] Yes - [x] No, Does not apply to this PR. ## Updated CHANGELOG? _Needed for Release updates for a ROCm release._ - [ ] Yes - [x] No, Does not apply to this PR. ## Added/Updated documentation? - [ ] Yes - [x] No, Does not apply to this PR. --------- Co-authored-by: Mallya, Ameya Keshava <AmeyaKeshava.Mallya@amd.com>
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
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,65 @@ | ||
# This workflow is used to invoke the PSDB jenkins job for rocm CI. The python script can be used to invoke any jenkins job but input params needs to be configured properly | ||
name: ROCm CI PSDB | ||
|
||
# Controls when the workflow will run | ||
on: | ||
pull_request: | ||
branches: [amd-staging] | ||
types: [opened, synchronize, reopened, edited] | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel, below is a single job called invoke jenkins jobs | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
invoke_jenkins_PSDB: | ||
# The type of runner that the job will run on. For github hosted runner use (${{ 'ubuntu-latest' }}) or self-hosted for sel-hosted runner. | ||
runs-on: self-hosted | ||
container: | ||
image: compute-artifactory.amd.com:5000/rocm-base-images/ghemu-action-ubuntu-24.04:2024101101 | ||
env: | ||
svc_acc_org_secret: ${{secrets.ROCM_SERVICE_ACCOUNT_PAT}} | ||
input_sha: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }} | ||
input_pr_num: ${{ github.event.pull_request.number != '' && github.event.pull_request.number || 0 }} | ||
input_pr_url: ${{ github.event.pull_request.html_url != '' && github.event.pull_request.html_url || '' }} | ||
input_pr_title: ${{ github.event.pull_request.title != '' && github.event.pull_request.title || '' }} | ||
# set the pipeline name here based on branch name | ||
pipeline_name: ${{ github.event.pull_request.base.ref == 'amd-mainline' && 'compute-psdb-no-npi' || 'compute-psdb-staging-profiler-sdk-internal-emu' }} | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Check out rocm_ci_infra private repo | ||
uses: actions/checkout@main | ||
with: | ||
repository: AMD-ROCm-Internal/rocm_ci_infra | ||
token: ${{ secrets.ROCM_SERVICE_ACCOUNT_PAT }} | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Getting Event Details | ||
run: | | ||
echo $(pwd) | ||
echo $GITHUB_ENV | ||
echo $GITHUB_REPOSITORY | ||
echo $GITHUB_SERVER_URL | ||
echo "GITHUB_SHA is: $GITHUB_SHA" | ||
echo "GITHUB_WORKFLOW_SHA is: $GITHUB_WORKFLOW_SHA" | ||
echo "GITHUB_BASE_REF is: $GITHUB_BASE_REF" | ||
echo "GITHUB_REF_NAME is: $GITHUB_REF_NAME" | ||
echo "github.event.pull_request.id is: ${{github.event.pull_request.id}}" | ||
echo "github.event.pull_request.html_url is: ${{github.event.pull_request.html_url}}" | ||
echo "github.event.pull_request.number is: ${{github.event.pull_request.number}}" | ||
echo "github.event.pull_request.title is: ${{github.event.pull_request.title}}" | ||
echo "github.event.pull_request.url is: ${{github.event.pull_request.url}}" | ||
echo "github.event.pull_request.issue_url is: ${{github.event.pull_request.issue_url}}" | ||
echo "github.event.pull_request.comments_url is: ${{github.event.pull_request.comments_url}}" | ||
echo "github.event.pull_request.statuses_url is: ${{github.event.pull_request.statuses_url}}" | ||
echo "github.event.pull_request.head.sha is: ${{github.event.pull_request.head.sha}}" | ||
echo "github.event.pull_request.base.ref is: ${{github.event.pull_request.base.ref}}" | ||
echo "github.event.pull_request.merge_commit_sha is: ${{github.event.pull_request.merge_commit_sha}}" | ||
echo "github.event.pull_request is: ${{github.event.pull_request}}" | ||
# pipeline name shuould be unique to the workfow yml for a given repository | ||
#curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{secrets.ROCM_SERVICE_ACCOUNT_PAT}}" ${{github.event.pull_request.comments_url}} -d '{"body":"Github action triggered jenkins job for compute-psdb-staging-smi-libs-ghemu "}' | ||
#python jenkins_api.py -jn compute-psdb-staging-smi-libs-ghemu -ghr $GITHUB_REPOSITORY -ghsha $input_sha -ghprn $input_pr_num -ghpru "$input_pr_url" -ghprt "$input_pr_title" | ||
- name: Trigger Jenkins Pipeline | ||
run: | | ||
echo "running jenkins_api.py with input sha - $input_sha for pull request - $input_pr_url" | ||
python3 jenkins_api.py -jn $pipeline_name -ghr $GITHUB_REPOSITORY -ghsha $input_sha -ghprn $input_pr_num -ghpru "$input_pr_url" -ghprt "$input_pr_title" -ghpat $svc_acc_org_secret |