Skip to content

Commit

Permalink
Merge pull request #2 from paketo-buildpacks/package-dependencies
Browse files Browse the repository at this point in the history
Package Dependencies

Signed-off-by: Ben Hale <bhale@vmware.com>
  • Loading branch information
nebhale authored Oct 3, 2020
2 parents 345e20e + 90ed23f commit 0d95553
Show file tree
Hide file tree
Showing 17 changed files with 1,393 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/update-apache-tomcat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Update apache-tomcat
"on":
schedule:
- cron: 0 * * * *
workflow_dispatch: {}
jobs:
update:
name: Update Package Dependency
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15"
- name: Install crane
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/google/go-containerregistry/cmd/crane
- name: Install yj
run: |
#!/usr/bin/env bash
set -euo pipefail
mkdir -p "${HOME}"/bin
echo "::add-path::${HOME}/bin"
curl \
--location \
--show-error \
--silent \
--output "${HOME}"/bin/yj \
"https://github.com/sclevine/yj/releases/download/v${YJ_VERSION}/yj-linux"
chmod +x "${HOME}"/bin/yj
env:
YJ_VERSION: 5.0.0
- name: Install update-package-dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-package-dependency
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.JAVA_GCLOUD_SERVICE_ACCOUNT_KEY }}
- name: Configure gcloud docker credentials
run: gcloud auth configure-docker
- id: package
name: Update Package Dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
OLD_VERSION=$(yj -tj < package.toml | jq -r ".dependencies[].image | select(. | startswith(\"${DEPENDENCY}\"))")
OLD_VERSION=${OLD_VERSION#*:}
NEW_VERSION=$(crane ls "${DEPENDENCY}" | grep -v latest | sort -V | tail -n1)
update-package-dependency \
--buildpack-toml buildpack.toml \
--package-toml package.toml \
--id "${DEPENDENCY}" \
--version "${NEW_VERSION}"
echo "::set-output name=old-version::${OLD_VERSION}"
echo "::set-output name=new-version::${NEW_VERSION}"
env:
DEPENDENCY: gcr.io/paketo-buildpacks/apache-tomcat
- uses: peter-evans/create-pull-request@v3
with:
body: Bumps [`gcr.io/paketo-buildpacks/apache-tomcat`](https://gcr.io/paketo-buildpacks/apache-tomcat) from [`${{ steps.package.outputs.old-version }}`](https://gcr.io/paketo-buildpacks/apache-tomcat:${{ steps.package.outputs.old-version }}) to [`${{ steps.package.outputs.new-version }}`](https://gcr.io/paketo-buildpacks/apache-tomcat:${{ steps.package.outputs.new-version }}).
branch: update-package/apache-tomcat
commit-message: |-
Bump gcr.io/paketo-buildpacks/apache-tomcat from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
Bumps gcr.io/paketo-buildpacks/apache-tomcat from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}.
delete-branch: true
labels: semver:minor, type:dependency-upgrade
signoff: true
title: Bump gcr.io/paketo-buildpacks/apache-tomcat from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
token: ${{ secrets.GITHUB_TOKEN }}
87 changes: 87 additions & 0 deletions .github/workflows/update-azul-zulu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Update azul-zulu
"on":
schedule:
- cron: 0 * * * *
workflow_dispatch: {}
jobs:
update:
name: Update Package Dependency
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15"
- name: Install crane
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/google/go-containerregistry/cmd/crane
- name: Install yj
run: |
#!/usr/bin/env bash
set -euo pipefail
mkdir -p "${HOME}"/bin
echo "::add-path::${HOME}/bin"
curl \
--location \
--show-error \
--silent \
--output "${HOME}"/bin/yj \
"https://github.com/sclevine/yj/releases/download/v${YJ_VERSION}/yj-linux"
chmod +x "${HOME}"/bin/yj
env:
YJ_VERSION: 5.0.0
- name: Install update-package-dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-package-dependency
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.JAVA_GCLOUD_SERVICE_ACCOUNT_KEY }}
- name: Configure gcloud docker credentials
run: gcloud auth configure-docker
- id: package
name: Update Package Dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
OLD_VERSION=$(yj -tj < package.toml | jq -r ".dependencies[].image | select(. | startswith(\"${DEPENDENCY}\"))")
OLD_VERSION=${OLD_VERSION#*:}
NEW_VERSION=$(crane ls "${DEPENDENCY}" | grep -v latest | sort -V | tail -n1)
update-package-dependency \
--buildpack-toml buildpack.toml \
--package-toml package.toml \
--id "${DEPENDENCY}" \
--version "${NEW_VERSION}"
echo "::set-output name=old-version::${OLD_VERSION}"
echo "::set-output name=new-version::${NEW_VERSION}"
env:
DEPENDENCY: gcr.io/paketo-buildpacks/azul-zulu
- uses: peter-evans/create-pull-request@v3
with:
body: Bumps [`gcr.io/paketo-buildpacks/azul-zulu`](https://gcr.io/paketo-buildpacks/azul-zulu) from [`${{ steps.package.outputs.old-version }}`](https://gcr.io/paketo-buildpacks/azul-zulu:${{ steps.package.outputs.old-version }}) to [`${{ steps.package.outputs.new-version }}`](https://gcr.io/paketo-buildpacks/azul-zulu:${{ steps.package.outputs.new-version }}).
branch: update-package/azul-zulu
commit-message: |-
Bump gcr.io/paketo-buildpacks/azul-zulu from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
Bumps gcr.io/paketo-buildpacks/azul-zulu from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}.
delete-branch: true
labels: semver:minor, type:dependency-upgrade
signoff: true
title: Bump gcr.io/paketo-buildpacks/azul-zulu from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
token: ${{ secrets.GITHUB_TOKEN }}
87 changes: 87 additions & 0 deletions .github/workflows/update-azure-application-insights.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Update azure-application-insights
"on":
schedule:
- cron: 0 * * * *
workflow_dispatch: {}
jobs:
update:
name: Update Package Dependency
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15"
- name: Install crane
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/google/go-containerregistry/cmd/crane
- name: Install yj
run: |
#!/usr/bin/env bash
set -euo pipefail
mkdir -p "${HOME}"/bin
echo "::add-path::${HOME}/bin"
curl \
--location \
--show-error \
--silent \
--output "${HOME}"/bin/yj \
"https://github.com/sclevine/yj/releases/download/v${YJ_VERSION}/yj-linux"
chmod +x "${HOME}"/bin/yj
env:
YJ_VERSION: 5.0.0
- name: Install update-package-dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-package-dependency
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.JAVA_GCLOUD_SERVICE_ACCOUNT_KEY }}
- name: Configure gcloud docker credentials
run: gcloud auth configure-docker
- id: package
name: Update Package Dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
OLD_VERSION=$(yj -tj < package.toml | jq -r ".dependencies[].image | select(. | startswith(\"${DEPENDENCY}\"))")
OLD_VERSION=${OLD_VERSION#*:}
NEW_VERSION=$(crane ls "${DEPENDENCY}" | grep -v latest | sort -V | tail -n1)
update-package-dependency \
--buildpack-toml buildpack.toml \
--package-toml package.toml \
--id "${DEPENDENCY}" \
--version "${NEW_VERSION}"
echo "::set-output name=old-version::${OLD_VERSION}"
echo "::set-output name=new-version::${NEW_VERSION}"
env:
DEPENDENCY: gcr.io/paketo-buildpacks/azure-application-insights
- uses: peter-evans/create-pull-request@v3
with:
body: Bumps [`gcr.io/paketo-buildpacks/azure-application-insights`](https://gcr.io/paketo-buildpacks/azure-application-insights) from [`${{ steps.package.outputs.old-version }}`](https://gcr.io/paketo-buildpacks/azure-application-insights:${{ steps.package.outputs.old-version }}) to [`${{ steps.package.outputs.new-version }}`](https://gcr.io/paketo-buildpacks/azure-application-insights:${{ steps.package.outputs.new-version }}).
branch: update-package/azure-application-insights
commit-message: |-
Bump gcr.io/paketo-buildpacks/azure-application-insights from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
Bumps gcr.io/paketo-buildpacks/azure-application-insights from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}.
delete-branch: true
labels: semver:minor, type:dependency-upgrade
signoff: true
title: Bump gcr.io/paketo-buildpacks/azure-application-insights from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
token: ${{ secrets.GITHUB_TOKEN }}
87 changes: 87 additions & 0 deletions .github/workflows/update-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Update debug
"on":
schedule:
- cron: 0 * * * *
workflow_dispatch: {}
jobs:
update:
name: Update Package Dependency
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15"
- name: Install crane
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/google/go-containerregistry/cmd/crane
- name: Install yj
run: |
#!/usr/bin/env bash
set -euo pipefail
mkdir -p "${HOME}"/bin
echo "::add-path::${HOME}/bin"
curl \
--location \
--show-error \
--silent \
--output "${HOME}"/bin/yj \
"https://github.com/sclevine/yj/releases/download/v${YJ_VERSION}/yj-linux"
chmod +x "${HOME}"/bin/yj
env:
YJ_VERSION: 5.0.0
- name: Install update-package-dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-package-dependency
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.JAVA_GCLOUD_SERVICE_ACCOUNT_KEY }}
- name: Configure gcloud docker credentials
run: gcloud auth configure-docker
- id: package
name: Update Package Dependency
run: |
#!/usr/bin/env bash
set -euo pipefail
OLD_VERSION=$(yj -tj < package.toml | jq -r ".dependencies[].image | select(. | startswith(\"${DEPENDENCY}\"))")
OLD_VERSION=${OLD_VERSION#*:}
NEW_VERSION=$(crane ls "${DEPENDENCY}" | grep -v latest | sort -V | tail -n1)
update-package-dependency \
--buildpack-toml buildpack.toml \
--package-toml package.toml \
--id "${DEPENDENCY}" \
--version "${NEW_VERSION}"
echo "::set-output name=old-version::${OLD_VERSION}"
echo "::set-output name=new-version::${NEW_VERSION}"
env:
DEPENDENCY: gcr.io/paketo-buildpacks/debug
- uses: peter-evans/create-pull-request@v3
with:
body: Bumps [`gcr.io/paketo-buildpacks/debug`](https://gcr.io/paketo-buildpacks/debug) from [`${{ steps.package.outputs.old-version }}`](https://gcr.io/paketo-buildpacks/debug:${{ steps.package.outputs.old-version }}) to [`${{ steps.package.outputs.new-version }}`](https://gcr.io/paketo-buildpacks/debug:${{ steps.package.outputs.new-version }}).
branch: update-package/debug
commit-message: |-
Bump gcr.io/paketo-buildpacks/debug from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
Bumps gcr.io/paketo-buildpacks/debug from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}.
delete-branch: true
labels: semver:minor, type:dependency-upgrade
signoff: true
title: Bump gcr.io/paketo-buildpacks/debug from ${{ steps.package.outputs.old-version }} to ${{ steps.package.outputs.new-version }}
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 0d95553

Please sign in to comment.