Skip to content

Commit

Permalink
Merge branch 'rel-10_1' into rel-11_0
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Jul 30, 2024
2 parents dad545d + b982435 commit 2470811
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/docker_image_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,28 @@ jobs:

strategy:

# create two different images
# create different images
matrix:
target: [ 'otobo-web', 'otobo-web-kerberos', ]
target: [ 'otobo-web', 'otobo-web-kerberos', 'otobo-elasticsearch', ]
include:
- target: 'otobo-web'
-
target: 'otobo-web'
dockerfile: 'otobo.web.dockerfile'
context: '.'
tag_prefix: 'devel'
- target: 'otobo-web-kerberos'
repository: 'rotheross/otobo'
-
target: 'otobo-web-kerberos'
dockerfile: 'otobo.web.dockerfile'
context: '.'
tag_prefix: 'devel-kerberos'
repository: 'rotheross/otobo'
-
target: 'otobo-elasticsearch'
dockerfile: 'otobo.elasticsearch.dockerfile'
context: 'scripts/elasticsearch'
tag_prefix: 'devel'
repository: 'rotheross/otobo-elasticsearch'

steps:

Expand All @@ -42,13 +54,11 @@ jobs:
run: |
branch="${{ github.ref_name }}" # e.g rel-10_0
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')
(
echo "otobo_branch=$branch"
echo "otobo_docker_tag=$docker_tag"
echo "otobo_ref=$lowercased_repository:$docker_tag"
echo "otobo_ref=${{ matrix.repository }}:$docker_tag"
echo "otobo_build_date=$build_date"
echo "otobo_commit=${{ github.sha }}"
) >> $GITHUB_ENV
Expand All @@ -67,7 +77,7 @@ jobs:
uses: docker/build-push-action@v6
with:
load: true
context: .
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
pull: true
build-args: |
Expand All @@ -85,6 +95,7 @@ jobs:
# Show some files in the image just to check sanity.
# otobo_first_time hasn't run yet, so /opt/otobo is still empty
name: Info
if: ${{ matrix.dockerfile == 'otobo.web.dockerfile' }}
run: |
docker run --rm -w /opt/otobo_install/otobo_next --entrypoint /bin/bash $otobo_ref -c "more git-repo.txt git-branch.txt git-commit.txt RELEASE | cat"
Expand All @@ -103,7 +114,7 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
context: .
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
pull: true
build-args: |
Expand Down
1 change: 1 addition & 0 deletions hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TARGET_OPTION=$(case $DOCKERFILE_PATH in
"otobo.kerberos.web.dockerfile") echo "--target=otobo-web-kerberos" ;;
"../../otobo.nginx.dockerfile") echo "--target=otobo-nginx" ;;
"../../otobo.nginx-kerberos.dockerfile") echo "--target=otobo-nginx-kerberos" ;;
"otobo.elasticsearch.dockerfile") echo "--target=otobo-elasticsearch" ;;
*) echo "" ;;
esac)

Expand Down
2 changes: 1 addition & 1 deletion otobo.elasticsearch.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Use 7.17.3, because latest flag is not available
# This image is based on Ubuntu 20.04. The User is root.
FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.3
FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.3 AS otobo-elasticsearch

# Install system tools
# Hadolint ignore=DL3008
Expand Down

0 comments on commit 2470811

Please sign in to comment.