-
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.
Merge pull request #7 from SCT-Engineering/mcmCluster
add module release process
- Loading branch information
Showing
23 changed files
with
867 additions
and
244 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Terraform CI/CD | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: | ||
| - main | ||
| jobs: | ||
| terraform-ci-cd: | ||
| runs-on: 229685449397 | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: CSVD/gh-actions-checkout@v4 | ||
|
|
||
| - name: Setup Terraform | ||
| uses: CSVD/gh-actions-setup-terraform@v3 | ||
| with: | ||
| terraform_version: "1.9.1" | ||
|
|
||
| - name: Setup GITHUB Credentials | ||
| id: github_credentials | ||
| uses: CSVD/gh-auth@main | ||
| with: | ||
| github_app_pem_file: ${{ secrets.GH_APP_PEM_FILE }} | ||
| github_app_installation_id: ${{ vars.GH_APP_INSTALLATION_ID }} | ||
| github_app_id: ${{ vars.GH_APP_ID }} | ||
|
|
||
|
|
||
| - name: Debug Authentication | ||
| run: | | ||
| # Print the GitHub server URL | ||
| echo "GitHub Server URL: ${{ github.server_url }}" | ||
| # Extract the host from the URL | ||
| HOST="${{ github.server_url }}" | ||
| HOST="${HOST#*//}" | ||
| HOST="${HOST%%/*}" | ||
| echo "GitHub Host: $HOST" | ||
| # Check if token exists | ||
| if [[ -n "${{ steps.github_credentials.outputs.github_token }}" ]]; then | ||
| echo "Token generated successfully" | ||
| # Test the token with a simple GitHub API call (without exposing the token) | ||
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ steps.github_credentials.outputs.github_token }}" "${{ github.server_url }}/api/v3/user") | ||
| echo "API Test Status Code: $STATUS" | ||
| else | ||
| echo "No token was generated!" | ||
| fi | ||
| - name: Setup GitHub CLI | ||
| run: | | ||
| # Force manual authentication since setup-git might not work with GitHub Enterprise | ||
| echo "${{ steps.github_credentials.outputs.github_token }}" > /tmp/token.txt | ||
| gh auth login --with-token --hostname "github.e.it.census.gov" < /tmp/token.txt | ||
| rm /tmp/token.txt | ||
| # Test GitHub CLI auth status | ||
| gh auth status || echo "GitHub CLI authentication failed" | ||
| - name: AWS Auth | ||
| id: aws_auth | ||
| uses: CSVD/aws-auth@main | ||
| with: | ||
| ecs: true | ||
|
|
||
| - name: Run Terraform Module Release Action | ||
| uses: CSVD/terraform-module-release@main | ||
| with: | ||
| github-token: ${{ steps.github_credentials.outputs.github_token }} | ||
| working-directory: '.' |
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,42 @@ | ||
| name: Terraform Validate | ||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
|
|
||
| terraform-validate: | ||
| runs-on: "229685449397" | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: CSVD/gh-actions-checkout@v4 | ||
|
|
||
| - name: Setup Terraform | ||
| uses: CSVD/gh-actions-setup-terraform@v2 | ||
| with: | ||
| terraform_version: '1.7.3' | ||
|
|
||
| - name: Validate Terraform Configuration | ||
| id: validate | ||
| uses: CSVD/terraform-validate@main | ||
|
|
||
| - name: Check Validation/Test Results | ||
| if: always() | ||
| run: | | ||
| # Set default values if outputs are empty | ||
| IS_VALID="${{ steps.validate.outputs.is_valid }}" | ||
| TESTS_PASSED="${{ steps.validate.outputs.tests_passed }}" | ||
| # If outputs are empty, set them to false | ||
| [ -z "$IS_VALID" ] && IS_VALID="false" | ||
| [ -z "$TESTS_PASSED" ] && TESTS_PASSED="false" | ||
| if [[ "$IS_VALID" != "true" || "$TESTS_PASSED" != "true" ]]; then | ||
| echo "Validation or test errors found:" | ||
| echo "${{ steps.validate.outputs.stderr }}" | ||
| exit 1 | ||
| else | ||
| echo "All validations and tests passed successfully!" | ||
| fi |
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
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
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,20 @@ | ||
| apiVersion: v2 | ||
| appVersion: v2.7.1 | ||
| description: Kiali is an open source project for service mesh observability, refer | ||
| to https://www.kiali.io for details. | ||
| home: https://github.com/kiali/kiali-operator | ||
| icon: https://raw.githubusercontent.com/kiali/kiali.io/current/assets/icons/logo.svg | ||
| keywords: | ||
| - istio | ||
| - kiali | ||
| - operator | ||
| maintainers: | ||
| - email: kiali-users@googlegroups.com | ||
| name: Kiali | ||
| url: https://kiali.io | ||
| name: kiali-operator | ||
| sources: | ||
| - https://github.com/kiali/kiali | ||
| - https://github.com/kiali/kiali-operator | ||
| - https://github.com/kiali/helm-charts | ||
| version: 2.7.1 |
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,24 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: kialis.kiali.io | ||
| spec: | ||
| group: kiali.io | ||
| names: | ||
| kind: Kiali | ||
| listKind: KialiList | ||
| plural: kialis | ||
| singular: kiali | ||
| scope: Namespaced | ||
| versions: | ||
| - name: v1alpha1 | ||
| served: true | ||
| storage: true | ||
| subresources: | ||
| status: {} | ||
| schema: | ||
| openAPIV3Schema: | ||
| type: object | ||
| x-kubernetes-preserve-unknown-fields: true | ||
| ... |
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,30 @@ | ||
| Welcome to Kiali! For more details on Kiali, see: https://kiali.io | ||
|
|
||
| The Kiali Operator [{{ .Chart.AppVersion }}] has been installed in namespace [{{ .Release.Namespace }}]. It will be ready soon. | ||
|
|
||
| {{- if .Values.cr.create }} | ||
| {{- if or (and (not .Values.watchNamespace) (not .Values.cr.namespace)) (and (.Values.watchNamespace) (eq .Values.watchNamespace .Release.Namespace)) (and (.Values.cr.namespace) (eq .Values.cr.namespace .Release.Namespace)) }} | ||
| You have elected to install a Kiali CR in the same namespace as the operator [{{ .Release.Namespace }}]. You should be able to access Kiali soon. | ||
|
|
||
| ================================ | ||
| PLEASE READ THIS WARNING NOTICE: | ||
| Because the Kiali CR lives in the same namespace as the operator, DO NOT uninstall the operator or delete the operator namespace without first removing the Kiali CR. If you do not follow this advice then the Kiali Operator deletion will hang indefinitely until you remove the finalizer from the Kiali CR, and then you may find your Kubernetes environment still has Kiali Server remnants left behind. | ||
| ================================ | ||
| {{- else if .Values.watchNamespace }} | ||
| You have elected to install a Kiali CR in the operator watch namespace [{{ .Values.watchNamespace }}]. You should be able to access Kiali soon. | ||
| {{- else if .Values.cr.namespace }} | ||
| You have elected to install a Kiali CR in the namespace [{{ .Values.cr.namespace }}]. You should be able to access Kiali soon. | ||
| {{- else }} | ||
| You have elected to install a Kiali CR. You should be able to access Kiali soon. | ||
| {{- end }} | ||
| {{- else }} | ||
| {{- if (not .Values.watchNamespace) }} | ||
| You have elected not to install a Kiali CR. You must first install a Kiali CR before you can access Kiali. The operator is watching all namespaces, so you can create the Kiali CR anywhere. | ||
| {{- else }} | ||
| You have elected not to install a Kiali CR. You must first install a Kiali CR in the operator watch namespace [{{ .Values.watchNamespace }}] before you can access Kiali. | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| If you ever want to uninstall the Kiali Operator, remember to delete the Kiali CR first before uninstalling the operator to give the operator a chance to uninstall and remove all the Kiali Server resources. | ||
|
|
||
| (Helm: Chart=[{{ .Chart.Name }}], Release=[{{ .Release.Name }}], Version=[{{ .Chart.Version }}]) |
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
Oops, something went wrong.