Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build & Publish Docker Images

on:
pull_request:
push:
branches: [ main ]
workflow_dispatch: {}
Expand Down Expand Up @@ -28,33 +29,35 @@ jobs:
shell: bash
run: |
# Define Gradle versions per JDK in compact arrays to avoid a huge YAML matrix
# Keep only major tag and latest patch version in that major. Gradle does not republish patch versions.
JDK25=(
9 9.1.0
)
JDK21=(
8 8.6 8.7 8.8 8.9 8.10 8.10.1 8.10.2 8.11.0 8.11.1 8.12.0 8.12.1 8.13 8.14.0 8.14.1 8.14.2 8.14.3 9 9.0.0 9.1.0
8 8.14.3 9 9.1.0
)
JDK17=(
8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.10.1 8.10.2 8.11.0 8.11.1 8.12.0 8.12.1 8.13 8.14.0 8.14.1 8.14.2 8.14.3 9 9.0.0 9.1.0
8 8.14.3 9 9.1.0
)
JDK11=(
8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.10.1 8.10.2 8.11.0 8.11.1 8.12.0 8.12.1 8.13 8.14.0 8.14.1 8.14.2 8.14.3
8 8.14.3
)
JDK8=(
8.14.3
8 8.14.3
)

VERSIONS=()
for v in "${JDK25[@]}"; do VERSIONS+=("\"${v}-jdk25\""); done
for v in "${JDK21[@]}"; do VERSIONS+=("\"${v}-jdk21\""); done
for v in "${JDK17[@]}"; do VERSIONS+=("\"${v}-jdk17\""); done
for v in "${JDK11[@]}"; do VERSIONS+=("\"${v}-jdk11\""); done
for v in "${JDK8[@]}"; do VERSIONS+=("\"${v}-jdk8\""); done
for v in "${JDK25[@]}"; do VERSIONS+=("${v}-jdk25"); done
for v in "${JDK21[@]}"; do VERSIONS+=("${v}-jdk21"); done
for v in "${JDK17[@]}"; do VERSIONS+=("${v}-jdk17"); done
for v in "${JDK11[@]}"; do VERSIONS+=("${v}-jdk11"); done
for v in "${JDK8[@]}"; do VERSIONS+=("${v}-jdk8"); done

JSON=$(printf '%s\n' "${VERSIONS[@]}" | jq -s .)
JSON=$(printf '%s\n' "${VERSIONS[@]}" | jq -R -s -c 'split("\n")[:-1]')
echo "matrix={\"version\":$JSON}" >> "$GITHUB_OUTPUT"

build-and-push:
if: github.ref == 'refs/heads/main'
name: ${{ matrix.version }}
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -86,7 +89,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
# push: true
push: true
build-args: |
VERSION=${{ matrix.version }}
tags: |
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
ARG VERSION=latest
FROM gradle:${VERSION}

LABEL maintainer="Bitweb <tech@bitweb.ee>"

ARG TARGETARCH
RUN if [ "$TARGETARCH" = "arm64" ]; then \
curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"; \
else \
curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"; \
fi && \
unzip awscliv2.zip && \
unzip -q awscliv2.zip && \
./aws/install && \
rm awscliv2.zip && \
rm -rf aws/ && \
Expand Down
10 changes: 10 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
View license information for [Gradle](https://gradle.org/license/) and [aws-cli v2](https://github.com/aws/aws-cli/blob/develop/LICENSE.txt).

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies
with any relevant licenses for all software contained within.

THIS PROJECT IS NOT ENDORSED IN ANY WAY BY AMAZON OR GRADLE.
ALL TRADEMARKS AND COPYRIGHT BELONG TO THEIR RESPECTIVE OWNERS.
37 changes: 8 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ elsewhere as well.

`amd64` and `arm64` architectures are supported at this moment.

Maintained by: [Bitweb OÜ](https://bitweb.ee). Updates are published every Sunday.
Maintained by: [Bitweb OÜ](https://bitweb.ee).

# Supported tags

Only Gradle versions supported by [Gradle](https://endoflife.date/gradle) are published.
Only Gradle versions actively supported by [Gradle](https://endoflife.date/gradle) are published.

Supported Java versions: 8, 11, 17, 21, 25.

If the version you need is not listed, or you need different architecture, please contact Bitweb at [tech@bitweb.ee](mailto:tech@bitweb.ee).
If the version you need is not available, or you need different architecture, please contact Bitweb at [tech@bitweb.ee](mailto:tech@bitweb.ee).

# Usage in Bitbucket Pipelines

Expand All @@ -36,37 +36,16 @@ It's recommended to specify only major version, this way you'll stay up-to-date

## Deployment

Deployment is done automatically to Docker Hub from master branch. Updates are automatically done every Sunday.
Deployment is done automatically to Docker Hub from main branch. Updates are made when new Gradle versions are published.

New Gradle/JDK versions need to be added manually.

Tags with patch versions will not be tolerated and provided.

## Adding a new version (tag)

1. Create a new Pipeline step (in `bitbcuket-pipelines.yml`), that extends base step and specifies deployment name and
description. Deployment name must follow the following convention: _{gradle-version}-{jdk-version}_ Dots are not
allowed, so remove them: 7.3-jdk11 -> 73-jdk11
2. Add the step to master list
3. Update readme
4. Create the deployment environment in production [Bitbucket Pipelines](https://bitbucket.org/bitwebou/infra-docker-gradle-awscli/admin/pipelines/deployment-settings)
5. Add deployment variable with name _VERSION_ and value as tag name from base Gradle image
6. Push and validate
7. Update README in Docker Hub. Skip _Deployment_ and _Adding a new version_ headings.
1. Add new version to respective JDK arrays in [build workflow](https://github.com/BitWeb/docker-gradle-awscli/blob/main/.github/workflows/build.yml)
2. Update readme when needed (new Gradle major version or JDK)
3. Create a PR with changes

# License

View license information for [Gradle](https://gradle.org/license/) and [aws-cli v2](https://github.com/aws/aws-cli/blob/develop/LICENSE.txt).

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies
with any relevant licenses for all software contained within.

THIS PROJECT IS NOT ENDORSED IN ANY WAY BY AMAZON OR GRADLE.
ALL TRADEMARKS AND COPYRIGHT BELONG TO THEIR RESPECTIVE OWNERS.

# TODO

* `latest` tag (needs separating gradle image and our image tag in deployment)
See [LICENSE.MD](https://github.com/BitWeb/docker-gradle-awscli/blob/main/LICENSE.MD)