mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 07:18:36 +00:00
Merge pull request #703 from openziti/ziti-webhook-jenkins
Jenkins smoketest fixes
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: Jenkins Nightly Smoketest
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Runs "at minute 28 past every 0400 GMT from GitHub main branch"
|
||||
- cron: '28 4 * * *'
|
||||
|
||||
jobs:
|
||||
jenkins-nightly-smoketest:
|
||||
runs-on: ubuntu-latest
|
||||
name: POST Webhook to Jenkinstest
|
||||
steps:
|
||||
- name: Trigger Nightly Smoketest
|
||||
uses: openziti/ziti-webhook-action@v2
|
||||
if: ${{ env.ZITI_JENKINS_WEBHOOK_URL != null }}
|
||||
env:
|
||||
ZITI_JENKINS_WEBHOOK_URL: ${{ secrets.ZITI_JENKINS_WEBHOOK_URL }}
|
||||
with:
|
||||
ziti-id: ${{ secrets.ZITI_JENKINS_IDENTITY }}
|
||||
webhook-url: ${{ secrets.ZITI_JENKINS_WEBHOOK_URL }}
|
||||
webhook-secret: ${{ secrets.ZITI_JENKINS_WEBHOOK_SECRET }}
|
||||
data: |
|
||||
ziti-version=gh-nightly-${{ github.run_id }}
|
||||
branch=release-next
|
||||
nightly=true
|
||||
|
||||
# These were copied from the Jenkins nightly trigger job's cURL query params
|
||||
# location=us-east-1 # not a valid build param in Jenkins
|
||||
# deploy_branch=master # master is default in Jenkins
|
||||
# destroy_delay=0 # 0 is default in Jenkins
|
||||
@@ -2,30 +2,34 @@ name: Jenkins Smoketest
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ziti_version:
|
||||
ziti-version:
|
||||
description: 'Semantic Version from `ziti-ci -q get-current-version`'
|
||||
type: string
|
||||
required: false
|
||||
required: true # error if this workflow is called from main.yml and the ziti_version is missing
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ziti_version:
|
||||
ziti-version:
|
||||
description: 'Semantic Version from `ziti-ci -q get-current-version`'
|
||||
type: string
|
||||
required: false
|
||||
required: false # this allows manually triggering the smoketest with the UNKNOWN version default
|
||||
|
||||
jobs:
|
||||
jenkins-smoketest:
|
||||
runs-on: ubuntu-latest
|
||||
name: POST Webhook to Jenkinstest
|
||||
name: Jenkins On-Demand Smoketest
|
||||
steps:
|
||||
- name: Trigger Smoketest
|
||||
- name: debug ziti-version input
|
||||
run: |
|
||||
echo ziti-version=${{ inputs.ziti-version || github.event.inputs.ziti-version }}
|
||||
- name: Send Webhook to Jenkinstest
|
||||
uses: openziti/ziti-webhook-action@v2
|
||||
if: ${{ env.ZITI_JENKINS_WEBHOOK_URL != null }}
|
||||
env:
|
||||
ZITI_JENKINS_WEBHOOK_URL: ${{ secrets.ZITI_JENKINS_WEBHOOK_URL }}
|
||||
uses: openziti/ziti-webhook-action@v2
|
||||
with:
|
||||
ziti-id: ${{ secrets.ZITI_JENKINS_IDENTITY }}
|
||||
webhook-url: ${{ secrets.ZITI_JENKINS_WEBHOOK_URL }}
|
||||
webhook-secret: ${{ secrets.ZITI_JENKINS_WEBHOOK_SECRET }}
|
||||
data: |
|
||||
ziti-version=${{ github.event.inputs.ziti_version }}
|
||||
ziti-version=${{ inputs.ziti-version || github.event.inputs.ziti-version }}
|
||||
branch=${{ github.head_ref || github.ref }}
|
||||
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: [ mac-os-build, windows-build ]
|
||||
outputs:
|
||||
ziti_version: ${{ steps.get_version.outputs.ziti_version }}
|
||||
ziti-version: ${{ steps.get_version.outputs.ziti-version }}
|
||||
steps:
|
||||
- name: Git Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -153,7 +153,7 @@ jobs:
|
||||
else
|
||||
# Set output parameters.
|
||||
echo "DEBUG: ZITI_VERSION=${ZITI_VERSION}"
|
||||
echo ::set-output name=ziti_version::${ZITI_VERSION}
|
||||
echo ::set-output name=ziti-version::${ZITI_VERSION}
|
||||
fi
|
||||
|
||||
- name: Publish to Artifactory
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
env:
|
||||
SNAPSHOT_REPO: openziti/ziti-tunnel
|
||||
RELEASE_REPO: netfoundry/ziti-tunnel
|
||||
ZITI_VERSION: ${{ steps.get_version.outputs.ziti_version }}
|
||||
ZITI_VERSION: ${{ steps.get_version.outputs.ziti-version }}
|
||||
id: tagprep
|
||||
run: |
|
||||
# the Docker cross-build only runs on branches main or release-v*
|
||||
@@ -218,14 +218,11 @@ jobs:
|
||||
smoketest:
|
||||
# BEGIN smoketest-job
|
||||
#
|
||||
# Any event that triggers this main workflow also triggers the smoketest steps,
|
||||
# but only if at least one of the needed secrets is present. This avoids
|
||||
# running job steps that can't succeed without the secrets e.g. in PR
|
||||
# builds from repo forks.
|
||||
# Any event that triggers this main workflow also triggers the smoketest
|
||||
#
|
||||
needs: linux-build
|
||||
if: ${{ github.repository == 'openziti/ziti' }}
|
||||
name: Trigger Smoketest
|
||||
name: Call the On-Demand Smoketest Workflow
|
||||
uses: ./.github/workflows/jenkins-smoketest.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
ziti_version: ${{ needs.linux-build.outputs.ziti_version }}
|
||||
ziti-version: ${{ needs.linux-build.outputs.ziti-version }}
|
||||
|
||||
Reference in New Issue
Block a user