Skip to content

Commit

Permalink
Enable dispatching workflows via github UI
Browse files Browse the repository at this point in the history
Signed-off-by: João Pereira <joaod@vmware.com>
  • Loading branch information
joaopapereira committed Jun 5, 2024
1 parent 85ba5c1 commit 50ae04d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests-integration-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ on:
pool-namespace:
type: string
default: 'tas-devex'
is-pr:
type: boolean
default: true

jobs:
run-integration-tests:
Expand All @@ -38,7 +41,7 @@ jobs:
container: us-west2-docker.pkg.dev/shepherd-268822/shepherd2/concourse-resource:latest
steps:
- uses: LouisBrunner/checks-action@v2.0.0
if: always()
if: always() && inputs.is-pr
id: check
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -272,7 +275,7 @@ jobs:
shepherd delete lease ${{ steps.claim-env.outputs.lease-id }} --namespace tas-devex
- uses: LouisBrunner/checks-action@v2.0.0
if: always()
if: always() && inputs.is-pr
with:
token: ${{ secrets.GITHUB_TOKEN }}
check_id: ${{ steps.check.outputs.check_id }}
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/tests-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ run-name: "Integration [${{ github.event.workflow_run.head_branch }}]: ${{ githu

on:
workflow_dispatch:
inputs:
workflow:
description: Tests to run
required: true
type: choice
options:
- run-integration-tests-cf-env
- run-integration-tests-cf-env-with-client-creds
- run-integration-tests-cf-env-with-min-capi
# - run-integration-windows
# - run-integration-windows-client-credentials
workflow_run:
workflows:
- "Tests"
Expand All @@ -13,41 +24,44 @@ on:
jobs:
run-integration-tests-cf-env:
name: Integration tests
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.workflow == 'run-integration-tests-cf-env') || github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/tests-integration-reusable.yml
with:
capi-version: edge
run-with-client-creds: false
os: ubuntu-latest
name: Integration
is-pr: ${{ github.event_name != 'workflow_dispatch' }}
secrets: inherit

run-integration-tests-cf-env-with-client-creds:
name: client creds
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') || github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/tests-integration-reusable.yml
with:
capi-version: edge
run-with-client-creds: true
os: ubuntu-latest
name: Integration client creds
is-pr: ${{ github.event_name != 'workflow_dispatch' }}
secrets: inherit

run-integration-tests-cf-env-with-min-capi:
name: MIN CAPI
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.workflow == 'run-integration-tests-cf-env-with-min-capi') || github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/tests-integration-reusable.yml
with:
capi-version: min
run-with-client-creds: false
os: ubuntu-latest
name: Integration MIN CAPI
pool-name: cfd_16_11_0
is-pr: ${{ github.event_name != 'workflow_dispatch' }}
secrets: inherit

#run-integration-windows:
# name: Windows
# if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
# if: ${{ (github.event_name == 'workflow_dispatch' && inputs.workflow == 'run-integration-windows') || github.event.workflow_run.conclusion == 'success' }}
# uses: ./.github/workflows/tests-integration-reusable.yml
# with:
# capi-version: edge
Expand All @@ -58,7 +72,7 @@ jobs:

#run-integration-windows-client-credentials:
# name: Windows with client credentials
# if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
# if: ${{ (github.event_name == 'workflow_dispatch' && inputs.workflow == 'run-integration-windows-client-credentials') || github.event.workflow_run.conclusion == 'success' }}
# uses: ./.github/workflows/tests-integration-reusable.yml
# with:
# capi-version: edge
Expand Down

0 comments on commit 50ae04d

Please sign in to comment.