Skip to content

Commit

Permalink
SYS-164 added workflow to run linter and trigger smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TieDyedSheep committed May 15, 2024
1 parent 06f0f42 commit 71b8f57
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,20 @@ jobs:
id: vars
run: |
# Determine the branch name
BRANCH_NAME=${{ github.head_ref }}${{ github.head_ref && 'not used' || github.ref_name }}
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
else
echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
fi
# Export the environment variables
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
- name: Trigger Jenkins Job
env:
BRANCH_NAME: ${{ env.BRANCH_NAME }}
REPO_NAME: ${{ vars.REPO_NAME }}
JENKINS_URL: ${{ vars.JENKINS_URL }}
JENKINS_JOB_NAME_SMOKE: ${{ vars.JENKINS_JOB_NAME_SMOKE }}
run: |
curl -f -X POST "${{ secrets.JENKINS_URL }}/job/${{ secrets.JENKINS_JOB_SMOKE }}/buildWithParameters?SPECIFY_${REPO_NAME}_BRANCH=true&${REPO_NAME}_BRANCH=${BRANCH_NAME}" \
curl -f -X POST "${JENKINS_URL}/job/${JENKINS_JOB_SMOKE}/buildWithParameters?SPECIFY_${REPO_NAME}_BRANCH=true&${REPO_NAME}_BRANCH=${BRANCH_NAME}" \
--user "${{ secrets.JENKINS_API_CREDS }}"

0 comments on commit 71b8f57

Please sign in to comment.