init v4 branch
This commit is contained in:
@@ -4,25 +4,25 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-develop:
|
||||
package-trigger-v4:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Package Trigger
|
||||
if: github.ref == 'refs/heads/develop'
|
||||
if: github.ref == 'refs/heads/v4'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_SONARR_DEVELOP }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_SONARR_DEVELOP is set; skipping trigger. ****"
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_SONARR_V4 }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_SONARR_V4 is set; skipping trigger. ****"
|
||||
exit 0
|
||||
fi
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-sonarr/job/develop/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-sonarr/job/v4/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||
exit 0
|
||||
fi
|
||||
echo "**** Package trigger running off of develop branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_SONARR_DEVELOP\". ****"
|
||||
echo "**** Package trigger running off of v4 branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_SONARR_V4\". ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-sonarr/job/develop/buildWithParameters?PACKAGE_CHECK=true \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-sonarr/job/v4/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
|
||||
Reference in New Issue
Block a user