From 2ce1ece4aee20aa2ebe32926c15e623deb776abe Mon Sep 17 00:00:00 2001 From: Adam Saghy Date: Wed, 12 Feb 2025 17:34:02 +0100 Subject: [PATCH] FINERACT-2081: Fix to use locally built docker image --- .github/workflows/build-docker-mariadb.yml | 3 ++- .github/workflows/build-docker-postgresql.yml | 3 ++- .github/workflows/build-tests.yml | 3 ++- .github/workflows/smoke-activemq.yml | 3 ++- .github/workflows/smoke-kafka.yml | 3 ++- config/docker/compose/fineract-custom.yml | 2 +- config/docker/compose/fineract.yml | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-docker-mariadb.yml b/.github/workflows/build-docker-mariadb.yml index 7bf6ea577..586cd52a7 100644 --- a/.github/workflows/build-docker-mariadb.yml +++ b/.github/workflows/build-docker-mariadb.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + IMAGE_NAME: fineract steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -19,7 +20,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -Djib.to.image=$IMAGE_NAME -x test -x cucumber - name: Start the stack run: docker compose -f docker-compose.yml up -d - name: Check the stack diff --git a/.github/workflows/build-docker-postgresql.yml b/.github/workflows/build-docker-postgresql.yml index 5acb0bdd6..28b3f78a5 100644 --- a/.github/workflows/build-docker-postgresql.yml +++ b/.github/workflows/build-docker-postgresql.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + IMAGE_NAME: fineract steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -19,7 +20,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -Djib.to.image=$IMAGE_NAME -x test -x cucumber - name: Start the Standalone Stack run: docker compose -f docker-compose-postgresql.yml up -d - name: Check the stack diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml index 767cd074a..aa6a9217c 100644 --- a/.github/workflows/build-tests.yml +++ b/.github/workflows/build-tests.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + IMAGE_NAME: fineract steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -19,7 +20,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -Djib.to.image=$IMAGE_NAME -x test -x cucumber - name: Start the Fineract stack run: docker compose -f docker-compose-postgresql-test-activemq.yml up -d - name: Check the stack diff --git a/.github/workflows/smoke-activemq.yml b/.github/workflows/smoke-activemq.yml index 085b93685..ddd0a62fb 100644 --- a/.github/workflows/smoke-activemq.yml +++ b/.github/workflows/smoke-activemq.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + IMAGE_NAME: fineract steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -19,7 +20,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -Djib.to.image=$IMAGE_NAME -x test -x cucumber - name: Start the ActiveMQ Stack run: docker compose -f docker-compose-postgresql-activemq.yml up --scale fineract-worker=1 -d - name: Check the stack diff --git a/.github/workflows/smoke-kafka.yml b/.github/workflows/smoke-kafka.yml index 35aceddd6..479faf6af 100644 --- a/.github/workflows/smoke-kafka.yml +++ b/.github/workflows/smoke-kafka.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + IMAGE_NAME: fineract steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -19,7 +20,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -Djib.to.image=$IMAGE_NAME -x test -x cucumber - name: Start the Kafka Stack run: docker compose -f docker-compose-postgresql-kafka.yml up --scale fineract-worker=1 -d - name: Check the stack diff --git a/config/docker/compose/fineract-custom.yml b/config/docker/compose/fineract-custom.yml index d46ef411b..87211df9f 100644 --- a/config/docker/compose/fineract-custom.yml +++ b/config/docker/compose/fineract-custom.yml @@ -21,7 +21,7 @@ version: "3.8" services: fineract: # user: "${FINERACT_USER}:${FINERACT_GROUP}" - image: fineract-custom:latest + image: ${IMAGE_NAME:-fineract-custom:latest} volumes: - ${PWD}/config/docker/logback/logback-override.xml:/app/logback-override.xml - ${PWD}/config/docker/aws/etc/credentials:/etc/aws/credentials:ro diff --git a/config/docker/compose/fineract.yml b/config/docker/compose/fineract.yml index ce168d690..0d411844e 100644 --- a/config/docker/compose/fineract.yml +++ b/config/docker/compose/fineract.yml @@ -21,7 +21,7 @@ version: "3.8" services: fineract: # user: "${FINERACT_USER}:${FINERACT_GROUP}" - image: apache/fineract:latest + image: ${IMAGE_NAME:-apache/fineract:latest} volumes: - ${PWD}/config/docker/logback/logback-override.xml:/app/logback-override.xml - ${PWD}/config/docker/aws/etc/credentials:/etc/aws/credentials:ro