Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Oct 10, 2024
1 parent 69b905c commit 011b8cb
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/jenkins_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,38 @@ on:
types: [opened, synchronize]

jobs:
get-status:
test-jenkins:
strategy:
matrix:
run_id: [1, 2]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: Push to tmp-jenkins branch
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b __jenkins_test_run_${{ matrix.run_id }}
echo "TEST JENKINS ${{ matrix.run_id }}" >> test_file
git add test_file
git commit -m "test run ${{ matrix.run_id }}"
GIT_LFS_SKIP_PUSH=1 git push -f origin __jenkins_test_run_${{ matrix.run_id }}
- name: Get Commit Status
uses: actions/github-script@v6
with:
script: |
const response = await github.request('GET /repos/{owner}/{repo}/commits/{ref}/status', {
owner: 'commaai',
repo: 'openpilot',
ref: 'heads/master',
ref: 'heads/__jenkins_test_run_${{ matrix.run_id }}',
headers: {
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28'
}
});
console.log(response.data.statuses[0].context);
console.log(response.data.statuses[0].state);
- name: get file
uses: actions/checkout@v4

- name: Push to tmp-jenkins branch
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b jenkins_run-${{ github.event.issue.number }}
echo "TEST JENKINS 1" >> test_file
git add test_file
git commit -m "test run 1"
GIT_LFS_SKIP_PUSH=1 git push -f origin jenkins_run-${{ github.event.issue.number }}
console.log(response.data.statuses[0].target_url);

0 comments on commit 011b8cb

Please sign in to comment.