Skip to content

Commit

Permalink
Merge branch 'main' into DAT-17511
Browse files Browse the repository at this point in the history
  • Loading branch information
jandroav authored Aug 6, 2024
2 parents 5b6c019 + e5b8b69 commit d8165c3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 --
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 - && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down

0 comments on commit d8165c3

Please sign in to comment.