From 0f98559abe9ddad43b2323c5c7a5f7aa70d5d35e Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 28 Mar 2024 02:55:16 +0000 Subject: [PATCH 1/3] Bump pipeline from 1.37.2 to 1.37.2 Bumps pipeline from 1.37.2 to 1.37.2. Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .gitignore | 4 +++- scripts/build.sh | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b90fc75..2f65ee4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# Copyright 2018-2022 the original author or authors. +# Copyright 2018-2020 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +13,8 @@ # limitations under the License. bin/ +linux/ dependencies/ package/ scratch/ + diff --git a/scripts/build.sh b/scripts/build.sh index 01db032..dc48240 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,17 +1,19 @@ #!/usr/bin/env bash - set -euo pipefail -GOOS="linux" go build -ldflags='-s -w' -o bin/helper github.com/paketo-buildpacks/datadog/cmd/helper -GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/datadog/cmd/main +GOMOD=$(head -1 go.mod | awk '{print $2}') +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/main + strip linux/amd64/bin/main linux/arm64/bin/main fi if [ "${COMPRESS:-none}" != "none" ]; then - $COMPRESS bin/main + $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 \ No newline at end of file From f826633e25ff6c6c39769454150b4c91b4f2bc77 Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Fri, 15 Mar 2024 22:26:23 +0000 Subject: [PATCH 2/3] Add dualarch configuration --- buildpack.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/buildpack.toml b/buildpack.toml index 121126e..d614d08 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -27,8 +27,16 @@ api = "0.7" type = "Apache-2.0" uri = "https://github.com/paketo-buildpacks/maven/blob/main/LICENSE" +[[targets]] +os = "linux" +arch = "amd64" + +[[targets]] +os = "linux" +arch = "arm64" + [metadata] - include-files = ["LICENSE", "README.md", "bin/build", "bin/detect", "bin/main", "bin/helper", "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]] From 47938436f249a09351cec09c4022bd98c12a7acd Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Wed, 27 Mar 2024 22:59:13 -0400 Subject: [PATCH 3/3] Add helpers for dual arch --- .github/pipeline-descriptor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/pipeline-descriptor.yml b/.github/pipeline-descriptor.yml index 499b898..1c140ad 100644 --- a/.github/pipeline-descriptor.yml +++ b/.github/pipeline-descriptor.yml @@ -2,6 +2,9 @@ github: username: ${{ secrets.JAVA_GITHUB_USERNAME }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} +helpers: + "bin/helper": "$GOMOD/cmd/helper" + codeowners: - path: "*" owner: "@paketo-buildpacks/java-maintainers"