ci: Add run name and start url for e2e tests and docker nighly command (no-changelog) (#4800)
* ci: add run name and start url * update ref * use branch as input * add message for slack notifications * add branch quotes * remove @ from user * make user not required
This commit is contained in:
14
.github/workflows/docker-images-nightly.yml
vendored
14
.github/workflows/docker-images-nightly.yml
vendored
@@ -1,4 +1,5 @@
|
|||||||
name: Docker Nightly Image CI
|
name: Docker Nightly Image CI
|
||||||
|
run-name: Build ${{ inputs.branch }} - ${{ inputs.user }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -22,6 +23,14 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
required: true
|
required: true
|
||||||
default: false
|
default: false
|
||||||
|
user:
|
||||||
|
description: ''
|
||||||
|
required: false
|
||||||
|
default: 'schedule'
|
||||||
|
start-url:
|
||||||
|
description: 'URL to call after workflow is kicked off.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
success-url:
|
success-url:
|
||||||
description: 'URL to call after Docker Image got built successfully.'
|
description: 'URL to call after Docker Image got built successfully.'
|
||||||
required: false
|
required: false
|
||||||
@@ -32,6 +41,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Call Start URL - optionally
|
||||||
|
run: |
|
||||||
|
[[ "${{github.event.inputs.start-url}}" != "" ]] && curl -v -X POST -d 'url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' ${{github.event.inputs.start-url}} || echo ""
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
32
.github/workflows/e2e-tests.yml
vendored
32
.github/workflows/e2e-tests.yml
vendored
@@ -1,9 +1,27 @@
|
|||||||
name: End-to-End tests
|
name: End-to-End tests
|
||||||
|
run-name: E2E Tests ${{ inputs.branch }} - ${{ inputs.user }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 3 * * *'
|
- cron: '0 3 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: 'GitHub branch to test.'
|
||||||
|
required: false
|
||||||
|
default: 'master'
|
||||||
|
user:
|
||||||
|
description: 'User who kicked this off.'
|
||||||
|
required: false
|
||||||
|
default: 'schedule'
|
||||||
|
start-url:
|
||||||
|
description: 'URL to call after workflow is kicked off.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
success-url:
|
||||||
|
description: 'URL to call after workflow is done.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -16,7 +34,15 @@ jobs:
|
|||||||
node-version: [14.x, 16.x]
|
node-version: [14.x, 16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Call Start URL - optionally
|
||||||
|
run: |
|
||||||
|
[[ "${{github.event.inputs.start-url}}" != "" ]] && curl -v -X POST -d 'url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' ${{github.event.inputs.start-url}} || echo ""
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: ${{ github.event.inputs.repository || 'n8n-io/n8n' }}
|
||||||
|
ref: ${{ github.event.inputs.branch || 'master' }}
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.2.4
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
|
|
||||||
@@ -44,3 +70,9 @@ jobs:
|
|||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
channel: '#updates-build-alerts'
|
channel: '#updates-build-alerts'
|
||||||
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
|
message: Tests failure for branch `${{ inputs.branch }}` deployed by ${{ inputs.user }}
|
||||||
|
|
||||||
|
- name: Call Success URL - optionally
|
||||||
|
run: |
|
||||||
|
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
|
||||||
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user