Skip to content

Commit

Permalink
updating enterprise and community workflow for workflow_dispatch acti…
Browse files Browse the repository at this point in the history
…on (#47)

* updating enterprise and community workflow for workflow_dispatch action

* updating the even triggers

* fixing community test case

---------

Co-authored-by: Harshit Singhvi <[email protected]>
  • Loading branch information
harshitsinghvi22 and Harshit Singhvi authored Jan 30, 2024
1 parent b8a658f commit ba27119
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 13 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- marketplace/neo4j-community/**
- scripts/neo4j-community/**
- .github/**
branches:
- main

Expand All @@ -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"
Expand All @@ -43,15 +49,15 @@ 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
uses: azure/arm-deploy@v1
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
Expand All @@ -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()
Expand Down
46 changes: 36 additions & 10 deletions .github/workflows/enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- marketplace/neo4j-enterprise/**
- scripts/neo4j-enterprise/**
- .github/**
branches:
- main

Expand Down Expand Up @@ -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"
Expand All @@ -109,15 +115,15 @@ 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
uses: azure/arm-deploy@v1
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
Expand Down Expand Up @@ -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"
Expand All @@ -170,15 +181,15 @@ 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
uses: azure/arm-deploy@v1
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
Expand Down Expand Up @@ -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"
Expand All @@ -231,15 +247,15 @@ 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
uses: azure/arm-deploy@v1
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
Expand Down Expand Up @@ -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"
Expand All @@ -292,15 +313,15 @@ 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
uses: azure/arm-deploy@v1
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
Expand Down Expand Up @@ -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"
Expand All @@ -353,15 +379,15 @@ 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
uses: azure/arm-deploy@v1
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
Expand Down

0 comments on commit ba27119

Please sign in to comment.