Skip to content

Commit

Permalink
Issue #3628: Build the OTOBO Kerberos Image as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Jul 29, 2024
1 parent becfa36 commit 3710c61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/docker_image_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ jobs:

runs-on: 'ubuntu-latest'

strategy:

# create two different images
matrix:
target: [ 'otobo-web', 'otobo-kerberos-web', ]
include:
- target: 'otobo-web'
dockerfile: 'otobo.web.dockerfile'
tag_prefix: 'devel'
- target: 'otobo-kerberos-web'
dockerfile: 'otobo.kerberos.web.dockerfile'
tag_prefix: 'devel-kerberos'

steps:

-
Expand All @@ -28,7 +41,7 @@ jobs:
name: Setup
run: |
branch="${{ github.ref_name }}" # e.g rel-10_0
docker_tag="devel-$branch"
docker_tag="${{ matrix.tag_prefix }}-$branch"
mixed_case_repository="${{ github.repository }}" # e.g. RotherOSS/otobo
lowercased_repository="${mixed_case_repository,,}" # e.g. rotheross/otobo
build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand All @@ -55,7 +68,7 @@ jobs:
with:
load: true
context: .
file: otobo.web.dockerfile
file: ${{ matrix.dockerfile }}
pull: true
build-args: |
BUILD_DATE=${{ env.otobo_build_date }}
Expand All @@ -64,7 +77,7 @@ jobs:
GIT_BRANCH=${{ env.otobo_branch }}
GIT_COMMIT=${{ env.otobo_commit }}
tags: ${{ env.otobo_ref }}
target: otobo-web
target: ${{ matrix.target }}
cache-from: type=gha
cache-to: type=gha,mode=max`

Expand All @@ -91,7 +104,7 @@ jobs:
with:
push: true
context: .
file: otobo.web.dockerfile
file: ${{ matrix.dockerfile }}
pull: true
build-args: |
BUILD_DATE=${{ env.otobo_build_date }}
Expand All @@ -100,6 +113,6 @@ jobs:
GIT_BRANCH=${{ env.otobo_branch }}
GIT_COMMIT=${{ env.otobo_commit }}
tags: ${{ env.otobo_ref }}
target: otobo-web
target: ${{ matrix.target }}
cache-from: type=gha
cache-to: type=gha,mode=max`
1 change: 1 addition & 0 deletions hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# In newer version different image are built with the same Dockerfile.
TARGET_OPTION=$(case $DOCKERFILE_PATH in
"otobo.web.dockerfile") echo "--target=otobo-web" ;;
"otobo.kerberos.web.dockerfile") echo "--target=otobo-kerberos-web" ;;
*) echo "" ;;
esac)

Expand Down
2 changes: 1 addition & 1 deletion otobo.kerberos.web.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# This avoids a surprising change of the version of Debian when the image
# is rebuilt, especially when the image for a new release of OTOBO is built.
# Note that the minor version of Debian may change between builds.
FROM perl:5.36-bookworm
FROM perl:5.36-bookworm AS otobo-kerberos-web

# First there is some initial setup that needs to be done by root.
USER root
Expand Down

0 comments on commit 3710c61

Please sign in to comment.