Skip to content

Commit

Permalink
[NOID] Use TC for 4.4 builds to access latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gem-neo4j committed Jul 17, 2023
1 parent ef28c74 commit 9ef3654
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 7 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:

env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
TEAMCITY_FOUR_FOUR_URL: ${{ secrets.TEAMCITY_FOUR_FOUR_URL }}
TEAMCITY_USER: ${{ secrets.TEAMCITY_USER }}
TEAMCITY_PASSWORD: ${{ secrets.TEAMCITY_PASSWORD }}


jobs:
compile:
Expand Down Expand Up @@ -58,14 +62,25 @@ jobs:
matrix:
project: ['core', 'full', 'processor', 'test-utils', 'core-it', 'full-it']
env:
DOCKER_ENTERPRISE_FOUR_FOUR_URL: ${{ secrets.DOCKER_ENTERPRISE_FOUR_FOUR_URL }}
DOCKER_COMMUNITY_FOUR_FOUR_URL: ${{ secrets.DOCKER_COMMUNITY_FOUR_FOUR_URL }}
ENTERPRISE_TAR: enterprise-docker.tar
COMMUNITY_TAR: community-docker.tar

runs-on: ubuntu-latest
needs: compile
steps:
- uses: actions/checkout@v3
- name: Download neo4j 4.4 docker container
if: matrix.project == 'it'
run: |
curl -s -L0 -u "${TEAMCITY_USER}:${TEAMCITY_PASSWORD}" -X GET ${DOCKER_ENTERPRISE_FOUR_FOUR_URL} -o ${ENTERPRISE_TAR} &
curl -s -L0 -u "${TEAMCITY_USER}:${TEAMCITY_PASSWORD}" -X GET ${DOCKER_COMMUNITY_FOUR_FOUR_URL} -o ${COMMUNITY_TAR} &
wait
docker load --input ${ENTERPRISE_TAR}
docker load --input ${COMMUNITY_TAR}
- name: Run ${{ matrix.project }} tests
uses: ./.github/actions/test-gradle-project
with:
project-name: ${{ matrix.project }}
project-name: ${{ matrix.project }}
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'java'
id 'java-library'
id 'com.github.johnrengelman.shadow' version '4.0.3' apply false
id "com.bmuschko.nexus" version "2.3.1"
id 'maven-publish'
Expand All @@ -20,7 +20,9 @@ allprojects {
description = """neo4j-apoc-procedures"""
}

apply plugin: 'java'
apply plugin: 'java-library'
if (System.env.CI != null)
apply from: 'teamcity-repository.gradle'

repositories {

Expand All @@ -35,7 +37,7 @@ repositories {
}

subprojects {
apply plugin: 'java'
apply plugin: 'java-library'

repositories {

Expand Down Expand Up @@ -70,8 +72,8 @@ subprojects {
// neo4jDockerImage system property is used in TestContainerUtil
systemProperties 'user.language' : 'en' ,
'user.country ' : 'US',
'neo4jDockerImage' : project.hasProperty("neo4jDockerVersionOverride") ? 'neo4j:' + project.getProperty("neo4jDockerVersionOverride") + '-enterprise-debian' : 'neo4j:4.4.22-enterprise',
'neo4jCommunityDockerImage': project.hasProperty("neo4jDockerVersionOverride") ? 'neo4j:' + project.getProperty("neo4jDockerVersionOverride") + '-debian': 'neo4j:4.4.22'
'neo4jDockerImage' : project.hasProperty("neo4jDockerVersionOverride") ? 'neo4j:' + project.getProperty("neo4jDockerVersionOverride") + '-enterprise-debian' : 'neo4j:4.4.24-enterprise',
'neo4jCommunityDockerImage': project.hasProperty("neo4jDockerVersionOverride") ? 'neo4j:' + project.getProperty("neo4jDockerVersionOverride") + '-debian': 'neo4j:4.4.24'

maxHeapSize = "5G"
forkEvery = 50
Expand Down Expand Up @@ -117,7 +119,7 @@ apply from: "licenses-3rdparties.gradle"
ext {
publicDir = "${project.rootDir}"
// NB: due to version.json generation by parsing this file, the next line must not have any if/then/else logic
neo4jVersion = "4.4.22"
neo4jVersion = "4.4.24"
// instead we apply the override logic here
neo4jVersionEffective = project.hasProperty("neo4jVersionOverride") ? project.getProperty("neo4jVersionOverride") : neo4jVersion
testContainersVersion = '1.17.6'
Expand Down
17 changes: 17 additions & 0 deletions teamcity-repository.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allprojects {
plugins.withType(JavaLibraryPlugin) {
repositories {
maven {
name = 'teamcity-neo4j-4.4'
url = System.getenv('TEAMCITY_FOUR_FOUR_URL')
credentials {
username System.getenv('TEAMCITY_USER')
password System.getenv('TEAMCITY_PASSWORD')
}
authentication {
basic(BasicAuthentication)
}
}
}
}
}

0 comments on commit 9ef3654

Please sign in to comment.