From ba20a5b656c5c1720592a9139be6d0a711b8cdfa Mon Sep 17 00:00:00 2001 From: nebhale Date: Wed, 4 Nov 2020 00:30:29 +0000 Subject: [PATCH] Bump pipeline from 1.4.0 to 1.5.2 Bumps pipeline from 1.4.0 to 1.5.2. Signed-off-by: GitHub --- .github/pipeline-version | 2 +- .github/workflows/create-package.yml | 47 ++++++++++++++-------- .github/workflows/synchronize-labels.yml | 2 +- .github/workflows/tests.yml | 43 +++++++++++++------- .github/workflows/update-draft-release.yml | 22 +++++----- .github/workflows/update-pipeline.yml | 2 +- 6 files changed, 76 insertions(+), 42 deletions(-) diff --git a/.github/pipeline-version b/.github/pipeline-version index 88c5fb8..4cda8f1 100644 --- a/.github/pipeline-version +++ b/.github/pipeline-version @@ -1 +1 @@ -1.4.0 +1.5.2 diff --git a/.github/workflows/create-package.yml b/.github/workflows/create-package.yml index 5725bfa..55156b9 100644 --- a/.github/workflows/create-package.yml +++ b/.github/workflows/create-package.yml @@ -16,38 +16,43 @@ jobs: password: ${{ secrets.JAVA_GCLOUD_SERVICE_ACCOUNT_KEY }} registry: gcr.io username: _json_key - - uses: actions/checkout@v2 - - if: ${{ false }} - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-go-${{ hashFiles('**/buildpack.toml', '**/package.toml') }} - path: |- - ${{ env.HOME }}/.pack - ${{ env.HOME }}/carton-cache - restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v2 with: go-version: "1.15" - - name: Install crane + - name: Install create-package 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 create-package + GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package + - name: Install crane run: | #!/usr/bin/env bash set -euo pipefail - GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package + echo "Installing crane ${CRANE_VERSION}" + + mkdir -p "${HOME}"/bin + echo "${HOME}/bin" >> "${GITHUB_PATH}" + + curl \ + --show-error \ + --silent \ + --location \ + "https://github.com/google/go-containerregistry/releases/download/v${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz" \ + | tar -C "${HOME}/bin" -xz crane + env: + CRANE_VERSION: 0.1.4 - name: Install pack run: | #!/usr/bin/env bash set -euo pipefail + echo "Installing pack ${PACK_VERSION}" + mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" @@ -56,9 +61,18 @@ jobs: --show-error \ --silent \ "https://github.com/buildpacks/pack/releases/download/v${PACK_VERSION}/pack-v${PACK_VERSION}-linux.tgz" \ - | tar -C "${HOME}"/bin/ -xzv pack + | tar -C "${HOME}"/bin -xz pack env: - PACK_VERSION: 0.14.1 + PACK_VERSION: 0.14.2 + - uses: actions/checkout@v2 + - if: ${{ false }} + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-go-${{ hashFiles('**/buildpack.toml', '**/package.toml') }} + path: |- + ${{ env.HOME }}/.pack + ${{ env.HOME }}/carton-cache + restore-keys: ${{ runner.os }}-go- - id: version name: Compute Version run: | @@ -115,6 +129,7 @@ jobs: --config "${HOME}"/package.toml \ --publish + crane tag "${PACKAGE}:${VERSION}" latest echo "::set-output name=digest::$(crane digest "${PACKAGE}:${VERSION}")" else pack package-buildpack \ @@ -146,7 +161,7 @@ jobs: --field "body=${RELEASE_BODY///\`${DIGEST}\`}" env: DIGEST: ${{ steps.package.outputs.digest }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.JAVA_GITHUB_TOKEN }} - uses: docker://ghcr.io/buildpacks/actions/registry:main with: address: gcr.io/paketo-buildpacks/debug@${{ steps.package.outputs.digest }} diff --git a/.github/workflows/synchronize-labels.yml b/.github/workflows/synchronize-labels.yml index 598e7ad..ce69fdf 100644 --- a/.github/workflows/synchronize-labels.yml +++ b/.github/workflows/synchronize-labels.yml @@ -14,4 +14,4 @@ jobs: - uses: actions/checkout@v2 - uses: micnncim/action-label-syncer@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.JAVA_GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2342975..439fb49 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,17 +17,6 @@ jobs: password: ${{ secrets.JAVA_GCLOUD_SERVICE_ACCOUNT_KEY }} registry: gcr.io username: _json_key - - uses: actions/checkout@v2 - - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-go-${{ hashFiles('**/buildpack.toml', '**/package.toml') }} - path: |- - ${{ env.HOME }}/.pack - ${{ env.HOME }}/carton-cache - restore-keys: ${{ runner.os }}-go- - - uses: actions/setup-go@v2 - with: - go-version: "1.15" - name: Install create-package run: | #!/usr/bin/env bash @@ -41,6 +30,8 @@ jobs: set -euo pipefail + echo "Installing pack ${PACK_VERSION}" + mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" @@ -49,9 +40,20 @@ jobs: --show-error \ --silent \ "https://github.com/buildpacks/pack/releases/download/v${PACK_VERSION}/pack-v${PACK_VERSION}-linux.tgz" \ - | tar -C "${HOME}"/bin/ -xzv pack + | tar -C "${HOME}"/bin -xz pack env: - PACK_VERSION: 0.14.1 + PACK_VERSION: 0.14.2 + - uses: actions/setup-go@v2 + with: + go-version: "1.15" + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + key: ${{ runner.os }}-go-${{ hashFiles('**/buildpack.toml', '**/package.toml') }} + path: |- + ${{ env.HOME }}/.pack + ${{ env.HOME }}/carton-cache + restore-keys: ${{ runner.os }}-go- - id: version name: Compute Version run: | @@ -107,6 +109,7 @@ jobs: --config "${HOME}"/package.toml \ --publish + crane tag "${PACKAGE}:${VERSION}" latest echo "::set-output name=digest::$(crane digest "${PACKAGE}:${VERSION}")" else pack package-buildpack \ @@ -136,7 +139,19 @@ jobs: set -euo pipefail - GO111MODULE=on go get -u -ldflags="-s -w" github.com/kyoh86/richgo + echo "Installing richgo ${RICHGO_VERSION}" + + mkdir -p "${HOME}"/bin + echo "${HOME}/bin" >> "${GITHUB_PATH}" + + curl \ + --location \ + --show-error \ + --silent \ + "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ + | tar -C "${HOME}"/bin -xz richgo + env: + RICHGO_VERSION: 0.3.3 - name: Run Tests run: | #!/usr/bin/env bash diff --git a/.github/workflows/update-draft-release.yml b/.github/workflows/update-draft-release.yml index 5a09950..143b691 100644 --- a/.github/workflows/update-draft-release.yml +++ b/.github/workflows/update-draft-release.yml @@ -12,14 +12,15 @@ jobs: - id: release-drafter uses: release-drafter/release-drafter@v5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v2 + GITHUB_TOKEN: ${{ secrets.JAVA_GITHUB_TOKEN }} - name: Install yj run: | #!/usr/bin/env bash set -euo pipefail + echo "Installing yj ${YJ_VERSION}" + mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" @@ -33,6 +34,7 @@ jobs: chmod +x "${HOME}"/bin/yj env: YJ_VERSION: 5.0.0 + - uses: actions/checkout@v2 - name: Update draft release with buildpack information run: | #!/usr/bin/env bash @@ -69,12 +71,14 @@ jobs: done fi - while IFS= read -r -d '' FILE; do - PAYLOAD=$(jq -n -r \ - --argjson PAYLOAD "${PAYLOAD}" \ - --argjson BUILDPACK "$(yj -tj < "${FILE}")" \ - '$PAYLOAD | .buildpacks += [ $BUILDPACK ]') - done < <(find buildpacks -name buildpack.toml -print0) + if [[ -d buildpacks ]]; then + while IFS= read -r -d '' FILE; do + PAYLOAD=$(jq -n -r \ + --argjson PAYLOAD "${PAYLOAD}" \ + --argjson BUILDPACK "$(yj -tj < "${FILE}")" \ + '$PAYLOAD | .buildpacks += [ $BUILDPACK ]') + done < <(find buildpacks -name buildpack.toml -print0) + fi jq -n -r \ --argjson PAYLOAD "${PAYLOAD}" \ @@ -180,7 +184,7 @@ jobs: --field "name=@${HOME}/name" \ --field "body=@${HOME}/body" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.JAVA_GITHUB_TOKEN }} RELEASE_BODY: ${{ steps.release-drafter.outputs.body }} RELEASE_ID: ${{ steps.release-drafter.outputs.id }} RELEASE_NAME: ${{ steps.release-drafter.outputs.name }} diff --git a/.github/workflows/update-pipeline.yml b/.github/workflows/update-pipeline.yml index 89905db..6efd602 100644 --- a/.github/workflows/update-pipeline.yml +++ b/.github/workflows/update-pipeline.yml @@ -9,7 +9,6 @@ jobs: runs-on: - ubuntu-latest steps: - - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: go-version: "1.15" @@ -20,6 +19,7 @@ jobs: set -euo pipefail GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/pipeline-builder/cmd/octo + - uses: actions/checkout@v2 - id: pipeline name: Update Pipeline run: |