diff --git a/.github/pipeline-descriptor.yml b/.github/pipeline-descriptor.yml index 2e78bc8..874387e 100644 --- a/.github/pipeline-descriptor.yml +++ b/.github/pipeline-descriptor.yml @@ -23,25 +23,12 @@ docker_credentials: password: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} dependencies: -- name: Tomcat 8 - id: tomcat - version_pattern: "8\\.[\\d]+\\.[\\d]+" - uses: docker://ghcr.io/paketo-buildpacks/actions/tomcat-dependency:main - with: - uri: https://archive.apache.org/dist/tomcat/tomcat-8 - name: Tomcat 9 id: tomcat version_pattern: "9\\.[\\d]+\\.[\\d]+" uses: docker://ghcr.io/paketo-buildpacks/actions/tomcat-dependency:main with: uri: https://archive.apache.org/dist/tomcat/tomcat-9 -- name: Tomcat 10 - id: tomcat - version_pattern: "10\\.0\\.[\\d]+" - uses: docker://ghcr.io/paketo-buildpacks/actions/tomcat-dependency:main - with: - uri: https://archive.apache.org/dist/tomcat/tomcat-10 - version_regex: "(10)\\.(0)\\.([\\d]+)" - name: Tomcat 10.1 id: tomcat version_pattern: "10\\.1\\.[\\d]+" diff --git a/.github/workflows/pb-update-tomcat-10.yml b/.github/workflows/pb-update-tomcat-10.yml deleted file mode 100644 index 2c66994..0000000 --- a/.github/workflows/pb-update-tomcat-10.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Update Tomcat 10 -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Buildpack Dependency - runs-on: - - ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.20" - - name: Install update-buildpack-dependency - run: | - #!/usr/bin/env bash - - set -euo pipefail - - go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest - - uses: buildpacks/github-actions/setup-tools@v5.5.3 - with: - crane-version: 0.19.0 - yj-version: 5.1.0 - - uses: actions/checkout@v4 - - id: dependency - uses: docker://ghcr.io/paketo-buildpacks/actions/tomcat-dependency:main - with: - uri: https://archive.apache.org/dist/tomcat/tomcat-10 - version_regex: (10)\.(0)\.([\d]+) - - name: Update Buildpack Dependency - id: buildpack - run: | - #!/usr/bin/env bash - - set -euo pipefail - - VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") - ARCH=${ARCH:-amd64} - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - - if [ -z "$OLD_VERSION" ]; then - ARCH="" # empty means noarch - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") - fi - - update-buildpack-dependency \ - --buildpack-toml buildpack.toml \ - --id "${ID}" \ - --arch "${ARCH}" \ - --version-pattern "${VERSION_PATTERN}" \ - --version "${VERSION}" \ - --cpe-pattern "${CPE_PATTERN:-}" \ - --cpe "${CPE:-}" \ - --purl-pattern "${PURL_PATTERN:-}" \ - --purl "${PURL:-}" \ - --uri "${URI}" \ - --sha256 "${SHA256}" \ - --source "${SOURCE_URI}" \ - --source-sha256 "${SOURCE_SHA256}" - - git add buildpack.toml - git checkout -- . - - if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then - LABEL="semver:major" - elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then - LABEL="semver:minor" - else - LABEL="semver:patch" - fi - - echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" - echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" - env: - ARCH: "" - CPE: ${{ steps.dependency.outputs.cpe }} - CPE_PATTERN: "" - ID: tomcat - PURL: ${{ steps.dependency.outputs.purl }} - PURL_PATTERN: "" - SHA256: ${{ steps.dependency.outputs.sha256 }} - SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} - SOURCE_URI: ${{ steps.dependency.outputs.source }} - URI: ${{ steps.dependency.outputs.uri }} - VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 10\.0\.[\d]+ - - uses: peter-evans/create-pull-request@v6 - with: - author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `Tomcat 10` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/tomcat-10 - commit-message: |- - Bump Tomcat 10 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps Tomcat 10 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. - delete-branch: true - labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade - signoff: true - title: Bump Tomcat 10 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/pb-update-tomcat-8.yml b/.github/workflows/pb-update-tomcat-8.yml deleted file mode 100644 index e123185..0000000 --- a/.github/workflows/pb-update-tomcat-8.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Update Tomcat 8 -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Buildpack Dependency - runs-on: - - ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.20" - - name: Install update-buildpack-dependency - run: | - #!/usr/bin/env bash - - set -euo pipefail - - go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest - - uses: buildpacks/github-actions/setup-tools@v5.5.3 - with: - crane-version: 0.19.0 - yj-version: 5.1.0 - - uses: actions/checkout@v4 - - id: dependency - uses: docker://ghcr.io/paketo-buildpacks/actions/tomcat-dependency:main - with: - uri: https://archive.apache.org/dist/tomcat/tomcat-8 - - name: Update Buildpack Dependency - id: buildpack - run: | - #!/usr/bin/env bash - - set -euo pipefail - - VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") - ARCH=${ARCH:-amd64} - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - - if [ -z "$OLD_VERSION" ]; then - ARCH="" # empty means noarch - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") - fi - - update-buildpack-dependency \ - --buildpack-toml buildpack.toml \ - --id "${ID}" \ - --arch "${ARCH}" \ - --version-pattern "${VERSION_PATTERN}" \ - --version "${VERSION}" \ - --cpe-pattern "${CPE_PATTERN:-}" \ - --cpe "${CPE:-}" \ - --purl-pattern "${PURL_PATTERN:-}" \ - --purl "${PURL:-}" \ - --uri "${URI}" \ - --sha256 "${SHA256}" \ - --source "${SOURCE_URI}" \ - --source-sha256 "${SOURCE_SHA256}" - - git add buildpack.toml - git checkout -- . - - if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then - LABEL="semver:major" - elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then - LABEL="semver:minor" - else - LABEL="semver:patch" - fi - - echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" - echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" - env: - ARCH: "" - CPE: ${{ steps.dependency.outputs.cpe }} - CPE_PATTERN: "" - ID: tomcat - PURL: ${{ steps.dependency.outputs.purl }} - PURL_PATTERN: "" - SHA256: ${{ steps.dependency.outputs.sha256 }} - SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} - SOURCE_URI: ${{ steps.dependency.outputs.source }} - URI: ${{ steps.dependency.outputs.uri }} - VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 8\.[\d]+\.[\d]+ - - uses: peter-evans/create-pull-request@v6 - with: - author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `Tomcat 8` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/tomcat-8 - commit-message: |- - Bump Tomcat 8 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps Tomcat 8 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. - delete-branch: true - labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade - signoff: true - title: Bump Tomcat 8 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} diff --git a/buildpack.toml b/buildpack.toml index 6e54d5f..dd6cc37 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -80,22 +80,6 @@ api = "0.7" description = "the Tomcat version" name = "BP_TOMCAT_VERSION" - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:apache:tomcat:8.5.100:*:*:*:*:*:*:*"] - id = "tomcat" - name = "Apache Tomcat" - purl = "pkg:generic/apache-tomcat@8.5.100" - sha256 = "163abe51289dd09dc375791888d6f2d5508c06050548dc4fc7700251f4bebaca" - source = "https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.100/src/apache-tomcat-8.5.100-src.tar.gz" - source-sha256 = "818815f612002b6b6a255b80e6b157096f352d9c5c4f73c77aefbbe305ce86cf" - stacks = ["*"] - uri = "https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.100/bin/apache-tomcat-8.5.100.tar.gz" - version = "8.5.100" - - [[metadata.dependencies.licenses]] - type = "Apache-2.0" - uri = "https://www.apache.org/licenses/" - [[metadata.dependencies]] cpes = ["cpe:2.3:a:apache:tomcat:9.0.89:*:*:*:*:*:*:*"] id = "tomcat" @@ -112,22 +96,6 @@ api = "0.7" type = "Apache-2.0" uri = "https://www.apache.org/licenses/" - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:apache:tomcat:10.0.27:*:*:*:*:*:*:*"] - id = "tomcat" - name = "Apache Tomcat" - purl = "pkg:generic/apache-tomcat@10.0.27" - sha256 = "3766ad98e76156b1b1f3c79739cf56ce2abc927ec85b34de1721698abff91cb7" - source = "https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.27/src/apache-tomcat-10.0.27-src.tar.gz" - source-sha256 = "bff23db976c652391e92a046caeac8e834d0c829fb88f6ba80dfd504e33a8f62" - stacks = ["*"] - uri = "https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.27/bin/apache-tomcat-10.0.27.tar.gz" - version = "10.0.27" - - [[metadata.dependencies.licenses]] - type = "Apache-2.0" - uri = "https://www.apache.org/licenses/" - [[metadata.dependencies]] cpes = ["cpe:2.3:a:apache:tomcat:10.1.24:*:*:*:*:*:*:*"] id = "tomcat"