mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 12:45:35 +00:00
Update test-hudson-trigger.yml: determine JOB name from github.ref
This commit is contained in:
@@ -8,4 +8,12 @@ jobs:
|
||||
- name: Trigger hudson job
|
||||
shell: bash
|
||||
run: |
|
||||
curl https://${{ secrets.HUDSON_JOB_USERNAME }}:${{ secrets.HUDSON_JOB_PASSWORD}}@hudson.sapsailing.com/job/TestStatsFromGithubArtifacts/build?token=${{ secrets.HUDSON_JOB_TOKEN }}
|
||||
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||
JOB=SAPSailingAnalytics-master
|
||||
elif [ "${{ github.ref }}" =~ refs/heads/releases/.* ]; then
|
||||
JOB=$( echo "${{ github.ref }}" | sed -e 's/^refs\/heads\/releases\///' )
|
||||
else
|
||||
JOB=$( echo "${{ github.ref }}" | sed -e 's/^refs\/heads\///' )
|
||||
fi
|
||||
echo "Identified Hudson job: ${JOB}"
|
||||
curl https://${{ secrets.HUDSON_JOB_USERNAME }}:${{ secrets.HUDSON_JOB_PASSWORD}}@hudson.sapsailing.com/job/${JOB}/build?token=${{ secrets.HUDSON_JOB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user