Skip to content

test build with CommandBox 6.0.0 #202

test build with CommandBox 6.0.0

test build with CommandBox 6.0.0 #202

Workflow file for this run

name: Release
on:
push:
branches:
- main
- development
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.Dockerfile
BUILD_IMAGE_TAG: latest
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.Dockerfile
BUILD_IMAGE_TAG: jre11
- BUILD_IMAGE_DOCKERFILE: builds/base/JDK11.Dockerfile
BUILD_IMAGE_TAG: jdk11
- BUILD_IMAGE_DOCKERFILE: builds/base/JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.JDK8.Dockerfile
BUILD_IMAGE_TAG: jdk8
- BUILD_IMAGE_DOCKERFILE: builds/debian/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5
- BUILD_IMAGE_DOCKERFILE: builds/debian/LuceeLight.Dockerfile
BUILD_IMAGE_TAG: lucee-light
- BUILD_IMAGE_DOCKERFILE: builds/debian/Adobe2018.Dockerfile
BUILD_IMAGE_TAG: adobe2018
- BUILD_IMAGE_DOCKERFILE: builds/debian/Adobe2021.Dockerfile
BUILD_IMAGE_TAG: adobe2021
- BUILD_IMAGE_DOCKERFILE: builds/debian/Adobe2023.Dockerfile
BUILD_IMAGE_TAG: adobe2023
# ubi9 Builds
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Base.Dockerfile
BUILD_IMAGE_TAG: ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Base.Dockerfile
BUILD_IMAGE_TAG: jre11-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/base/ubi9.JDK11.Dockerfile
BUILD_IMAGE_TAG: jdk11-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/base/ubi9.JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/LuceeLight.Dockerfile
BUILD_IMAGE_TAG: lucee-light-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Adobe2018.Dockerfile
BUILD_IMAGE_TAG: adobe2018-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Adobe2021.Dockerfile
BUILD_IMAGE_TAG: adobe2021-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Adobe2023.Dockerfile
BUILD_IMAGE_TAG: adobe2023-ubi9
# Alpine builds
# Note: No JDK builders currently support alpine with ARM
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.Dockerfile
BUILD_IMAGE_TAG: alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.Dockerfile
BUILD_IMAGE_TAG: jre11-alpine
- BUILD_IMAGE_DOCKERFILE: builds/base/Alpine.JDK11.Dockerfile
BUILD_IMAGE_TAG: jdk11-alpine
- BUILD_IMAGE_DOCKERFILE: builds/base/Alpine.JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.JDK8.Dockerfile
BUILD_IMAGE_TAG: jdk8-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/LuceeLight.Dockerfile
BUILD_IMAGE_TAG: lucee-light-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Adobe2018.Dockerfile
BUILD_IMAGE_TAG: adobe2018-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Adobe2021.Dockerfile
BUILD_IMAGE_TAG: adobe2021-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Adobe2023.Dockerfile
BUILD_IMAGE_TAG: adobe2023-alpine
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Setup Builds
id: setup
env:
DOCKER_IMAGE: ortussolutions/commandbox
BUILD_IMAGE_TAG: ${{ matrix.BUILD_IMAGE_TAG }}
COMMANDBOX_VERSION: 6.0.0
IMAGE_VERSION: 3.9.0
run: |
# Tag Builds
if [[ $GITHUB_REF == refs/tags/* ]]; then
if [[ $BUILD_IMAGE_TAG == latest ]]; then
BUILD_IMAGE_TAG="${GITHUB_REF#refs/tags/v}"
else
BUILD_IMAGE_TAG="${BUILD_IMAGE_TAG}-${GITHUB_REF#refs/tags/v}"
fi
elif [[ $GITHUB_REF == 'refs/heads/development' ]]; then
# Snapshot builds
BUILD_IMAGE_TAG="${BUILD_IMAGE_TAG}-snapshot"
fi
TAGS="${DOCKER_IMAGE}:${BUILD_IMAGE_TAG}"
if [[ ${BUILD_IMAGE_TAG} == *"alpine"* ]]; then
ARCH_PLATFORMS=linux/amd64
else
ARCH_PLATFORMS=linux/amd64,linux/arm64/v8
fi
# Set output parameters.
echo "arch_platforms=${ARCH_PLATFORMS}" >> $GITHUB_ENV
echo "image_version=${IMAGE_VERSION}" >> $GITHUB_ENV
echo "commandbox_version=${COMMANDBOX_VERSION}" >> $GITHUB_ENV
echo "IMAGE_TAG=${TAGS}" >> $GITHUB_ENV
- name: DockerHub Login
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Test
env:
COMMANDBOX_VERSION: ${{ env.commandbox_version }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
BUILD_IMAGE_DOCKERFILE: ${{ matrix.BUILD_IMAGE_DOCKERFILE }}
run: |
docker-compose -f docker-compose.test.yml up --build --exit-code-from sut
docker-compose -f docker-compose.secret-test.yml up --build --exit-code-from sut
- name: Build Final
uses: docker/build-push-action@v4
env:
DOCKER_BUILDKIT: 1
with:
provenance: false
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ${{ matrix.BUILD_IMAGE_DOCKERFILE }}
build-args: COMMANDBOX_VERSION=${{ env.commandbox_version }}
platforms: ${{ env.arch_platforms }}
push: true
tags: ${{ env.IMAGE_TAG }}