LPD-84510 Add integration test #54
This file contains hidden or 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
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| publish-aws: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| needs: publish-default | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-aws | |
| registry: us-central1-docker.pkg.dev/liferay-artifact-registry/liferay-helm-chart | |
| working_directory: ./cloud/helm/aws | |
| publish-aws-infrastructure: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-aws-infrastructure | |
| registry: us-central1-docker.pkg.dev/external-assets-prd/liferay-helm-chart | |
| working_directory: ./cloud/helm/aws-infrastructure | |
| publish-aws-infrastructure-provider: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-aws-infrastructure-provider | |
| registry: us-central1-docker.pkg.dev/external-assets-prd/liferay-helm-chart | |
| working_directory: ./cloud/helm/aws-infrastructure-provider | |
| publish-aws-marketplace: | |
| env: | |
| ECR_REGISTRY: 709825985650.dkr.ecr.us-east-1.amazonaws.com | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| needs: publish-aws | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v5.1.0 | |
| with: | |
| aws-region: us-east-1 | |
| role-session-name: GitHubActions | |
| role-to-assume: arn:aws:iam::831926597587:role/GitHubActionsRole | |
| - name: Log in to ECR | |
| run: | | |
| aws ecr get-login-password --region us-east-1 \ | |
| | helm registry login "${ECR_REGISTRY}" \ | |
| --password-stdin \ | |
| --username AWS | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - env: | |
| GITHUB_TOKEN: ${{github.token}} | |
| id: verify_version | |
| name: Verify Helm chart version | |
| run: | | |
| set -e | |
| CHART_VERSION=$(cat ./Chart.yaml | yq .version) | |
| echo "Verifying Helm chart version ${CHART_VERSION}." | |
| if ! helm show readme "oci://${ECR_REGISTRY}/liferay/liferay-aws-marketplace:${CHART_VERSION}" >/dev/null 2>&1 | |
| then | |
| echo "Verified Helm Chart version ${CHART_VERSION}." | |
| echo "CHART_VERSION=${CHART_VERSION}" >> ${GITHUB_ENV} | |
| echo "should_publish=true" >> ${GITHUB_OUTPUT} | |
| else | |
| echo "Chart version ${CHART_VERSION} already exists. Skipping publish." | |
| fi | |
| working-directory: ./cloud/helm/aws-marketplace | |
| - if: ${{steps.verify_version.outputs.should_publish == 'true'}} | |
| name: Package and push Helm chart | |
| run: | | |
| set -e | |
| DIST_DIR="${{runner.temp}}/aws-marketplace/dist" | |
| rm -fr "${DIST_DIR}" | |
| mkdir --parents "${DIST_DIR}" | |
| helm dependency update | |
| helm package . \ | |
| --destination "${DIST_DIR}" \ | |
| --version "${CHART_VERSION}" | |
| for file_name in "${DIST_DIR}"/*.tgz | |
| do | |
| echo "Pushing ${file_name}." | |
| helm push "${file_name}" "oci://${ECR_REGISTRY}/liferay" | |
| done | |
| working-directory: ./cloud/helm/aws-marketplace | |
| publish-default: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-default | |
| registry: us-central1-docker.pkg.dev/liferay-artifact-registry/liferay-helm-chart | |
| working_directory: ./cloud/helm/default | |
| publish-gcp: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| needs: publish-default | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-gcp | |
| registry: us-central1-docker.pkg.dev/liferay-artifact-registry/liferay-helm-chart | |
| working_directory: ./cloud/helm/gcp | |
| publish-gcp-infrastructure: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-gcp-infrastructure | |
| registry: us-central1-docker.pkg.dev/external-assets-prd/liferay-helm-chart | |
| working_directory: ./cloud/helm/gcp-infrastructure | |
| publish-gcp-infrastructure-provider: | |
| if: ${{github.repository == 'liferay/liferay-portal'}} | |
| secrets: inherit | |
| uses: ./.github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| with: | |
| chart_name: liferay-gcp-infrastructure-provider | |
| registry: us-central1-docker.pkg.dev/external-assets-prd/liferay-helm-chart | |
| working_directory: ./cloud/helm/gcp-infrastructure-provider | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - .github/workflows/ci-publish-cloud-helm-charts.yaml | |
| - .github/workflows/ci-reusable-publish-helm-chart-to-gar.yaml | |
| - cloud/helm/** | |
| permissions: | |
| id-token: write |