From 07e271e1a0d33b7670c5abcaf940e83bc0d17418 Mon Sep 17 00:00:00 2001 From: liquibot Date: Wed, 31 Jul 2024 19:19:29 +0000 Subject: [PATCH 1/2] Liquibase Version Bumped to 4.29.1 --- Dockerfile | 4 ++-- Dockerfile.alpine | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6518f5c..abf266f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN groupadd --gid 1001 liquibase && \ # Download and install Liquibase WORKDIR /liquibase -ARG LIQUIBASE_VERSION=4.29.0 -ARG LB_SHA256=0883b4975fc2f0a2f0180614cb156cea3c453057e6ec185c01550ec67030d8d0 +ARG LIQUIBASE_VERSION=4.29.1 +ARG LB_SHA256=30524ff1c1be1aac46b774bcc7e2d5488eb217c174e9ff82f0bac244feb9b117 RUN wget -q -O liquibase-${LIQUIBASE_VERSION}.tar.gz "https://github.com/liquibase/liquibase/releases/download/v${LIQUIBASE_VERSION}/liquibase-${LIQUIBASE_VERSION}.tar.gz" && \ echo "$LB_SHA256 *liquibase-${LIQUIBASE_VERSION}.tar.gz" | sha256sum -c - && \ diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 1b38a7e..95de4e2 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -11,8 +11,8 @@ RUN apk add --no-cache openjdk17-jre-headless bash WORKDIR /liquibase -ARG LIQUIBASE_VERSION=4.29.0 -ARG LB_SHA256=0883b4975fc2f0a2f0180614cb156cea3c453057e6ec185c01550ec67030d8d0 +ARG LIQUIBASE_VERSION=4.29.1 +ARG LB_SHA256=30524ff1c1be1aac46b774bcc7e2d5488eb217c174e9ff82f0bac244feb9b117 # Download, verify, extract RUN set -x && \ From e5b8b694d269a16280b204ad5c251427484c3a09 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Fri, 2 Aug 2024 15:39:51 +0200 Subject: [PATCH 2/2] DAT-18340 DevOps :: Docker official PR wrong commit (#328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔧 (.github/workflows/create-release.yml): add latestCommitSha output to collect and use the latest commit SHA for the release process. Update GitCommit value in the liquibase file to use the latest commit SHA instead of the github.sha value. * 🔧 (test.yml): increase sleep time from 20 to 30 seconds for better stability and reliability in docker container startup and shutdown operations. --- .github/workflows/create-release.yml | 10 ++++++++-- .github/workflows/test.yml | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4b35a72..9149499 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -22,6 +22,8 @@ jobs: liquibaseVersion: ${{ steps.collect-data.outputs.liquibaseVersion }} extensionVersion: ${{ steps.collect-data.outputs.extensionVersion }} minorVersion: ${{ steps.collect-data.outputs.minorVersion }} + latestCommitSha: ${{ steps.get-latest-sha.outputs.latestCommitSha }} + steps: - name: Collect Data id: collect-data @@ -93,6 +95,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + - name: Get latest commit SHA + id: get-latest-sha + run: echo "latestCommitSha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" + setup-update-draft-build: name: "${{ matrix.image.name }}:${{ inputs.liquibaseVersion}}${{ matrix.image.suffix }}" needs: update-dockerfiles @@ -184,12 +190,12 @@ jobs: echo "" >> library/liquibase echo "Tags: ${{ env.MAJOR_MINOR }}, ${{ needs.update-dockerfiles.outputs.liquibaseVersion }}, latest" >> library/liquibase echo "GitFetch: refs/heads/main" >> library/liquibase - echo "GitCommit: ${{ github.sha }}" >> library/liquibase + echo "GitCommit: ${{ needs.update-dockerfiles.outputs.latestCommitSha }}" >> library/liquibase echo "File: Dockerfile" >> library/liquibase echo "" >> library/liquibase echo "Tags: ${{ env.MAJOR_MINOR }}-alpine, ${{ needs.update-dockerfiles.outputs.liquibaseVersion }}-alpine, alpine" >> library/liquibase echo "GitFetch: refs/heads/main" >> library/liquibase - echo "GitCommit: ${{ github.sha }}" >> library/liquibase + echo "GitCommit: ${{ needs.update-dockerfiles.outputs.latestCommitSha }}" >> library/liquibase echo "File: Dockerfile.alpine" >> library/liquibase git add library/liquibase if git diff-index --cached --quiet HEAD -- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1cd438c..4f223e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: run: | LOG_STRING="The database does not persist data" docker run --name $CONTAINER_NAME -d -v $(pwd)/.github/test:/liquibase/changelog liquibase/liquibase:${{ github.sha }} init start-h2 - sleep 20 + sleep 30 # Check if the container is running if docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"; then # Get the logs and check if the desired string is present @@ -118,7 +118,7 @@ jobs: docker rm $CONTAINER_NAME # Start docker container with good ENV docker run --name $CONTAINER_NAME -d -v $(pwd)/.github/test:/liquibase/changelog -e LIQUIBASE_HOME="/liquibase" liquibase/liquibase:${{ github.sha }} init start-h2 - sleep 20 + sleep 30 docker logs $CONTAINER_NAME # Check if the container is running if docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"; then @@ -141,7 +141,7 @@ jobs: docker stop $CONTAINER_NAME # Start docker container docker start $CONTAINER_NAME - sleep 5 + sleep 30 # Check if the container is running if docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"; then # Get the logs and check if the desired string is present