Skip to content

Commit

Permalink
Add jdk11 support (#38)
Browse files Browse the repository at this point in the history
* Add jdk11 support

Signed-off-by: rick <[email protected]>

* Build maven-jdk11 image via github action
  • Loading branch information
LinuxSuRen authored Sep 17, 2021
1 parent 2cb5dcf commit 0fc3951
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 45 deletions.
69 changes: 68 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,74 @@ jobs:
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64

BuildMavenJDK11:
needs: BuildBase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta for KubeSphere
id: meta
if: github.repository_owner == 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
kubespheredev/builder-maven
ghcr.io/${{ github.repository_owner }}/builder-maven
tags: |
type=ref,event=branch,suffix=jdk11
type=ref,event=pr,suffix=jdk11
type=semver,pattern=v{{version}},suffix=jdk11
- name: Docker meta for Contributors
id: metaContributors
if: github.repository_owner != 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/builder-maven
tags: |
type=ref,event=branch,suffix=jdk11
type=ref,event=pr,suffix=jdk11
type=semver,pattern=v{{version}},suffix=jdk11
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push Docker images
uses: docker/[email protected]
if: github.repository_owner == 'kubesphere'
with:
context: maven
file: maven/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
build-args: "JDK_VERSION=11"
- name: Build and push Docker images for Contributors
uses: docker/[email protected]
if: github.repository_owner != 'kubesphere'
with:
context: maven
file: maven/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64
build-args: "JDK_VERSION=11"

BuildNodeJs:
needs: BuildBase
runs-on: ubuntu-latest
Expand Down Expand Up @@ -376,7 +444,6 @@ jobs:
platforms: linux/amd64,linux/arm64

BuildDotnet:
needs: BuildDotnet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ build-maven-podman:
push-maven-podman:
docker push kubespheredev/builder-maven:$(VERSION)-podman

build-jdk11:
docker build maven -f maven/Dockerfile -t kubespheredev/builder-maven:$(VERSION)-jdk11 --build-arg JDK_VERSION=11
4 changes: 3 additions & 1 deletion maven/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM kubespheredev/builder-base:v3.1.0

ARG JDK_VERSION 1.8.0

# java
ENV JAVA_VERSIOIN 1.8.0
ENV JAVA_VERSIOIN $JDK_VERSION
RUN yum install -y java-${JAVA_VERSIOIN}-openjdk-devel \
java-${JAVA_VERSIOIN}-openjdk-devel.i686

Expand Down
43 changes: 0 additions & 43 deletions maven/Dockerfile.podman

This file was deleted.

0 comments on commit 0fc3951

Please sign in to comment.