Skip to content

Commit

Permalink
use the tomcat function for now
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Nov 6, 2024
1 parent 7a55bea commit 1051630
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/reusable_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,9 @@ jobs:
'\(.).cache-to=type=registry,ref=${{ env.CACHE_TARGET }}:${{ inputs.tag }}-\(.)"' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Set Tomcat environment variables
run: |
if [[ '${{ inputs.acs_version }}' != '23' ]]; then
echo "TOMCAT_MAJOR=9" >> $GITHUB_ENV
echo "TOMCAT_VERSION=9.0.96" >> $GITHUB_ENV
echo "TOMCAT_SHA512=ef3ac81debbc3a519c43d1fdb1c88ab26a8052af424d81bceccfbd6e663050a06d7aad7960fd5d11c17849829daebbebf33d92ac1158902283d0e534514aab93" >> $GITHUB_ENV
fi
- name: Bake Docker images
env:
ACS_VERSION: ${{ inputs.acs_version }}
TARGETARCH: ${{ inputs.acs_version == '23' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
DOCKER_PUSH: ${{ github.actor != 'dependabot[bot]'}}
uses: docker/bake-action@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0
Expand Down
17 changes: 14 additions & 3 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,27 @@ target "java_base" {
platforms = split(",", "${TARGETARCH}")
}

variable "ACS_VERSION" {
default = "23"
}

function "determine_tomcat_version" {
params = [acs_version, tomcat10, tomcat9]
result = acs_version == "23" ? tomcat10 : tomcat9
}

variable "TOMCAT_MAJOR" {
default = "10"
default = determine_tomcat_version("${ACS_VERSION}", "10", "9")
}

variable "TOMCAT_VERSION" {
default = "10.1.31"
default = determine_tomcat_version("${ACS_VERSION}", "10.1.31", "9.0.96")
}

variable "TOMCAT_SHA512" {
default = "0e3d423a843e2d9ba4f28a9f0a2f1073d5a1389557dfda041759f8df968bace63cd6948bd76df2727b5133ddb7c33e05dab43cea1d519ca0b6d519461152cce9"
default = determine_tomcat_version("${ACS_VERSION}",
"0e3d423a843e2d9ba4f28a9f0a2f1073d5a1389557dfda041759f8df968bace63cd6948bd76df2727b5133ddb7c33e05dab43cea1d519ca0b6d519461152cce9",
"ef3ac81debbc3a519c43d1fdb1c88ab26a8052af424d81bceccfbd6e663050a06d7aad7960fd5d11c17849829daebbebf33d92ac1158902283d0e534514aab93")
}

variable "TCNATIVE_VERSION" {
Expand Down

0 comments on commit 1051630

Please sign in to comment.