Skip to content

Commit

Permalink
Set base image with PULSAR_BASE_IMAGE environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Sep 28, 2024
1 parent b678b64 commit 45eb7df
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ jobs:
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
CI_JDK_MAJOR_VERSION: ${{ needs.preconditions.outputs.jdk_major_version }}
IMAGE_JDK_MAJOR_VERSION: ${{ needs.preconditions.outputs.jdk_major_version }}
PULSAR_BASE_IMAGE: bellsoft/liberica-runtime-container:jdk-all-${{ needs.preconditions.outputs.jdk_major_version }}-cds-stream-glibc
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -830,7 +830,7 @@ jobs:
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
CI_JDK_MAJOR_VERSION: ${{ needs.preconditions.outputs.jdk_major_version }}
IMAGE_JDK_MAJOR_VERSION: ${{ needs.preconditions.outputs.jdk_major_version }}
PULSAR_BASE_IMAGE: bellsoft/liberica-runtime-container:jdk-all-${{ needs.preconditions.outputs.jdk_major_version }}-cds-stream-glibc
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions docker/pulsar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#

# Final image uses the Liberica JDK image running on Alpaquita Linux as the base image
# maven build passes PULSAR_BASE_IMAGE environment variable to the build as PULSAR_BASE_IMAGE argument
ARG PULSAR_BASE_IMAGE=bellsoft/liberica-runtime-container:jdk-all-17-cds-stream-glibc
# Alpine is used for intermediate stages
ARG ALPINE_VERSION=3.20
Expand Down
1 change: 1 addition & 0 deletions docker/pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<PULSAR_TARBALL>target/pulsar-server-distribution-${project.version}-bin.tar.gz</PULSAR_TARBALL>
<PULSAR_CLIENT_PYTHON_VERSION>${pulsar.client.python.version}</PULSAR_CLIENT_PYTHON_VERSION>
<SNAPPY_VERSION>${snappy.version}</SNAPPY_VERSION>
<PULSAR_BASE_IMAGE>${PULSAR_BASE_IMAGE}</PULSAR_BASE_IMAGE>
</args>
<contextDir>${project.basedir}</contextDir>
<tags>
Expand Down
34 changes: 4 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ flexible messaging model and an intuitive client API.</description>

<pulsar.client.python.version>3.4.0</pulsar.client.python.version>

<UBUNTU_MIRROR>http://archive.ubuntu.com/ubuntu/</UBUNTU_MIRROR>
<UBUNTU_SECURITY_MIRROR>http://security.ubuntu.com/ubuntu/</UBUNTU_SECURITY_MIRROR>
<IMAGE_JDK_MAJOR_VERSION>17</IMAGE_JDK_MAJOR_VERSION>
<PULSAR_BASE_IMAGE>bellsoft/liberica-runtime-container:jdk-all-17-cds-stream-glibc</PULSAR_BASE_IMAGE>

<!--config keys to configure test selection -->
<include>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</include>
Expand Down Expand Up @@ -2749,39 +2747,15 @@ flexible messaging model and an intuitive client API.</description>
</profile>

<profile>
<id>ubuntu-mirror-set</id>
<id>pulsar-base-image-set</id>
<activation>
<property>
<name>env.UBUNTU_MIRROR</name>
<name>env.PULSAR_BASE_IMAGE</name>
</property>
</activation>
<properties>
<!-- Override the default value with the environment variable -->
<UBUNTU_MIRROR>${env.UBUNTU_MIRROR}</UBUNTU_MIRROR>
</properties>
</profile>
<profile>
<id>ubuntu-security-mirror-set</id>
<activation>
<property>
<name>env.UBUNTU_SECURITY_MIRROR</name>
</property>
</activation>
<properties>
<!-- Override the default value with the environment variable -->
<UBUNTU_SECURITY_MIRROR>${env.UBUNTU_SECURITY_MIRROR}</UBUNTU_SECURITY_MIRROR>
</properties>
</profile>
<profile>
<id>jdk-major-version-set</id>
<activation>
<property>
<name>env.IMAGE_JDK_MAJOR_VERSION</name>
</property>
</activation>
<properties>
<!-- Override the default value with the environment variable -->
<IMAGE_JDK_MAJOR_VERSION>${env.IMAGE_JDK_MAJOR_VERSION}</IMAGE_JDK_MAJOR_VERSION>
<PULSAR_BASE_IMAGE>${env.PULSAR_BASE_IMAGE}</PULSAR_BASE_IMAGE>
</properties>
</profile>

Expand Down

0 comments on commit 45eb7df

Please sign in to comment.