From 2ccc42eb198660708d6b2276eaea248448a14a37 Mon Sep 17 00:00:00 2001 From: Alejandro Jaramillo Date: Mon, 29 Jan 2024 08:58:19 +0100 Subject: [PATCH 1/5] Add jib-uploader action --- actions/jib-uploader/README.md | 4 +++ actions/jib-uploader/action.yaml | 29 ++++++++++++++++++++ docs/actions/jib-uploader/README.md | 41 +++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 actions/jib-uploader/README.md create mode 100644 actions/jib-uploader/action.yaml create mode 100644 docs/actions/jib-uploader/README.md diff --git a/actions/jib-uploader/README.md b/actions/jib-uploader/README.md new file mode 100644 index 000000000..82c93c96e --- /dev/null +++ b/actions/jib-uploader/README.md @@ -0,0 +1,4 @@ +# jib-uploader + +- [Description](https://github.com/bakdata/ci-templates/tree/main/docs/descriptions/actions/jib-uploader) +- [References](https://github.com/bakdata/ci-templates/tree/main/docs/references/actions/jib-uploader) diff --git a/actions/jib-uploader/action.yaml b/actions/jib-uploader/action.yaml new file mode 100644 index 000000000..7967509be --- /dev/null +++ b/actions/jib-uploader/action.yaml @@ -0,0 +1,29 @@ +name: "Build and upload Jib " +description: "Build the Jib image and upload it to the image repository" + +inputs: + image: + description: "The image name with its repository name" + required: true + tags: + description: "The tags to use to release the image" + required: true + class: + description: "The entrypoint class to be used for the image" + required: true + working-directory: + description: "working directory to run the commands" + required: true + +runs: + using: "composite" + steps: + - name: Build Docker image + run: | + ./gradlew jib \ + --info --stacktrace \ + --image=${{ inputs.image }} \ + -Djib.container.mainClass=${{ inputs.class }} \ + -Djib.to.tags=${{ inputs.tags }} + shell: bash + working-directory: ${{ inputs.working-directory }} diff --git a/docs/actions/jib-uploader/README.md b/docs/actions/jib-uploader/README.md new file mode 100644 index 000000000..8624846d8 --- /dev/null +++ b/docs/actions/jib-uploader/README.md @@ -0,0 +1,41 @@ +# Description jib-uploader composite action + +This composite action utilizes Jib to efficiently build a container image and automatically upload it to the referenced container repository. + +## Usage + +```yaml +- name: Build SentenceProducer image for tag release + uses: bakdata/ci-templates/actions/jib-uploader@main + with: + image: my-docker-registry/my-docker-image + class: org.example.MyClass + tags: latest,${GITHUB_REF/refs\/tags\//} + working-directory: "./" +``` + + +## References + +### Inputs + + + +| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | +|-------------------|--------|----------|---------|-----------------------------------------------| +| class | string | true | | The entrypoint class to be used for the image | +| image | string | true | | The image name with its repository name | +| tags | string | true | | The tags to use to release the image | +| working-directory | string | true | | working directory to run the commands | + + + + +### Outputs + + +No outputs. + + + +### Secrets From f49ec1c1ecdb5c76fde04df58609c7fa5c144607 Mon Sep 17 00:00:00 2001 From: Alejandro Jaramillo Date: Mon, 29 Jan 2024 11:00:23 +0100 Subject: [PATCH 2/5] Fix pre-commit --- docs/actions/jib-uploader/README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/actions/jib-uploader/README.md b/docs/actions/jib-uploader/README.md index 8624846d8..7e35d506b 100644 --- a/docs/actions/jib-uploader/README.md +++ b/docs/actions/jib-uploader/README.md @@ -14,28 +14,27 @@ This composite action utilizes Jib to efficiently build a container image and au working-directory: "./" ``` - ## References ### Inputs -| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | -|-------------------|--------|----------|---------|-----------------------------------------------| -| class | string | true | | The entrypoint class to be used for the image | -| image | string | true | | The image name with its repository name | -| tags | string | true | | The tags to use to release the image | -| working-directory | string | true | | working directory to run the commands | +| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | +| ----------------- | ------ | -------- | ------- | --------------------------------------------- | +| class | string | true | | The entrypoint class to be used for the image | +| image | string | true | | The image name with its repository name | +| tags | string | true | | The tags to use to release the image | +| working-directory | string | true | | working directory to run the commands | - ### Outputs + No outputs. - + ### Secrets From 430afb084aa227f2b1b5b2baeb95e14faa57a128 Mon Sep 17 00:00:00 2001 From: Alejandro Jaramillo Date: Mon, 29 Jan 2024 12:01:28 +0100 Subject: [PATCH 3/5] Fix format --- actions/jib-uploader/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actions/jib-uploader/README.md b/actions/jib-uploader/README.md index 82c93c96e..2fcf70a33 100644 --- a/actions/jib-uploader/README.md +++ b/actions/jib-uploader/README.md @@ -1,4 +1,4 @@ -# jib-uploader - -- [Description](https://github.com/bakdata/ci-templates/tree/main/docs/descriptions/actions/jib-uploader) -- [References](https://github.com/bakdata/ci-templates/tree/main/docs/references/actions/jib-uploader) +# jib-uploader + +- [Description](https://github.com/bakdata/ci-templates/tree/main/docs/descriptions/actions/jib-uploader) +- [References](https://github.com/bakdata/ci-templates/tree/main/docs/references/actions/jib-uploader) From 1e00b2b90aeabba76e2265466e02b243b5f9d7cc Mon Sep 17 00:00:00 2001 From: Alejandro Jaramillo Date: Tue, 30 Jan 2024 09:58:21 +0100 Subject: [PATCH 4/5] Implement changes --- .../README.md | 4 +- .../action.yaml | 58 +++++++++---------- .../README.md | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) rename actions/{jib-uploader => java-gradle-build-push-jib}/README.md (56%) rename actions/{jib-uploader => java-gradle-build-push-jib}/action.yaml (86%) rename docs/actions/{jib-uploader => java-gradle-build-push-jib}/README.md (95%) diff --git a/actions/jib-uploader/README.md b/actions/java-gradle-build-push-jib/README.md similarity index 56% rename from actions/jib-uploader/README.md rename to actions/java-gradle-build-push-jib/README.md index 2fcf70a33..26c97b586 100644 --- a/actions/jib-uploader/README.md +++ b/actions/java-gradle-build-push-jib/README.md @@ -1,4 +1,4 @@ # jib-uploader -- [Description](https://github.com/bakdata/ci-templates/tree/main/docs/descriptions/actions/jib-uploader) -- [References](https://github.com/bakdata/ci-templates/tree/main/docs/references/actions/jib-uploader) +- [Description](https://github.com/bakdata/ci-templates/tree/main/docs/descriptions/actions/java-gradle-build-push-jib) +- [References](https://github.com/bakdata/ci-templates/tree/main/docs/references/actions/java-gradle-build-push-jib) diff --git a/actions/jib-uploader/action.yaml b/actions/java-gradle-build-push-jib/action.yaml similarity index 86% rename from actions/jib-uploader/action.yaml rename to actions/java-gradle-build-push-jib/action.yaml index 7967509be..4c2749cc0 100644 --- a/actions/jib-uploader/action.yaml +++ b/actions/java-gradle-build-push-jib/action.yaml @@ -1,29 +1,29 @@ -name: "Build and upload Jib " -description: "Build the Jib image and upload it to the image repository" - -inputs: - image: - description: "The image name with its repository name" - required: true - tags: - description: "The tags to use to release the image" - required: true - class: - description: "The entrypoint class to be used for the image" - required: true - working-directory: - description: "working directory to run the commands" - required: true - -runs: - using: "composite" - steps: - - name: Build Docker image - run: | - ./gradlew jib \ - --info --stacktrace \ - --image=${{ inputs.image }} \ - -Djib.container.mainClass=${{ inputs.class }} \ - -Djib.to.tags=${{ inputs.tags }} - shell: bash - working-directory: ${{ inputs.working-directory }} +name: "Build and upload Jib " +description: "Build the Jib image and upload it to the image repository" + +inputs: + image: + description: "The image name with its repository name" + required: true + tags: + description: "The tags to use to release the image" + required: true + class: + description: "The entrypoint class to be used for the image" + required: true + working-directory: + description: "Working directory to run the commands" + required: true + +runs: + using: "composite" + steps: + - name: Build & push Docker image + run: | + ./gradlew jib \ + --info --stacktrace \ + --image=${{ inputs.image }} \ + -Djib.container.mainClass=${{ inputs.class }} \ + -Djib.to.tags=${{ inputs.tags }} + shell: bash + working-directory: ${{ inputs.working-directory }} diff --git a/docs/actions/jib-uploader/README.md b/docs/actions/java-gradle-build-push-jib/README.md similarity index 95% rename from docs/actions/jib-uploader/README.md rename to docs/actions/java-gradle-build-push-jib/README.md index 7e35d506b..ba9215c75 100644 --- a/docs/actions/jib-uploader/README.md +++ b/docs/actions/java-gradle-build-push-jib/README.md @@ -1,4 +1,4 @@ -# Description jib-uploader composite action +# Description java-gradle-build-push-jib composite action This composite action utilizes Jib to efficiently build a container image and automatically upload it to the referenced container repository. From 5b9df93b88d5aaeacc5e2ee0ec2626e127c4fce5 Mon Sep 17 00:00:00 2001 From: Alejandro Jaramillo Date: Tue, 30 Jan 2024 10:13:33 +0100 Subject: [PATCH 5/5] Implement changes --- .../java-gradle-build-push-jib/action.yaml | 58 +++++++++---------- .../java-gradle-build-push-jib/README.md | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/actions/java-gradle-build-push-jib/action.yaml b/actions/java-gradle-build-push-jib/action.yaml index 4c2749cc0..f699a5d02 100644 --- a/actions/java-gradle-build-push-jib/action.yaml +++ b/actions/java-gradle-build-push-jib/action.yaml @@ -1,29 +1,29 @@ -name: "Build and upload Jib " -description: "Build the Jib image and upload it to the image repository" - -inputs: - image: - description: "The image name with its repository name" - required: true - tags: - description: "The tags to use to release the image" - required: true - class: - description: "The entrypoint class to be used for the image" - required: true - working-directory: - description: "Working directory to run the commands" - required: true - -runs: - using: "composite" - steps: - - name: Build & push Docker image - run: | - ./gradlew jib \ - --info --stacktrace \ - --image=${{ inputs.image }} \ - -Djib.container.mainClass=${{ inputs.class }} \ - -Djib.to.tags=${{ inputs.tags }} - shell: bash - working-directory: ${{ inputs.working-directory }} +name: "Build and upload Jib " +description: "Build the Jib image and upload it to the image repository" + +inputs: + image: + description: "The image name with its repository name" + required: true + tags: + description: "The tags to use to release the image" + required: true + class: + description: "The entrypoint class to be used for the image" + required: true + working-directory: + description: "Working directory to run the commands" + required: true + +runs: + using: "composite" + steps: + - name: Build & push Docker image + run: | + ./gradlew jib \ + --info --stacktrace \ + --image=${{ inputs.image }} \ + -Djib.container.mainClass=${{ inputs.class }} \ + -Djib.to.tags=${{ inputs.tags }} + shell: bash + working-directory: ${{ inputs.working-directory }} diff --git a/docs/actions/java-gradle-build-push-jib/README.md b/docs/actions/java-gradle-build-push-jib/README.md index ba9215c75..20a02592a 100644 --- a/docs/actions/java-gradle-build-push-jib/README.md +++ b/docs/actions/java-gradle-build-push-jib/README.md @@ -25,7 +25,7 @@ This composite action utilizes Jib to efficiently build a container image and au | class | string | true | | The entrypoint class to be used for the image | | image | string | true | | The image name with its repository name | | tags | string | true | | The tags to use to release the image | -| working-directory | string | true | | working directory to run the commands | +| working-directory | string | true | | Working directory to run the commands |