Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating enterprise and community workflow for workflow_dispatch action #47

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading