forked from microsoft/AzureTRE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NWSDE #12] Update GitHub Actions to disable (1) automatic deploy on …
…schedule & push (2) add action to skip e2e tests
- Loading branch information
Showing
3 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
name: Deploy Azure TRE - skip e2e tests | ||
# This workflow is the integration build run for pushes to the main branch | ||
# It also runs on a schedule, serving as the nightly build | ||
|
||
on: # yamllint disable-line rule:truthy | ||
# JR 29-11-2023 Disable push to repo and scheduled deployments (for now) | ||
# schedule: | ||
# # midnight every day https://crontab.guru/#0_0_*_*_* | ||
# - cron: "0 0 * * *" | ||
# push: | ||
# branches: [main] | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: The environment to run this workflow in | ||
type: environment | ||
default: CICD | ||
required: true | ||
|
||
# This will prevent multiple runs of this entire workflow. | ||
# We should NOT cancel in progress runs as that can destabilize the environment. | ||
concurrency: "${{ github.workflow }}-${{ github.ref }}" | ||
|
||
jobs: | ||
run-deploy-tre-main: | ||
name: "Deploy" | ||
# JR 29-11-2023 Disable main branch check - this is now controlled via GitHub environment protection rules (see Settings > Environments) | ||
# if: github.ref == 'refs/heads/main' | ||
uses: ./.github/workflows/deploy_tre_reusable.yml | ||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
with: | ||
ciGitRef: ${{ github.ref }} | ||
e2eTestsCustomSelector: >- | ||
${{ (github.event_name == 'push' && 'extended or extended_aad') | ||
|| 'extended or extended_aad or shared_services or airlock' }} | ||
environmentName: ${{ github.event.inputs.environment || 'CICD' }} | ||
E2E_TESTS_NUMBER_PROCESSES: 1 | ||
DEVCONTAINER_TAG: 'latest' | ||
ENABLE_E2E_TESTS: false | ||
secrets: | ||
AAD_TENANT_ID: ${{ secrets.AAD_TENANT_ID }} | ||
ACR_NAME: ${{ secrets.ACR_NAME }} | ||
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} | ||
API_CLIENT_ID: ${{ secrets.API_CLIENT_ID }} | ||
API_CLIENT_SECRET: ${{ secrets.API_CLIENT_SECRET }} | ||
APPLICATION_ADMIN_CLIENT_ID: ${{ secrets.APPLICATION_ADMIN_CLIENT_ID }} | ||
APPLICATION_ADMIN_CLIENT_SECRET: ${{ secrets.APPLICATION_ADMIN_CLIENT_SECRET }} | ||
MGMT_RESOURCE_GROUP_NAME: ${{ secrets.MGMT_RESOURCE_GROUP_NAME }} | ||
MS_TEAMS_WEBHOOK_URI: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} | ||
MGMT_STORAGE_ACCOUNT_NAME: ${{ secrets.MGMT_STORAGE_ACCOUNT_NAME }} | ||
SWAGGER_UI_CLIENT_ID: ${{ secrets.SWAGGER_UI_CLIENT_ID }} | ||
TEST_APP_ID: ${{ secrets.TEST_APP_ID }} | ||
TEST_WORKSPACE_APP_ID: ${{ secrets.TEST_WORKSPACE_APP_ID }} | ||
TEST_WORKSPACE_APP_SECRET: "${{ secrets.TEST_WORKSPACE_APP_SECRET }}" | ||
TEST_ACCOUNT_CLIENT_ID: "${{ secrets.TEST_ACCOUNT_CLIENT_ID }}" | ||
TEST_ACCOUNT_CLIENT_SECRET: "${{ secrets.TEST_ACCOUNT_CLIENT_SECRET }}" | ||
TRE_ID: ${{ secrets.TRE_ID }} | ||
CI_CACHE_ACR_NAME: ${{ secrets.ACR_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,11 @@ on: # yamllint disable-line rule:truthy | |
description: "" | ||
type: string | ||
required: true | ||
ENABLE_E2E_TESTS: | ||
description: Flag to enable/disable end-to-end tests. Enabled by default | ||
type: boolean | ||
default: true | ||
required: false | ||
secrets: | ||
AAD_TENANT_ID: | ||
description: "" | ||
|
@@ -175,7 +180,7 @@ jobs: | |
fi | ||
- name: Report check status start | ||
if: inputs.prHeadSha != '' | ||
if: ${{ inputs.ENABLE_E2E_TESTS && (inputs.prHeadSha != '') }} | ||
uses: LouisBrunner/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -723,6 +728,7 @@ jobs: | |
|
||
e2e_tests_smoke: | ||
name: "Run E2E Tests (Smoke)" | ||
if: ${{ inputs.ENABLE_E2E_TESTS }} | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environmentName }} | ||
needs: [deploy_shared_services, register_bundles, deploy_ui] | ||
|
@@ -765,7 +771,7 @@ jobs: | |
|
||
e2e_tests_custom: | ||
name: "Run E2E Tests" | ||
if: ${{ inputs.e2eTestsCustomSelector != '' }} | ||
if: ${{ inputs.ENABLE_E2E_TESTS && (inputs.e2eTestsCustomSelector != '') }} | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environmentName }} | ||
needs: [deploy_shared_services, register_bundles, register_user_resource_bundles] | ||
|
@@ -814,7 +820,7 @@ jobs: | |
permissions: | ||
checks: write | ||
contents: read | ||
if: always() | ||
if: ${{ inputs.ENABLE_E2E_TESTS && always() }} | ||
environment: ${{ inputs.environmentName }} | ||
steps: | ||
# - uses: technote-space/workflow-conclusion-action@v3 (removed due to archived repo and deprecated node.js version) | ||
|