CICD for commit c43478d5de1dd416a9229866a510a3e2fe8c9630 #4684
Workflow file for this run
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
name: e2e tests | |
on: | |
push: | |
branches: [main, k8s-sync-*] | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
operator_image: | |
description: 'Name of an existing operator image. Leave blank to build one with the default name' | |
type: string | |
required: false | |
full_vertica_image: | |
description: 'Name of an existing full vertica v2 image. Leave blank to build one with the default name' | |
type: string | |
required: false | |
minimal_vertica_image: | |
description: 'Name of an existing minimal vertica v2 image. Leave blank to build one with the default name' | |
type: string | |
required: false | |
legacy_vertica_image: | |
description: 'Name of an existing full image with admintools and SSH support. Leave blank to build one with the default name' | |
type: string | |
required: false | |
vlogger_image: | |
description: 'Name of an existing vlogger image. Leave blank to build one with the default name' | |
type: string | |
required: false | |
e2e_test_suites: | |
description: 'E2E test suites to run' | |
required: false | |
type: choice | |
default: all | |
options: | |
- all | |
- none | |
- admintools leg 1 | |
- admintools leg 2 | |
- admintools leg 3 | |
- admintools leg 4 | |
- admintools leg 4 vdb-gen | |
- admintools leg 5 | |
- admintools server upgrade | |
- admintools operator upgrade | |
- admintools udx | |
- vcluster leg 1 | |
- vcluster leg 2 | |
- vcluster leg 3 | |
- vcluster leg 4 | |
- vcluster leg 4 vdb-gen | |
- vcluster leg 5 | |
- vcluster leg 6 | |
- vcluster leg 6 revivedb | |
- vcluster leg 7 | |
- leg 8 | |
- vcluster leg 9 | |
- vcluster leg 10 | |
- vcluster leg 11 | |
- vcluster server upgrade | |
- vcluster udx | |
run_security_scan: | |
description: 'What images to scan?' | |
type: choice | |
default: 'all, except vertica server' | |
options: | |
- all | |
- none | |
- all, except vertica server | |
build_release_assets: | |
description: 'Build the release assets?' | |
type: choice | |
options: | |
- all | |
- none | |
default: all | |
required: false | |
reason: | |
description: 'Descriptive name of the workflow run' | |
required: false | |
default: '' | |
run-name: ${{ inputs.reason }} | |
jobs: | |
build: | |
uses: ./.github/workflows/build-images.yml | |
with: | |
vlogger_image: ${{ inputs.vlogger_image }} | |
operator_image: ${{ inputs.operator_image }} | |
minimal_vertica_image: ${{ inputs.minimal_vertica_image }} | |
full_vertica_image: ${{ inputs.full_vertica_image }} | |
legacy_vertica_image: ${{ inputs.legacy_vertica_image }} | |
run_security_scan: ${{ inputs.run_security_scan }} | |
secrets: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
unittests: | |
uses: ./.github/workflows/unittests.yml | |
secrets: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
scorecardtests: | |
uses: ./.github/workflows/scorecardtests.yml | |
build-release-assets: | |
uses: ./.github/workflows/build-release-assets.yml | |
if: ${{ inputs.build_release_assets == 'all' || inputs.build_release_assests == '' }} | |
e2e-leg-6-vcluster-revivedb: | |
if: ${{ ! github.event.pull_request.head.repo.fork && (inputs.e2e_test_suites == 'all' || inputs.e2e_test_suites == 'vcluster leg 6 revivedb' || inputs.e2e_test_suites == '')}} | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test | |
uses: ./.github/actions/run-e2e-leg | |
with: | |
leg-identifier: 'leg-6-revivedb' | |
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} | |
vlogger-image: ${{ needs.build.outputs.vlogger-image }} | |
operator-image: ${{ needs.build.outputs.operator-image }} | |
vertica-image: ${{ needs.build.outputs.full-vertica-image }} | |
vertica-deployment-method: vclusterops | |
communal-storage-type: hostpath | |
minimum-vertica-image: '24.2.0' | |
upload-operator-to-private-repo: | |
needs: [ | |
build, | |
# e2e-leg-1-vcluster, | |
# e2e-leg-2-vcluster, | |
# e2e-leg-3-vclusterops-previous-release, | |
# e2e-leg-3-vcluster, | |
# e2e-leg-4-vcluster, | |
# e2e-leg-4-vcluster-vdb-gen, | |
# e2e-leg-5-vcluster, | |
# e2e-leg-6-vcluster, | |
e2e-leg-6-vcluster-revivedb, | |
# e2e-leg-7-vcluster, | |
# e2e-leg-9-vcluster, | |
# e2e-leg-10-vcluster, | |
# e2e-leg-11-vcluster, | |
# e2e-server-upgrade-vcluster, | |
# e2e-operator-upgrade, | |
# e2e-udx-vcluster, | |
# e2e-leg-1-admintools, | |
# e2e-leg-2-admintools, | |
# e2e-leg-3-admintools, | |
# e2e-leg-4-admintools, | |
# e2e-leg-4-admintools-vdb-gen, | |
# e2e-leg-5-admintools, | |
# e2e-leg-8-admintools-offline, | |
# e2e-leg-8-admintools-online, | |
# e2e-server-upgrade-admintools, | |
# e2e-udx-admintools | |
] | |
runs-on: ubuntu-latest | |
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && contains(inputs.reason, 'server daily version') && contains(github.actor, 'verticareleng') }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: vertica-kubernetes | |
fetch-depth: 0 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Upload new image | |
run: | | |
docker buildx imagetools create --tag opentext/verticadb-operator-private:${{ github.sha }} ${{ needs.build.outputs.operator-image }} | |
sync-vcluster: | |
name: Sync-vcluster-code | |
needs: [ | |
# e2e-leg-1-vcluster, | |
# e2e-leg-2-vcluster, | |
# e2e-leg-3-vclusterops-previous-release, | |
# e2e-leg-3-vcluster, | |
# e2e-leg-4-vcluster, | |
# e2e-leg-4-vcluster-vdb-gen, | |
# e2e-leg-5-vcluster, | |
# e2e-leg-6-vcluster, | |
e2e-leg-6-vcluster-revivedb, | |
# e2e-leg-7-vcluster, | |
# e2e-leg-9-vcluster, | |
# e2e-leg-10-vcluster, | |
# e2e-leg-11-vcluster, | |
# e2e-server-upgrade-vcluster, | |
# e2e-operator-upgrade, | |
# e2e-udx-vcluster | |
] | |
runs-on: ubuntu-latest | |
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && contains(github.ref, 'k8s-sync') && (github.event_name == 'push')}} | |
steps: | |
- name: Create a PR | |
run: | | |
# Get the current branch name | |
current_branch="${GITHUB_REF#refs/heads/}" | |
# Define the API endpoint and PR details | |
api_url="https://api.github.com/repos/${{ github.repository }}/pulls" | |
title="CICD for VClusterOps Synchronization" | |
body="This PR was automatically generated by CICD pipeline to sync vclusterOps." | |
base="main" | |
head="$current_branch" | |
# Create the pull request via the GitHub API | |
curl -X POST "$api_url" \ | |
-H "Authorization: token ${{ github.token }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-d "$(echo "{\"title\": \"$title\", \"body\": \"$body\", \"head\": \"$head\", \"base\": \"$base\"}")" | |
notification: | |
name: team-notification | |
needs: [sync-vcluster] | |
runs-on: ubuntu-latest | |
if: ${{ always() && contains(github.ref, 'k8s-sync') }} | |
steps: | |
- name: notification on success | |
if: ${{ always() && contains(needs.sync-vcluster.result, 'success') }} | |
uses: jdcargile/[email protected] | |
with: | |
github-token: ${{ github.token }} | |
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} | |
notification-summary: Success | workflow ${{ github.workflow }} on branch ${{ github.ref_name }} | |
notification-color: 28a745 | |
verbose-logging: true | |
- name: notification on failure | |
if: ${{ always() && ! contains(needs.sync-vcluster.result, 'success') }} | |
uses: jdcargile/[email protected] | |
with: | |
github-token: ${{ github.token }} | |
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} | |
notification-summary: Failure | workflow ${{ github.workflow }} on branch ${{ github.ref_name }} | |
notification-color: dc3545 | |
verbose-logging: true |