-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the CI/CD workflow to use the latest Docker actions for assembling metadata, building, testing, and pushing multi-platform Docker images. Cease using the `./build` script in the workflow, but update it to build images for multiple platforms. To have both the CI/CD workflow and the `./build` script in sync, add the `.envrc` file and teach both to read from it for common values, especially the Sqitch version. Fix an issue building Sqitch on ARM64 by installing List::MoreUtils::XS before building Sqitch; otherwise it hangs and times out during the configure phase for that module. Update the Oracle `Dockerfile` to always install the latest Instant Client; no more need to edit it for new versions. Also teach it to properly install ARM64 client libraries, but disable building for ARM64 in the `Makefile`, for now, until a [bug building DBD::Oracle] can be fixed. Update the Snowflake `Dockerfile` to install the ARM64 ODBC driver on ARM64 Linux, but limit builds to AMD64 in the `Makefile`, for now, until [SnowSQL gets ARM64 support]. Limit the Exasol build to AMD64, as there are currently no Exasol libraries for ARM64. Remove reference to Vertica, for which there is not yet Docker support. [bug building DBD::Oracle]: https://rt.cpan.org/Ticket/Display.html?id=149876 [SnowSQL gets ARM64 support]: https://community.snowflake.com/s/question/0D5Do00000ltxpVKAQ/snowsql-linuxarm64-support
- Loading branch information
Showing
9 changed files
with
135 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
NAME=sqitch | ||
TITLE=Sqitch | ||
VERSION=1.4.0 | ||
IMAGE=sqitch/sqitch | ||
DESCRIPTION="Sensible database change management" | ||
VENDOR="The Sqitch Community" | ||
AUTHORS="Sqitch Hackers <[email protected]>" | ||
URL=https://hub.docker.com/r/sqitch/sqitch/ | ||
DOCS="https://github.com/sqitchers/docker-sqitch#readme" | ||
SOURCE=https://github.com/sqitchers/docker-sqitch | ||
LICENSE=MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
.DEFAULT_GOAL := sqitch | ||
.PHONY: oracle snowflake vertica exasol firebird postgres mysql sqlite | ||
|
||
sqitch: Dockerfile | ||
sqitch: Dockerfile .envrc | ||
./build | ||
|
||
# Oracle only on amd64 till an issue building DBD::Oracle is sorted. | ||
# https://rt.cpan.org/Ticket/Display.html?id=149876 | ||
oracle: oracle/Dockerfile | ||
env DIR=oracle REGISTRY=sqitch ./build | ||
env DIR=oracle REGISTRY=sqitch ARCHS=amd64 ./build | ||
|
||
# Snowflake only on amd64 till SnowSQL ARM support released. | ||
# https://community.snowflake.com/s/question/0D5Do00000ltxpVKAQ/snowsql-linuxarm64-support | ||
snowflake: snowflake/Dockerfile | ||
env DIR=snowflake REGISTRY=sqitch ./build --build-arg sf_account=example | ||
env DIR=snowflake REGISTRY=sqitch ARCHS=amd64 ./build --build-arg sf_account=example | ||
|
||
# Exasol currently offers no ARM support. | ||
exasol: exasol/Dockerfile | ||
env DIR=exasol REGISTRY=sqitch ./build | ||
env DIR=exasol REGISTRY=sqitch ARCHS=amd64 ./build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
|
||
set -e | ||
|
||
NAME=sqitch | ||
VERSION=1.4.0 | ||
source .envrc | ||
|
||
DIR=${DIR:=.} | ||
REGISTRY=${REGISTRY:="$NAME"} | ||
ARCHS=${ARCHS:='amd64 arm64'} | ||
|
||
# For main Sqitch build, the main tag is "latest" and there | ||
# is no sub-package. | ||
|
@@ -34,20 +34,23 @@ if [ "$GITHUB_REF_TYPE" == "tag" ]; then | |
fi | ||
fi | ||
|
||
# The Oracle and Snowflake images require amd64. | ||
docker buildx build --platform=linux/amd64 --pull \ | ||
--label org.opencontainers.image.created=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ | ||
--label org.opencontainers.image.authors='Sqitch Hackers <[email protected]>' \ | ||
--label org.opencontainers.image.url="https://hub.docker.com/r/sqitch/sqitch/" \ | ||
--label org.opencontainers.image.documentation="https://github.com/sqitchers/docker-sqitch#readme" \ | ||
--label org.opencontainers.image.source="https://github.com/sqitchers/docker-sqitch" \ | ||
--label org.opencontainers.image.version="v$VERSION" \ | ||
--label org.opencontainers.image.revision="$(git rev-parse --abbrev-ref HEAD)" \ | ||
--label org.opencontainers.image.vendor="The Sqitch Community" \ | ||
--label org.opencontainers.image.licenses="MIT" \ | ||
--label org.opencontainers.image.ref.name="sqitch${PKG}-v${VERSION}" \ | ||
--label org.opencontainers.image.title="Sqitch" \ | ||
--label org.opencontainers.image.description="Sensible database change management" \ | ||
"${tagopt[@]}" \ | ||
--build-arg "VERSION=${VERSION}" \ | ||
"$@" . | ||
# Build and export imaages to Docker for all supported architectures. | ||
for arch in $ARCHS; do | ||
printf "Building for linux/%s\n" "${arch}" | ||
docker buildx build --platform="linux/${arch}" --pull --load \ | ||
--label org.opencontainers.image.created=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ | ||
--label org.opencontainers.image.authors="${AUTHORS}" \ | ||
--label org.opencontainers.image.url="${URL}" \ | ||
--label org.opencontainers.image.documentation="${DOCS}" \ | ||
--label org.opencontainers.image.source="${SOURCE}" \ | ||
--label org.opencontainers.image.version="v${VERSION}" \ | ||
--label org.opencontainers.image.revision="$(git rev-parse --abbrev-ref HEAD)" \ | ||
--label org.opencontainers.image.vendor="${VENDOR}" \ | ||
--label org.opencontainers.image.licenses="${LICENSE}" \ | ||
--label org.opencontainers.image.ref.name="${NAME}${PKG}-v${VERSION}" \ | ||
--label org.opencontainers.image.title="${TITLE}" \ | ||
--label org.opencontainers.image.description="${DESCRIPTION}" \ | ||
"${tagopt[@]}" \ | ||
--build-arg "VERSION=${VERSION}" \ | ||
"$@" . | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters