Skip to content

Commit

Permalink
Merge pull request #575 from paketo-buildpacks/update/pipeline
Browse files Browse the repository at this point in the history
Bump pipeline from 1.37.1 to 1.37.2
  • Loading branch information
anthonydahanne committed Mar 26, 2024
2 parents c46fd71 + ab9d0b3 commit 0035404
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/pipeline-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.37.1
1.37.2
17 changes: 14 additions & 3 deletions .github/workflows/pb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,20 @@ jobs:
set -euo pipefail
go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest
- uses: buildpacks/github-actions/setup-pack@v5.5.3
with:
pack-version: 0.33.2
- name: Install pack
run: |
#!/usr/bin/env bash
# this is coming from a copy of https://github.com/buildpacks/pack/actions/runs/8118576298 stored on box
# TODO to revisit when the official one is out
set -euo pipefail
echo "Installing pack experimental"
mkdir -p "${HOME}"/bin
echo "${HOME}/bin" >> "${GITHUB_PATH}"
curl -L "https://ent.box.com/shared/static/j4d1bfe9uk1sb0i7zjvci0md9xmy41u4" -o ${HOME}/bin/pack
chmod +x "${HOME}"/bin/pack
- name: Enable pack Experimental
if: ${{ false }}
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.

bin/
linux/
dependencies/
package/
scratch/

10 changes: 9 additions & 1 deletion buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ api = "0.7"
type = "Apache-2.0"
uri = "https://github.com/paketo-buildpacks/bellsoft-liberica/blob/main/LICENSE"

[[targets]]
os = "linux"
arch = "amd64"

[[targets]]
os = "linux"
arch = "arm64"

[metadata]
include-files = ["LICENSE", "NOTICE", "README.md", "bin/build", "bin/detect", "bin/helper", "bin/main", "buildpack.toml"]
include-files = ["LICENSE", "NOTICE", "README.md", "linux/amd64/bin/build", "linux/amd64/bin/detect", "linux/amd64/bin/main", "linux/amd64/bin/helper", "linux/arm64/bin/build", "linux/arm64/bin/detect", "linux/arm64/bin/main", "linux/arm64/bin/helper", "buildpack.toml"]
pre-package = "scripts/build.sh"

[[metadata.configurations]]
Expand Down
20 changes: 13 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#!/usr/bin/env bash

set -euo pipefail

GOOS="linux" go build -ldflags='-s -w' -o bin/helper github.com/paketo-buildpacks/libjvm/cmd/helper
GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/bellsoft-liberica/v9/cmd/main
GOMOD=$(head -1 go.mod | awk '{print $2}')
GOOS="linux" go build -ldflags='-s -w' -o "linux/amd64/bin/helper" "github.com/paketo-buildpacks/libjvm/cmd/helper"
GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o "linux/arm64/bin/helper" "github.com/paketo-buildpacks/libjvm/cmd/helper"
GOOS="linux" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main"
GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main "$GOMOD/cmd/main"

if [ "${STRIP:-false}" != "false" ]; then
strip bin/helper bin/main
strip linux/amd64/bin/helper linux/arm64/bin/helper
strip linux/amd64/bin/main linux/arm64/bin/main
fi

if [ "${COMPRESS:-none}" != "none" ]; then
$COMPRESS bin/helper bin/main
$COMPRESS linux/amd64/bin/helper linux/arm64/bin/helper
$COMPRESS linux/amd64/bin/main linux/arm64/bin/main
fi

ln -fs main bin/build
ln -fs main bin/detect
ln -fs main linux/amd64/bin/build
ln -fs main linux/arm64/bin/build
ln -fs main linux/amd64/bin/detect
ln -fs main linux/arm64/bin/detect

0 comments on commit 0035404

Please sign in to comment.