From 4e6f2bb12cf1dfd7f6b81270e252167298af60fc Mon Sep 17 00:00:00 2001 From: Tim Hess Date: Mon, 24 Feb 2025 08:10:25 -0600 Subject: [PATCH 1/2] bump UAA and Spring Boot Admin --- spring-boot-admin/Dockerfile | 4 ++-- spring-boot-admin/metadata/IMAGE_VERSION | 2 +- uaa-server/Dockerfile | 6 +++--- uaa-server/README.md | 10 ++++++++-- uaa-server/metadata/ADDITIONAL_TAGS | 2 +- uaa-server/metadata/IMAGE_VERSION | 2 +- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/spring-boot-admin/Dockerfile b/spring-boot-admin/Dockerfile index 9496c2f..b57e560 100644 --- a/spring-boot-admin/Dockerfile +++ b/spring-boot-admin/Dockerfile @@ -9,14 +9,14 @@ WORKDIR /scratch RUN apk update && apk add ca-certificates && apk add curl && apk add patch RUN curl https://start.spring.io/starter.zip \ -d type=gradle-project \ - -d bootVersion=3.4.1 \ + -d bootVersion=3.4.3 \ -d javaVersion=$JVM \ -d groupId=io.steeltoe.docker \ -d artifactId=springbootadmin \ -d applicationName=SpringBootAdmin \ -d language=java \ -d dependencies=codecentric-spring-boot-admin-server \ - -d version=3.4.1 \ + -d version=3.4.3 \ --output springbootadmin.zip RUN mkdir springbootadmin && unzip -d springbootadmin springbootadmin.zip COPY metadata metadata diff --git a/spring-boot-admin/metadata/IMAGE_VERSION b/spring-boot-admin/metadata/IMAGE_VERSION index 47b322c..6cb9d3d 100644 --- a/spring-boot-admin/metadata/IMAGE_VERSION +++ b/spring-boot-admin/metadata/IMAGE_VERSION @@ -1 +1 @@ -3.4.1 +3.4.3 diff --git a/uaa-server/Dockerfile b/uaa-server/Dockerfile index b73204f..f8d3fab 100644 --- a/uaa-server/Dockerfile +++ b/uaa-server/Dockerfile @@ -2,9 +2,9 @@ # UAA Server Build # ----------------------------------------------------------------------------- -FROM cloudfoundry/uaa:77.10.0 +FROM cloudfoundry/uaa:77.20.0 COPY uaa.yml /uaa/uaa.yml COPY log4j2.properties /uaa/log4j2.properties -ENV CLOUDFOUNDRY_CONFIG_PATH /uaa -ENV SPRING_PROFILES hsql,default +ENV CLOUDFOUNDRY_CONFIG_PATH=/uaa +ENV SPRING_PROFILES=hsql,default EXPOSE 8080 diff --git a/uaa-server/README.md b/uaa-server/README.md index fda19bc..5bd6e0a 100644 --- a/uaa-server/README.md +++ b/uaa-server/README.md @@ -7,7 +7,13 @@ This directory contains resources for building a [CloudFoundry User Account and To run this image locally: ```shell -docker run -it -p 8080:8080 --name steeltoe-uaa steeltoe.azurecr.io/uaa-server:77.10 +docker run -it -p 8080:8080 --name steeltoe-uaa steeltoe.azurecr.io/uaa-server:77 +``` + +To run this image locally, overwriting the included `uaa.yml` file: + +```shell +docker run -it -p 8080:8080 --name steeltoe-uaa -v $pwd/uaa.yml:/uaa/uaa.yml steeltoe.azurecr.io/uaa-server:77 ``` ## Customizing for your Cloud Foundry environment @@ -21,6 +27,6 @@ These instructions will help you build and deploy a custom image to use as an id 1. `.\build.ps1 uaa-server`. 1. Push the image to an image repository accessible from your Cloud Foundry environment. 1. Deploy the image with a command similar to this: - * `cf push steeltoe-uaa --docker-image steeltoe.azurecr.io/uaa-server:77.10` + * `cf push steeltoe-uaa --docker-image steeltoe.azurecr.io/uaa-server:77` 1. (Operator task) [Add the new identity provider with OpenID Connect](https://docs.vmware.com/en/Single-Sign-On-for-VMware-Tanzu-Application-Service/1.14/sso/GUID-configure-external-id.html#config-ext-oidc) * Use the `ssotile` credentials from uaa.yml diff --git a/uaa-server/metadata/ADDITIONAL_TAGS b/uaa-server/metadata/ADDITIONAL_TAGS index d4bb72b..7fb4c72 100644 --- a/uaa-server/metadata/ADDITIONAL_TAGS +++ b/uaa-server/metadata/ADDITIONAL_TAGS @@ -1 +1 @@ --t uaa-server:77.10 -t uaa-server:77 +-t uaa-server:77.20 -t uaa-server:77 diff --git a/uaa-server/metadata/IMAGE_VERSION b/uaa-server/metadata/IMAGE_VERSION index 6bdac7f..09d9d34 100644 --- a/uaa-server/metadata/IMAGE_VERSION +++ b/uaa-server/metadata/IMAGE_VERSION @@ -1 +1 @@ -77.10.0 +77.20.0 From 8e6e5c76af3a2615bd4bee869b57c72f628a3845 Mon Sep 17 00:00:00 2001 From: Tim Hess Date: Mon, 24 Feb 2025 10:26:27 -0600 Subject: [PATCH 2/2] Add comment(s) on PR with command(s) for running image(s) built for PR --- .github/workflows/build_config_server.yaml | 15 +++++++++++++++ .github/workflows/build_eureka_server.yaml | 15 +++++++++++++++ .../workflows/build_springboot_admin_server.yaml | 15 +++++++++++++++ .github/workflows/build_uaa_server.yaml | 15 +++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/.github/workflows/build_config_server.yaml b/.github/workflows/build_config_server.yaml index f810722..42ab0c9 100644 --- a/.github/workflows/build_config_server.yaml +++ b/.github/workflows/build_config_server.yaml @@ -20,6 +20,7 @@ concurrency: permissions: contents: read + pull-requests: 'write' env: IMAGE_NAME: config-server @@ -47,3 +48,17 @@ jobs: - name: Push image run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - uses: actions/github-script@v7 + if: ${{ github.event_name == 'pull_request' }} + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `To run the Spring Cloud Config Server image built for this pull request: + \`\`\`bash + docker run --rm -d --pull=always -p 8888:8888 --name config-pr steeltoe.azurecr.io/config-server:pr-${{ github.event.number }} + \`\`\`` + }) diff --git a/.github/workflows/build_eureka_server.yaml b/.github/workflows/build_eureka_server.yaml index 9862aed..9bd63fb 100644 --- a/.github/workflows/build_eureka_server.yaml +++ b/.github/workflows/build_eureka_server.yaml @@ -20,6 +20,7 @@ concurrency: permissions: contents: read + pull-requests: 'write' env: IMAGE_NAME: eureka-server @@ -47,3 +48,17 @@ jobs: - name: Push image run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - uses: actions/github-script@v7 + if: ${{ github.event_name == 'pull_request' }} + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `To run the Eureka server image built for this pull request: + \`\`\`bash + docker run --rm -d --pull=always -p 8761:8761 --name eureka-pr steeltoe.azurecr.io/eureka-server:pr-${{ github.event.number }} + \`\`\`` + }) diff --git a/.github/workflows/build_springboot_admin_server.yaml b/.github/workflows/build_springboot_admin_server.yaml index f9600bd..9791f64 100644 --- a/.github/workflows/build_springboot_admin_server.yaml +++ b/.github/workflows/build_springboot_admin_server.yaml @@ -20,6 +20,7 @@ concurrency: permissions: contents: read + pull-requests: 'write' env: IMAGE_NAME: spring-boot-admin @@ -47,3 +48,17 @@ jobs: - name: Push image run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - uses: actions/github-script@v7 + if: ${{ github.event_name == 'pull_request' }} + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `To run the Spring Boot Admin server image built for this pull request: + \`\`\`bash + docker run --rm -d --pull=always -p 9099:9099 --name sba-pr steeltoe.azurecr.io/spring-boot-admin:pr-${{ github.event.number }} + \`\`\`` + }) diff --git a/.github/workflows/build_uaa_server.yaml b/.github/workflows/build_uaa_server.yaml index 83855b9..a90f482 100644 --- a/.github/workflows/build_uaa_server.yaml +++ b/.github/workflows/build_uaa_server.yaml @@ -20,6 +20,7 @@ concurrency: permissions: contents: read + pull-requests: 'write' env: IMAGE_NAME: uaa-server @@ -47,3 +48,17 @@ jobs: - name: Push image run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - uses: actions/github-script@v7 + if: ${{ github.event_name == 'pull_request' }} + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `To run the UAA server image built for this pull request: + \`\`\`bash + docker run --rm -d --pull=always -p 8080:8080 --name uaa-pr steeltoe.azurecr.io/uaa-server:pr-${{ github.event.number }} + \`\`\`` + })