generated from cloud-native-toolkit/template-terraform-gitops
-
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.
DB2WH Subscription and instance operator based testing (#2)
* Updates to README * updates to readme * Fixed yaml * Updated Framework to match with template * fix bugs * provider yaml * added variables * fixed default value * fix yaml * updated module * fixed module * sync with latest template changes * cp key updated * fixed permission * added component name * Updated module name * commenting the code to test scenario * fixed values.yaml issues * Fixed Values.yaml * Debugging stmt * Converted create.yaml to HELM charts * removed operator catalog * Clean up operator subscription for db2wh * removed conditional logic * renamed chart folder * logic updates * updates to README * added debug stmts * Added Chart Directory path * fixed chart name * Values.yaml fix * Added db2wh operator in the main.tf * Fixing the string quotes * updated variable names * Added operator in the main.tf * Code Cleanup * updated namespaces * Updated namespaces * updated namespace * Added sequence for template * added the path * updated main.tf * Format code * Chart name updated * Increased sleep * removed namespace * Added namespace * sleep changes * test * Added sleep time more to test * reverted namespace * debugging validatedeploy.sh * added cpd-operators * added sleep time * testing db2wh catalog source only * Test * Added service db2wh with sequence * Updated Validate deploy to check for Subscription * clean up db2wh validatedeploy * Sync main.tf , values.yaml variables * Added more sleep time * Updates to support Specialization DB2WH install * fixed the namespace name * Removed db2wh service * Added namespace used for this project * Updated the DB2wh to support special installation * Added variables in outputs stage file * fixed the build error to address the output files * Fixes for build error * Fix build error * Added automation workflow build clean status * fixed intendent typos * Format changes * Added db2wh instance * removed the CP Catalog file which causes Catalog source removal * Checking instance module * Removed job approach and validating if instance creates * removed annotation * added annotations * added sync wave * Sync wave * Trying Syncwave * annotation variations * Added instance condition * added pull secret for each namespace and verify if solves * added dependency block * removed the depends on condition * added newline to trigger build * commented out entitlement/pull secret from test case * removed the namespace and updated variables for instance chart * added sleep 10min to verify the db2 instance * Reverted changes back instance yaml * update instance variables from values.yaml * Added delete operator and csv for db2wh * added delete CSV for DB2wsh * code cleanup * Trying with default values * added CSV delete * removed variables and trying with default values * added variable namespace * Added verify resources related to db2wh * fixed CSV variable * commented db2whservice which causes hang sometimes * Updated Readme to include finalizer and added db2wh service before CSV * updated readme * updated readme with instructions * format readme * added Operandregistry capability * added operand registry support * fixed cm * updates to chart name * updated db2u operator catalog Co-authored-by: bala sivasubramanian <bala@us.ibm.com>
- Loading branch information
Showing
40 changed files
with
1,000 additions
and
303 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,15 @@ | ||
name: Delete test gitops repo manually | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
confirm: | ||
description: 'Type "Delete" to confirm' | ||
required: true | ||
|
||
jobs: | ||
delete_repo: | ||
if: ${{ github.event.inputs.confirm == 'Delete' }} | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/manual-test-repo-delete.yaml@v1 | ||
secrets: | ||
GIT_ORG: ${{ secrets.GIT_ORG }} | ||
GIT_ADMIN_TOKEN: ${{ secrets.GIT_ADMIN_TOKEN }} |
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 |
---|---|---|
@@ -1,22 +1,11 @@ | ||
name: Notify | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
repo: | ||
- cloud-native-toolkit/ibm-garage-iteration-zero | ||
- cloud-native-toolkit/garage-terraform-modules | ||
|
||
steps: | ||
- name: Repository dispatch ${{ matrix.repo }} | ||
uses: cloud-native-toolkit/action-repository-dispatch@main | ||
with: | ||
notifyRepo: ${{ matrix.repo }} | ||
eventType: released | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/notify.yaml@v1 | ||
secrets: | ||
TOKEN: ${{ secrets.TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
name: Publish metadata | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publish-assets: | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/publish-metadata.yaml@v1 | ||
secrets: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,26 @@ | ||
name: Verify PR | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the main branch | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
verify: | ||
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip ci' ) }} | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/verify-gitops-module.yaml@v1 | ||
with: | ||
testcase: ocp4_latest_gitops_cp4d | ||
secrets: | ||
GIT_ORG: ${{ secrets.GIT_ORG }} | ||
AWS_CLUSTER_USERNAME: ${{ secrets.AWS_CLUSTER_USERNAME }} | ||
AWS_CLUSTER_PASSWORD: ${{ secrets.AWS_CLUSTER_PASSWORD }} | ||
IBMCLOUD_API_KEY: ${{ secrets.IBMCLOUD_API_KEY }} | ||
GIT_ADMIN_USERNAME: ${{ secrets.GIT_ADMIN_USERNAME }} | ||
GIT_ADMIN_TOKEN: ${{ secrets.GIT_ADMIN_TOKEN }} | ||
CP_ENTITLEMENT_KEY: ${{ secrets.CP_ENTITLEMENT_KEY }} | ||
|
||
verifyMetadata: | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/verify-module-metadata.yaml@v1 |
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 |
---|---|---|
@@ -1,114 +1,32 @@ | ||
name: Verify and release module | ||
name: Verify | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the main branch | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
verify: | ||
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip ci' ) }} | ||
runs-on: ubuntu-latest | ||
container: quay.io/ibmgaragecloud/cli-tools:v0.15 | ||
|
||
strategy: | ||
matrix: | ||
testcase: [ocp4_latest] | ||
# max-parallel: 1 | ||
fail-fast: false | ||
|
||
env: | ||
HOME: /home/devops | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- id: variables | ||
name: Set up variables | ||
env: | ||
GIT_ORG: ${{ secrets.GIT_ORG }} | ||
shell: bash | ||
run: | | ||
repo=$(echo ${GITHUB_REPOSITORY} | sed -E "s~.*/[^-]+-(.*)~\1~g") | ||
echo "Repo: $repo" | ||
echo "::set-output name=repo::$repo" | ||
org="${GIT_ORG:-cloud-native-toolkit-test}" | ||
echo "Org: $org" | ||
echo "::set-output name=org::$org" | ||
- name: Verify deploy on ${{ matrix.testcase }} | ||
uses: cloud-native-toolkit/action-module-verify-deploy@main | ||
with: | ||
clusterId: ${{ matrix.testcase }} | ||
validateDeployScript: .github/scripts/validate-deploy.sh | ||
env: | ||
TF_VAR_git_username: ${{ secrets.GIT_ADMIN_USERNAME }} | ||
TF_VAR_git_token: ${{ secrets.GIT_ADMIN_TOKEN }} | ||
TF_VAR_git_org: ${{ steps.variables.outputs.org }} | ||
TF_VAR_git_repo: ${{ steps.variables.outputs.repo }} | ||
TF_VAR_ibmcloud_api_key: ${{ secrets.IBMCLOUD_API_KEY }} | ||
IBMCLOUD_API_KEY: ${{ secrets.IBMCLOUD_API_KEY }} | ||
|
||
- name: Verify destroy on ${{ matrix.testcase }} | ||
uses: cloud-native-toolkit/action-module-verify-destroy@main | ||
if: ${{ always() }} | ||
with: | ||
clusterId: ${{ matrix.testcase }} | ||
env: | ||
TF_VAR_git_username: ${{ secrets.GIT_ADMIN_USERNAME }} | ||
TF_VAR_git_token: ${{ secrets.GIT_ADMIN_TOKEN }} | ||
TF_VAR_git_org: ${{ steps.variables.outputs.org }} | ||
TF_VAR_git_repo: ${{ steps.variables.outputs.repo }} | ||
TF_VAR_ibmcloud_api_key: ${{ secrets.IBMCLOUD_API_KEY }} | ||
IBMCLOUD_API_KEY: ${{ secrets.IBMCLOUD_API_KEY }} | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/verify-gitops-module.yaml@v1 | ||
with: | ||
testcase: ocp4_latest_gitops_cp4d | ||
secrets: | ||
GIT_ORG: ${{ secrets.GIT_ORG }} | ||
AWS_CLUSTER_USERNAME: ${{ secrets.AWS_CLUSTER_USERNAME }} | ||
AWS_CLUSTER_PASSWORD: ${{ secrets.AWS_CLUSTER_PASSWORD }} | ||
IBMCLOUD_API_KEY: ${{ secrets.IBMCLOUD_API_KEY }} | ||
GIT_ADMIN_USERNAME: ${{ secrets.GIT_ADMIN_USERNAME }} | ||
GIT_ADMIN_TOKEN: ${{ secrets.GIT_ADMIN_TOKEN }} | ||
CP_ENTITLEMENT_KEY: ${{ secrets.CP_ENTITLEMENT_KEY }} | ||
|
||
verifyMetadata: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DIST_DIR: ./dist | ||
PUBLISH_BRANCH: gh-pages | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '14' | ||
|
||
- name: Build catalog | ||
uses: cloud-native-toolkit/action-module-catalog@v1 | ||
with: | ||
tagName: ${{ github.event.release.tag_name }} | ||
distDir: ${{ env.DIST_DIR }} | ||
publishBranch: ${{ env.PUBLISH_BRANCH }} | ||
|
||
- name: Verify module schema | ||
run: | | ||
npm i -g ajv-cli | ||
curl -LsO https://modules.cloudnativetoolkit.dev/schemas/module.json | ||
ajv test -s module.json -d ${{ env.DIST_DIR }}/index.yaml --valid | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/verify-module-metadata.yaml@v1 | ||
|
||
release: | ||
needs: [verify, verifyMetadata] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' }} | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "main" | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
config-name: release-drafter.yaml | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
uses: cloud-native-toolkit/action-workflows/.github/workflows/release-module.yaml@v1 | ||
secrets: | ||
TOKEN: ${{ secrets.TOKEN }} |
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 |
---|---|---|
@@ -1,2 +1,14 @@ | ||
.idea/ | ||
*.iml | ||
|
||
.DS_store | ||
|
||
|
||
.terraform | ||
*.tfstate* | ||
/test/stages/module | ||
|
||
.tmp | ||
.kube | ||
bin2 | ||
test/stages/gitops |
Oops, something went wrong.