github actions for generating helm charts tester docker image #12
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: Execute Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- bin/gcloud/* | |
- internal/* | |
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: 20m | |
GO_TEST_FORMAT: json | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_BACKUP }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_BACKUP }} | |
AZURE_STORAGE_ACCOUNT_NAME: ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }} | |
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }} | |
GCP_SERVICE_ACCOUNT_CRED: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
BLOOM_LICENSE: ${{ secrets.BLOOM_LICENSE }} | |
NEO4J_DOCKER_BACKUP_IMG: "neo4j/helm-charts-backup:5.16.0" | |
NEO4J_REVERSE_PROXY_IMG: "neo4j/helm-charts-reverse-proxy:5.16.0" | |
NEO4J_DOCKER_IMG: "neo4j:5.16.0-enterprise" | |
IPS_USERNAME: ${{ secrets.IPS_USERNAME }} | |
IPS_EMAIL: ${{ secrets.IPS_EMAIL }} | |
jobs: | |
# gke-setup: | |
# name: Setup GKE | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# | |
# - name: Authenticate Service Account | |
# id: serviceAccount | |
# run: | | |
# CURRENT_DATE=$(date +'%Y-%m-%d-%s') | |
# echo "CLOUDSDK_CONTAINER_CLUSTER=ghactions-${CURRENT_DATE}" >> $GITHUB_ENV | |
# echo "CLOUDSDK_CONTAINER_CLUSTER=ghactions-${CURRENT_DATE}" >> $GITHUB_OUTPUT | |
# echo ${CLOUDSDK_CONTAINER_CLUSTER} > cluster_name.txt | |
# ./bin/gcloud/auth | |
# | |
## - name: Upload cluster name | |
## uses: actions/upload-artifact@v4 | |
## with: | |
## name: gke_cluster_name | |
## path: cluster_name.txt | |
# | |
# - name: Create GKE Cluster | |
# run: | | |
# ./bin/gcloud/create_cluster | |
# outputs: | |
# CLOUDSDK_CONTAINER_CLUSTER: ${{ steps.serviceAccount.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
# - name: Delete GKE Cluster | |
# run: | | |
# ./bin/gcloud/delete_cluster | |
run-enterprise-tests: | |
name: Execute enterprise tests | |
# needs: | |
# - gke-setup | |
runs-on: ubuntu-latest | |
env: | |
NEO4J_EDITION: enterprise | |
container: | |
image: neo4jbuildservice/helm-charts-tester:githubactions | |
credentials: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# - name: Download math result for job 1 | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: gke_cluster_name | |
- id: 'gcloud-auth' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | |
# - name: Get Cluster Name | |
# run: | | |
# CLOUDSDK_CONTAINER_CLUSTER=$(cat "cluster_name.txt") | |
# echo ${CLOUDSDK_CONTAINER_CLUSTER} >> $GITHUB_ENV | |
- id: 'get-credentials' | |
uses: 'google-github-actions/get-gke-credentials@v2' | |
with: | |
# cluster_name: ${{ needs.gke-setup.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
cluster_name: "ghactions-2024-02-22-1708616384" | |
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 Integration tests | |
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) | |
./bin/run-go-tests | |
# gke-delete: | |
# name: Delete GKE Cluster | |
# runs-on: ubuntu-latest | |
# needs: | |
# - gke-setup | |
# steps: | |
# - name: Delete GKE Cluster | |
# if: always() | |
# run: | | |
# CLOUDSDK_CONTAINER_CLUSTER: ${{ steps.serviceAccount.outputs.CLOUDSDK_CONTAINER_CLUSTER }} | |
# ./bin/gcloud/delete_cluster |