diff --git a/.github/workflows/community.yml b/.github/workflows/community.yml index 67d91b4..f7200d1 100644 --- a/.github/workflows/community.yml +++ b/.github/workflows/community.yml @@ -6,6 +6,7 @@ on: paths: - marketplace/neo4j-community/** - scripts/neo4j-community/** + - .github/** branches: - main @@ -30,7 +31,12 @@ jobs: DATE=`echo $(date '+%Y%m%d-%S-%2N')` RGNAME=`echo ghactions-rg-$DATE` DEPNAME=`echo ghactions-dep-$DATE` + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/` + if ${{ github.event_name == 'workflow_dispatch' }}; then + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/` + fi echo "rgName=$RGNAME" >> $GITHUB_OUTPUT + echo "artifactsLocation=$ARTIFACTS_LOCATION" >> $GITHUB_OUTPUT echo "depName=$DEPNAME" >> $GITHUB_OUTPUT echo "Resource Group name: $RGNAME" echo "Deployment name: $DEPNAME" @@ -43,7 +49,7 @@ jobs: #!/bin/bash az group create --name ${{ steps.variables.outputs.rgName }} --location ${{ env.ResourceGroupLocation }} echo "Azure resource group created" - echo "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + echo "Artifacts Location = ${{ steps.variables.outputs.artifactsLocation }}" - name: Deploy ARM Template (Neo4j Standalone v5) id: deployARM @@ -51,7 +57,7 @@ jobs: with: resourceGroupName: ${{ steps.variables.outputs.rgName }} template: ./marketplace/neo4j-community/mainTemplate.json - parameters: ./marketplace/neo4j-community/parameters.json _artifactsLocation="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + parameters: ./marketplace/neo4j-community/parameters.json _artifactsLocation=${{ steps.variables.outputs.artifactsLocation }} deploymentName: ${{ steps.variables.outputs.depName }} - name: Execute tests @@ -60,7 +66,7 @@ jobs: PASSWORD=$(cat ./marketplace/neo4j-community/parameters.json | jq .adminPassword.value | sed 's/"//g') curl -LJO https://github.com/neo4j/neo4jtester/raw/main/build/neo4jtester_linux chmod +x ./neo4jtester_linux - ./neo4jtester_linux "${URI}" "neo4j" "${PASSWORD}" + ./neo4jtester_linux "${URI}" "neo4j" "${PASSWORD}" "Community" - name: Delete Resource Group if: always() diff --git a/.github/workflows/enterprise.yml b/.github/workflows/enterprise.yml index 8e4787f..33995b5 100644 --- a/.github/workflows/enterprise.yml +++ b/.github/workflows/enterprise.yml @@ -6,6 +6,7 @@ on: paths: - marketplace/neo4j-enterprise/** - scripts/neo4j-enterprise/** + - .github/** branches: - main @@ -96,7 +97,12 @@ jobs: DATE=`echo $(date '+%Y%m%d-%S-%2N')` RGNAME=`echo ghactions-rg-$DATE` DEPNAME=`echo ghactions-dep-$DATE` + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/` + if ${{ github.event_name == 'workflow_dispatch' }}; then + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/` + fi echo "rgName=$RGNAME" >> $GITHUB_OUTPUT + echo "artifactsLocation=$ARTIFACTS_LOCATION" >> $GITHUB_OUTPUT echo "depName=$DEPNAME" >> $GITHUB_OUTPUT echo "Resource Group name: $RGNAME" echo "Deployment name: $DEPNAME" @@ -109,7 +115,7 @@ jobs: #!/bin/bash az group create --name ${{ steps.variables.outputs.rgName }} --location ${{ env.ResourceGroupLocation }} echo "Azure resource group created" - echo "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + echo "Artifacts Location = ${{ steps.variables.outputs.artifactsLocation }}" - name: Deploy ARM Template (Neo4j Standalone v5) id: deployARM @@ -117,7 +123,7 @@ jobs: with: resourceGroupName: ${{ steps.variables.outputs.rgName }} template: ./marketplace/neo4j-enterprise/mainTemplate.json - parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="1" graphDatabaseVersion="5" _artifactsLocation="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="1" graphDatabaseVersion="5" _artifactsLocation=${{ steps.variables.outputs.artifactsLocation }} deploymentName: ${{ steps.variables.outputs.depName }} - name: Execute tests @@ -157,7 +163,12 @@ jobs: DATE=`echo $(date '+%Y%m%d-%S-%2N')` RGNAME=`echo ghactions-rg-$DATE` DEPNAME=`echo ghactions-dep-$DATE` + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/` + if ${{ github.event_name == 'workflow_dispatch' }}; then + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/` + fi echo "rgName=$RGNAME" >> $GITHUB_OUTPUT + echo "artifactsLocation=$ARTIFACTS_LOCATION" >> $GITHUB_OUTPUT echo "depName=$DEPNAME" >> $GITHUB_OUTPUT echo "Resource Group name: $RGNAME" echo "Deployment name: $DEPNAME" @@ -170,7 +181,7 @@ jobs: #!/bin/bash az group create --name ${{ steps.variables.outputs.rgName }} --location ${{ env.ResourceGroupLocation }} echo "Azure resource group created" - echo "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + echo "Artifacts Location = ${{ steps.variables.outputs.artifactsLocation }}" - name: Deploy ARM Template (Neo4j Cluster v5) id: deployARM @@ -178,7 +189,7 @@ jobs: with: resourceGroupName: ${{ steps.variables.outputs.rgName }} template: ./marketplace/neo4j-enterprise/mainTemplate.json - parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="3" graphDatabaseVersion="5" licenseType="Evaluation" _artifactsLocation="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="3" graphDatabaseVersion="5" licenseType="Evaluation" _artifactsLocation=${{ steps.variables.outputs.artifactsLocation }} deploymentName: ${{ steps.variables.outputs.depName }} - name: Execute tests @@ -218,7 +229,12 @@ jobs: DATE=`echo $(date '+%Y%m%d-%S-%2N')` RGNAME=`echo ghactions-rg-$DATE` DEPNAME=`echo ghactions-dep-$DATE` + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/` + if ${{ github.event_name == 'workflow_dispatch' }}; then + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/` + fi echo "rgName=$RGNAME" >> $GITHUB_OUTPUT + echo "artifactsLocation=$ARTIFACTS_LOCATION" >> $GITHUB_OUTPUT echo "depName=$DEPNAME" >> $GITHUB_OUTPUT echo "Resource Group name: $RGNAME" echo "Deployment name: $DEPNAME" @@ -231,7 +247,7 @@ jobs: #!/bin/bash az group create --name ${{ steps.variables.outputs.rgName }} --location ${{ env.ResourceGroupLocation }} echo "Azure resource group created" - echo "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + echo "Artifacts Location = ${{ steps.variables.outputs.artifactsLocation }}" - name: Deploy ARM Template (Neo4j Standalone v5) id: deployARM @@ -239,7 +255,7 @@ jobs: with: resourceGroupName: ${{ steps.variables.outputs.rgName }} template: ./marketplace/neo4j-enterprise/mainTemplate.json - parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="1" graphDatabaseVersion="5" licenseType="Evaluation" _artifactsLocation="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="1" graphDatabaseVersion="5" licenseType="Evaluation" _artifactsLocation=${{ steps.variables.outputs.artifactsLocation }} deploymentName: ${{ steps.variables.outputs.depName }} - name: Execute tests @@ -279,7 +295,12 @@ jobs: DATE=`echo $(date '+%Y%m%d-%S-%2N')` RGNAME=`echo ghactions-rg-$DATE` DEPNAME=`echo ghactions-dep-$DATE` + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/` + if ${{ github.event_name == 'workflow_dispatch' }}; then + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/` + fi echo "rgName=$RGNAME" >> $GITHUB_OUTPUT + echo "artifactsLocation=$ARTIFACTS_LOCATION" >> $GITHUB_OUTPUT echo "depName=$DEPNAME" >> $GITHUB_OUTPUT echo "Resource Group name: $RGNAME" echo "Deployment name: $DEPNAME" @@ -292,7 +313,7 @@ jobs: #!/bin/bash az group create --name ${{ steps.variables.outputs.rgName }} --location ${{ env.ResourceGroupLocation }} echo "Azure resource group created" - echo "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + echo "Artifacts Location = ${{ steps.variables.outputs.artifactsLocation }}" - name: Deploy ARM Template (Neo4j Cluster v4.4) id: deployARM @@ -300,7 +321,7 @@ jobs: with: resourceGroupName: ${{ steps.variables.outputs.rgName }} template: ./marketplace/neo4j-enterprise/mainTemplate.json - parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="3" graphDatabaseVersion="4.4" _artifactsLocation="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="3" graphDatabaseVersion="4.4" _artifactsLocation=${{ steps.variables.outputs.artifactsLocation }} deploymentName: ${{ steps.variables.outputs.depName }} - name: Execute tests @@ -340,7 +361,12 @@ jobs: DATE=`echo $(date '+%Y%m%d-%S-%2N')` RGNAME=`echo ghactions-rg-$DATE` DEPNAME=`echo ghactions-dep-$DATE` + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/` + if ${{ github.event_name == 'workflow_dispatch' }}; then + ARTIFACTS_LOCATION=`echo https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/` + fi echo "rgName=$RGNAME" >> $GITHUB_OUTPUT + echo "artifactsLocation=$ARTIFACTS_LOCATION" >> $GITHUB_OUTPUT echo "depName=$DEPNAME" >> $GITHUB_OUTPUT echo "Resource Group name: $RGNAME" echo "Deployment name: $DEPNAME" @@ -353,7 +379,7 @@ jobs: #!/bin/bash az group create --name ${{ steps.variables.outputs.rgName }} --location ${{ env.ResourceGroupLocation }} echo "Azure resource group created" - echo "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + echo "Artifacts Location = ${{ steps.variables.outputs.artifactsLocation }}" - name: Deploy ARM Template (Neo4j Standalone v4.4) id: deployARM @@ -361,7 +387,7 @@ jobs: with: resourceGroupName: ${{ steps.variables.outputs.rgName }} template: ./marketplace/neo4j-enterprise/mainTemplate.json - parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="1" graphDatabaseVersion="4.4" _artifactsLocation="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref }}/" + parameters: ./marketplace/neo4j-enterprise/parameters.json nodeCount="1" graphDatabaseVersion="4.4" _artifactsLocation=${{ steps.variables.outputs.artifactsLocation }} deploymentName: ${{ steps.variables.outputs.depName }} - name: Execute tests