Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

chore: Update DUBBD, gitlab, sonarqube, jira and confluence (#118) #140

chore: Update DUBBD, gitlab, sonarqube, jira and confluence (#118)

chore: Update DUBBD, gitlab, sonarqube, jira and confluence (#118) #140

Workflow file for this run

# Attribution for a bunch of this goes to CloudPosse
# https://github.com/cloudposse/actions/blob/master/.github/workflows/test-command.yml
name: test
on:
repository_dispatch:
types: [test-command]
push:
branches:
- main
permissions:
id-token: write
contents: read
defaults:
run:
# We need -e -o pipefail for consistency with GitHub Actions' default behavior
shell: bash -e -o pipefail {0}
jobs:
# Parse the command so we can decide which tests to run. Examples: "/test all", "/test validate", "/test e2e"
# We can do as many of these as we want to get as granular as we want.
parse:
runs-on: ubuntu-latest
outputs:
run-ping: ${{ steps.parse.outputs.run-ping }}
run-clean_install: ${{ steps.parse.outputs.run-clean_install }}
run-upgrade: ${{ steps.parse.outputs.run-upgrade}}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }}
- name: Parse Args
id: parse
uses: ./.github/actions/parse-test
# Update the comment that triggered the /test command to show the run url
comment:
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }}
- name: Update Comment
uses: ./.github/actions/comment
with:
token: ${{ secrets.PAT }}
# Do a simple ping/pong status update to validate things are working
ping:
runs-on: ubuntu-latest
needs: parse
if: needs.parse.outputs.run-ping == 'true'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }}
- name: Ping Test
uses: ./.github/actions/ping
with:
token: ${{ secrets.PAT }}
# Run the clean_install tests
clean_install:
runs-on: ubuntu-latest
needs: parse
if: needs.parse.outputs.run-clean_install == 'true'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }}
- name: Run Clean Install Tests
uses: ./.github/actions/e2e
with:
upgrade: "no"
token: ${{ secrets.PAT }}
role-to-assume: ${{ secrets.AWS_COMMERCIAL_ROLE_TO_ASSUME }}
region: ${{ vars.AWS_REGION }}
github-context: "test / e2e (${{github.event_name}})"
aws-availability-zone: ${{ vars.AWS_AVAILABILITY_ZONE }}
ghcr-username: ${{ github.actor }}
ghcr-password: ${{ secrets.GITHUB_TOKEN }}
registry1-username: ${{ secrets.REGISTRY1_USERNAME }}
registry1-password: ${{ secrets.REGISTRY1_PASSWORD }}
latest-version: ""
copy-bundle: "no"
# Run the Upgrade tests
upgrade:
runs-on: ubuntu-latest
needs: parse
if: needs.parse.outputs.run-upgrade == 'true'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }}
# Run this step first so we can fail fast in case an invalid package name is provided
- name: Get latest package version to upgrade from
id: latest-package-version
uses: ./.github/actions/latest-package-version
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
package-name: uds-package/software-factory-demo
- name: Run Upgrade Tests
uses: ./.github/actions/e2e
with:
upgrade: "yes"
token: ${{ secrets.PAT }}
role-to-assume: ${{ secrets.AWS_COMMERCIAL_ROLE_TO_ASSUME }}
region: ${{ vars.AWS_REGION }}
github-context: "test / e2e (${{github.event_name}})"
aws-availability-zone: ${{ vars.AWS_AVAILABILITY_ZONE }}
ghcr-username: ${{ github.actor }}
ghcr-password: ${{ secrets.GITHUB_TOKEN }}
registry1-username: ${{ secrets.REGISTRY1_USERNAME }}
registry1-password: ${{ secrets.REGISTRY1_PASSWORD }}
latest-version: ${{ steps.latest-package-version.outputs.latest-package-version }}
copy-bundle: "no"