Add the option to define container resources on the deployment of the reverseProxy #697
Workflow file for this run
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
| name: Execute Tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| HELM_CHART_VERSION: | |
| description: 'Helm chart version to be released (e.g., 2025.4.0)' | |
| type: string | |
| DOCKER_IMAGE_VERSION: | |
| description: 'Docker image version/Neo4j version to use (e.g., 2025.04.0)' | |
| type: string | |
| RELEASE: | |
| description: 'Release (True) or execute only tests (False)' | |
| type: boolean | |
| default: false | |
| pull_request: | |
| paths-ignore: | |
| - build/* | |
| branches: | |
| - dev | |
| env: | |
| GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| CLOUDSDK_CORE_PROJECT: ${{ secrets.CLOUDSDK_CORE_PROJECT }} | |
| CLOUDSDK_COMPUTE_ZONE: "europe-west2-b" | |
| CLOUDSDK_COMPUTE_REGION: "europe-west2" | |
| GO_TEST_COUNT: 1 | |
| GO_TEST_TIMEOUT: 29m | |
| GO_TEST_FORMAT: json | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} | |
| AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} | |
| AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
| AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
| GCP_SERVICE_ACCOUNT_CRED: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| BLOOM_LICENSE: ${{ secrets.BLOOM_LICENSE }} | |
| IPS_USERNAME: ${{ secrets.IPS_USERNAME }} | |
| IPS_EMAIL: ${{ secrets.IPS_EMAIL }} | |
| RESOURCE_PREFIX: ghactions | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| check-pr: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_run: ${{ steps.check.outputs.should_run }} | |
| steps: | |
| - id: check | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.actor }}" == "bfeshti" || "${{ github.actor }}" == "riggi-alekaj" ]]; then | |
| echo "should_run=true" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.actor }}" == "bfeshti" || "${{ github.actor }}" == "riggi-alekaj" ]]; then | |
| echo "should_run=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "should_run=false" >> $GITHUB_OUTPUT | |
| fi | |
| cleanup: | |
| needs: check-pr | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| name: Cleanup Dangling Resources | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Authenticate Service Account | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Run Cleanup | |
| run: ./bin/gcloud/cleanup_resources | |
| gke-setup: | |
| name: Debian GKE Creation | |
| needs: [cleanup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Authenticate Service Account | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - name: Create GKE Cluster | |
| run: | | |
| export CLOUDSDK_CONTAINER_CLUSTER=${RESOURCE_PREFIX}-${RUN_ID} | |
| ./bin/gcloud/create_cluster | |
| outputs: | |
| CLOUDSDK_CONTAINER_CLUSTER: "${{ env.RESOURCE_PREFIX }}-${{ env.RUN_ID }}" | |
| gke-setup-redhat: | |
| name: RedHat GKE Creation | |
| needs: [cleanup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Authenticate Service Account | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - name: Create GKE Cluster | |
| run: | | |
| export CLOUDSDK_CONTAINER_CLUSTER=${RESOURCE_PREFIX}-redhat-${RUN_ID} | |
| ./bin/gcloud/create_cluster | |
| outputs: | |
| CLOUDSDK_CONTAINER_CLUSTER_REDHAT: "${{ env.RESOURCE_PREFIX }}-redhat-${{ env.RUN_ID }}" | |
| build-reverseproxy-backup: | |
| name: ReverseProxy and Backup Docker Image build | |
| needs: [cleanup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: europe-west2-docker.pkg.dev | |
| username: _json_key | |
| password: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| - name: Build and push reverse proxy image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: "{{defaultContext}}:neo4j-reverse-proxy" | |
| push: true | |
| tags: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/reverseproxy:${{ env.RUN_ID }}" | |
| provenance: false | |
| - name: Build and push neo4j operations image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: "{{defaultContext}}:neo4j/neo4j-operations" | |
| push: true | |
| tags: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-operations:${{ env.RUN_ID }}" | |
| provenance: false | |
| - name: Build and push backup image | |
| uses: docker/build-push-action@v5 | |
| if: ${{ !inputs.RELEASE }} | |
| with: | |
| context: "{{defaultContext}}:neo4j-admin" | |
| push: true | |
| tags: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:${{ env.RUN_ID }}" | |
| provenance: false | |
| build-args: | | |
| IMAGE=${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j:2025-enterprise-debian-nightly-bundle | |
| DISTRIBUTION=debian | |
| - name: Build and push red hat backup image | |
| uses: docker/build-push-action@v5 | |
| if: ${{ !inputs.RELEASE }} | |
| with: | |
| context: "{{defaultContext}}:neo4j-admin" | |
| push: true | |
| tags: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:ubi9-${{ env.RUN_ID }}" | |
| provenance: false | |
| build-args: | | |
| IMAGE=${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j:2025-enterprise-redhat-nightly-bundle | |
| DISTRIBUTION=redhat | |
| - name: Build and push backup image | |
| uses: docker/build-push-action@v5 | |
| if: ${{ inputs.RELEASE }} | |
| with: | |
| context: "{{defaultContext}}:neo4j-admin" | |
| push: true | |
| tags: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:${{ env.RUN_ID }}" | |
| provenance: false | |
| build-args: | | |
| IMAGE=neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}-enterprise | |
| DISTRIBUTION=debian | |
| - name: Build and push red hat backup image | |
| uses: docker/build-push-action@v5 | |
| if: ${{ inputs.RELEASE }} | |
| with: | |
| context: "{{defaultContext}}:neo4j-admin" | |
| push: true | |
| tags: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:ubi9-${{ env.RUN_ID }}" | |
| provenance: false | |
| build-args: | | |
| IMAGE=neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}-enterprise-ubi9 | |
| DISTRIBUTION=redhat | |
| run-enterprise-tests: | |
| name: Debian Enterprise tests | |
| needs: [gke-setup, build-reverseproxy-backup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| NEO4J_EDITION: "enterprise" | |
| CLOUDSDK_CONTAINER_CLUSTER: ${{ needs.gke-setup.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
| NEO4J_DOCKER_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j:2025-enterprise-debian-nightly-bundle" | |
| NEO4J_REVERSE_PROXY_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/reverseproxy:${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_DOCKER_BACKUP_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_OPERATIONS_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-operations:${{ github.run_id }}-${{ github.run_attempt }}" | |
| container: | |
| image: ${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/githubactions:latest | |
| credentials: | |
| username: _json_key | |
| password: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: 'gcloud-auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - id: 'get-credentials' | |
| uses: 'google-github-actions/get-gke-credentials@v2' | |
| with: | |
| cluster_name: ${{ needs.gke-setup.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
| location: ${{ env.CLOUDSDK_COMPUTE_ZONE }} | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Set up gotestfmt | |
| run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
| - name: Run Enterprise Integration and Unit tests | |
| run: | | |
| mkdir -p .kube | |
| cat ${KUBECONFIG} > .kube/config | |
| CURRENT_DIRECTORY=$(pwd) | |
| export KUBECONFIG="${CURRENT_DIRECTORY}/.kube/config" | |
| export IPS_PASS=$(gcloud auth print-access-token) | |
| #inputs.RELEASE does not hold value when workflow_dispatch is not called | |
| ISRELEASE=${{ inputs.RELEASE }} | |
| if [[ ${#ISRELEASE} != 0 ]]; then | |
| export NEO4J_DOCKER_IMG="neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}-enterprise" | |
| fi | |
| echo "NEO4J_DOCKER_IMG=${NEO4J_DOCKER_IMG}" | |
| echo "printing kubeconfig path $KUBECONFIG" | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/integration_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/unit_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| run-community-tests: | |
| name: Debian Community Tests | |
| needs: [gke-setup, build-reverseproxy-backup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| NEO4J_EDITION: "community" | |
| CLOUDSDK_CONTAINER_CLUSTER: ${{ needs.gke-setup.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
| NEO4J_DOCKER_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j:2025-community-debian-nightly-bundle" | |
| NEO4J_REVERSE_PROXY_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/reverseproxy:${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_DOCKER_BACKUP_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_OPERATIONS_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-operations:${{ github.run_id }}-${{ github.run_attempt }}" | |
| container: | |
| image: ${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/githubactions:latest | |
| credentials: | |
| username: _json_key | |
| password: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: 'gcloud-auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - id: 'get-credentials' | |
| uses: 'google-github-actions/get-gke-credentials@v2' | |
| with: | |
| cluster_name: ${{ needs.gke-setup.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
| location: ${{ env.CLOUDSDK_COMPUTE_ZONE }} | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Set up gotestfmt | |
| run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
| - name: Run Community Integration and Unit tests | |
| run: | | |
| mkdir -p .kube | |
| cat ${KUBECONFIG} > .kube/config | |
| CURRENT_DIRECTORY=$(pwd) | |
| export KUBECONFIG="${CURRENT_DIRECTORY}/.kube/config" | |
| export IPS_PASS=$(gcloud auth print-access-token) | |
| #inputs.RELEASE does not hold value when workflow_dispatch is not called | |
| ISRELEASE=${{ inputs.RELEASE }} | |
| if [[ ${#ISRELEASE} != 0 ]]; then | |
| export NEO4J_DOCKER_IMG="neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}" | |
| fi | |
| echo "NEO4J_DOCKER_IMG=${NEO4J_DOCKER_IMG}" | |
| echo "printing kubeconfig path $KUBECONFIG" | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/integration_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/unit_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| run-enterprise-tests-redhat: | |
| name: RedHat Enterprise Tests | |
| needs: [gke-setup-redhat, build-reverseproxy-backup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| NEO4J_EDITION: "enterprise" | |
| CLOUDSDK_CONTAINER_CLUSTER: ${{ needs.gke-setup-redhat.outputs.CLOUDSDK_CONTAINER_CLUSTER_REDHAT }} | |
| NEO4J_DOCKER_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j:2025-enterprise-redhat-nightly-bundle" | |
| NEO4J_REVERSE_PROXY_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/reverseproxy:${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_DOCKER_BACKUP_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:ubi9-${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_OPERATIONS_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-operations:${{ github.run_id }}-${{ github.run_attempt }}" | |
| container: | |
| image: ${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/githubactions:latest | |
| credentials: | |
| username: _json_key | |
| password: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: 'gcloud-auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - id: 'get-credentials' | |
| uses: 'google-github-actions/get-gke-credentials@v2' | |
| with: | |
| cluster_name: ${{ env.CLOUDSDK_CONTAINER_CLUSTER }} | |
| location: ${{ env.CLOUDSDK_COMPUTE_ZONE }} | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Set up gotestfmt | |
| run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
| - name: Run Enterprise Integration and Unit tests for Red Hat | |
| run: | | |
| mkdir -p .kube | |
| cat ${KUBECONFIG} > .kube/config | |
| CURRENT_DIRECTORY=$(pwd) | |
| export KUBECONFIG="${CURRENT_DIRECTORY}/.kube/config" | |
| echo "printing kubeconfig path $KUBECONFIG" | |
| export IPS_PASS=$(gcloud auth print-access-token) | |
| #inputs.RELEASE does not hold value when workflow_dispatch is not called | |
| ISRELEASE=${{ inputs.RELEASE }} | |
| if [[ ${#ISRELEASE} != 0 ]]; then | |
| export NEO4J_DOCKER_IMG="neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}-enterprise" | |
| fi | |
| echo "NEO4J_DOCKER_IMG=${NEO4J_DOCKER_IMG}" | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/integration_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/unit_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| run-community-tests-redhat: | |
| name: RedHat Community Tests | |
| needs: [gke-setup-redhat, build-reverseproxy-backup, check-pr] | |
| if: needs.check-pr.outputs.should_run == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
| NEO4J_EDITION: "community" | |
| CLOUDSDK_CONTAINER_CLUSTER: ${{ needs.gke-setup-redhat.outputs.CLOUDSDK_CONTAINER_CLUSTER_REDHAT }} | |
| NEO4J_DOCKER_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j:2025-community-redhat-nightly-bundle" | |
| NEO4J_REVERSE_PROXY_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/reverseproxy:${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_DOCKER_BACKUP_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-admin:ubi9-${{ github.run_id }}-${{ github.run_attempt }}" | |
| NEO4J_OPERATIONS_IMG: "${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/neo4j-operations:${{ github.run_id }}-${{ github.run_attempt }}" | |
| container: | |
| image: ${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/githubactions:latest | |
| credentials: | |
| username: _json_key | |
| password: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: 'gcloud-auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - id: 'get-credentials' | |
| uses: 'google-github-actions/get-gke-credentials@v2' | |
| with: | |
| cluster_name: ${{ env.CLOUDSDK_CONTAINER_CLUSTER }} | |
| location: ${{ env.CLOUDSDK_COMPUTE_ZONE }} | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Set up gotestfmt | |
| run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
| - name: Run Community Integration and Unit tests for Red Hat | |
| run: | | |
| mkdir -p .kube | |
| cat ${KUBECONFIG} > .kube/config | |
| CURRENT_DIRECTORY=$(pwd) | |
| export KUBECONFIG="${CURRENT_DIRECTORY}/.kube/config" | |
| echo "printing kubeconfig path $KUBECONFIG" | |
| export IPS_PASS=$(gcloud auth print-access-token) | |
| #inputs.RELEASE does not hold value when workflow_dispatch is not called | |
| ISRELEASE=${{ inputs.RELEASE }} | |
| if [[ ${#ISRELEASE} != 0 ]]; then | |
| export NEO4J_DOCKER_IMG="neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}" | |
| fi | |
| echo "NEO4J_DOCKER_IMG=${NEO4J_DOCKER_IMG}" | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/integration_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| go test -json -v -timeout ${GO_TEST_TIMEOUT} ./internal/unit_tests/ 2>&1 | tee /tmp/gotest.log | gotestfmt | |
| gke-delete: | |
| name: Debian GKE Cluster Deletion | |
| runs-on: ubuntu-latest | |
| if: always() && needs.check-pr.outputs.should_run == 'true' | |
| env: | |
| CLOUDSDK_CONTAINER_CLUSTER: ${{ needs.gke-setup.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
| needs: | |
| - run-enterprise-tests | |
| - run-community-tests | |
| - gke-setup | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: 'gcloud-auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Delete GKE Cluster | |
| run: | | |
| ./bin/gcloud/delete_cluster | |
| gke-delete-redhat: | |
| name: RedHat GKE Cluster Deletion | |
| runs-on: ubuntu-latest | |
| if: always() && needs.check-pr.outputs.should_run == 'true' | |
| env: | |
| CLOUDSDK_CONTAINER_CLUSTER: ${{ needs.gke-setup-redhat.outputs.CLOUDSDK_CONTAINER_CLUSTER_REDHAT }} | |
| needs: | |
| - run-enterprise-tests-redhat | |
| - run-community-tests-redhat | |
| - gke-setup-redhat | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: 'gcloud-auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| version: '>= 363.0.0' | |
| - name: Delete GKE Cluster | |
| run: | | |
| ./bin/gcloud/delete_cluster | |
| build-reverseproxy-backup-release-image: | |
| name: ReverseProxy and Backup Docker Image build | |
| needs: [run-community-tests, run-community-tests-redhat, run-enterprise-tests, run-enterprise-tests-redhat, check-pr] | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.RELEASE && github.ref_name == 'dev' && success() && github.event_name == 'workflow_dispatch' && (github.actor == 'bfeshti' || github.actor == 'riggi-alekaj') && needs.check-pr.outputs.should_run == 'true' }} | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push reverse proxy image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: "{{defaultContext}}:neo4j-reverse-proxy" | |
| push: true | |
| tags: "neo4j/helm-charts-reverse-proxy:${{ inputs.DOCKER_IMAGE_VERSION }}" | |
| provenance: false | |
| - name: Build and push operations image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: "{{defaultContext}}:neo4j/neo4j-operations" | |
| push: true | |
| tags: "neo4j/helm-charts-operations:${{ inputs.DOCKER_IMAGE_VERSION }}" | |
| provenance: false | |
| - name: Build and push backup image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: "{{defaultContext}}:neo4j-admin" | |
| push: true | |
| tags: "neo4j/helm-charts-backup:${{ inputs.HELM_CHART_VERSION }}" | |
| provenance: false | |
| build-args: | | |
| IMAGE=neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}-enterprise | |
| DISTRIBUTION=debian | |
| - name: Build and push red hat backup image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: "{{defaultContext}}:neo4j-admin" | |
| push: true | |
| tags: "neo4j/helm-charts-backup:${{ inputs.HELM_CHART_VERSION }}-ubi9" | |
| provenance: false | |
| build-args: | | |
| IMAGE=neo4j:${{ inputs.DOCKER_IMAGE_VERSION }}-enterprise-ubi9 | |
| DISTRIBUTION=redhat | |
| packaging: | |
| name: Packaging and Release | |
| needs: [run-community-tests, run-community-tests-redhat, run-enterprise-tests, run-enterprise-tests-redhat, build-reverseproxy-backup-release-image, check-pr] | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.RELEASE && github.ref_name == 'dev' && success() && github.event_name == 'workflow_dispatch' && (github.actor == 'bfeshti' || github.actor == 'riggi-alekaj') && needs.check-pr.outputs.should_run == 'true' }} | |
| env: | |
| HELM_CHART_VERSION: ${{ inputs.HELM_CHART_VERSION }} | |
| DOCKER_IMAGE_VERSION: ${{ inputs.DOCKER_IMAGE_VERSION }} | |
| HELM_REPO_NAME: ${{ vars.HELM_REPO_NAME }} | |
| container: | |
| image: ${{ vars.ARTIFACT_REGISTRY_REPO_NAME }}/githubactions:latest | |
| options: --user 1001 | |
| credentials: | |
| username: _json_key | |
| password: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: '0' | |
| fetch-tags: true | |
| token: ${{ secrets.GH_TOKEN }} | |
| ref: dev | |
| - name: Version Updates | |
| run: | | |
| git config --global user.email team-smcs@neo4j.com | |
| git config --global user.name "team-smcs" | |
| ./bin/gcloud/version_updates | |
| - name: GPG Key Signing | |
| run: | | |
| export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID_GPG }} | |
| export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY_GPG }} | |
| export ROLE_ARN_GPG=${{ secrets.ROLE_ARN_GPG }} | |
| export SECRET_ID_GPG=${{ secrets.SECRET_ID_GPG }} | |
| ./bin/gcloud/gpg_signing | |
| - name: Upload Helm Charts | |
| run: | | |
| export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID_HELM }} | |
| export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY_HELM }} | |
| export AWS_REGION="us-east-1" | |
| export PACKAGE_SIGNING_KEY=${{ secrets.PACKAGE_SIGNING_KEY }} | |
| export PACKAGE_SIGNING_PASSPHRASE=${{ secrets.PACKAGE_SIGNING_PASSPHRASE }} | |
| ./bin/gcloud/package_upload | |
| - name: Update index.yaml | |
| run: | | |
| ./bin/gcloud/index_yaml_update | |
| - name: Set Chart Version | |
| id: chart_version | |
| run: | | |
| echo "CHART_VERSION=${HELM_CHART_VERSION}" >> $GITHUB_OUTPUT | |
| echo "Using chart version ${HELM_CHART_VERSION} for release" | |
| - name: Set Release Notes URL | |
| id: release_notes | |
| run: | | |
| RELEASE_NOTES_SUFFIX=$(echo ${DOCKER_IMAGE_VERSION} | sed -E 's/([0-9]{4})\.([0-9]{2})\.[0-9]+/\1-\2/') | |
| echo "RELEASE_NOTES_SUFFIX=${RELEASE_NOTES_SUFFIX}" >> $GITHUB_OUTPUT | |
| echo "Release notes suffix: ${RELEASE_NOTES_SUFFIX}" | |
| - name: Release Notes | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: v${{ steps.chart_version.outputs.CHART_VERSION }} | |
| tag_name: ${{ steps.chart_version.outputs.CHART_VERSION }} | |
| token: ${{ secrets.GH_TOKEN }} | |
| body: | | |
| - Update to Neo4j ${{ inputs.DOCKER_IMAGE_VERSION }} as the new baseline | |
| - Helm Chart Version: ${{ inputs.HELM_CHART_VERSION }} | |
| - Docker Image Version: ${{ inputs.DOCKER_IMAGE_VERSION }} | |
| - See [Release notes](https://neo4j.com/release-notes/database/neo4j-${{ steps.release_notes.outputs.RELEASE_NOTES_SUFFIX }}/) for details of changes | |
| make_latest: true | |
| files: | | |
| tmp/new-packages/*.tgz |