From 3b5cd9c37cffa401383dda1bcddeaa2d248fae79 Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Tue, 21 May 2024 23:01:27 -0400 Subject: [PATCH] Add ARM64 Support Signed-off-by: Daniel Mikusa --- .github/pipeline-descriptor.yml | 3 + .github/pipeline-version | 2 +- .github/workflows/pb-create-package.yml | 58 +++++++++++++------ .github/workflows/pb-tests.yml | 55 ++++++++++++------ .github/workflows/pb-update-go.yml | 4 +- .../workflows/pb-update-new-relic-dotnet.yml | 6 +- .../workflows/pb-update-new-relic-java.yml | 6 +- .../workflows/pb-update-new-relic-nodejs.yml | 6 +- .github/workflows/pb-update-new-relic-php.yml | 6 +- .github/workflows/pb-update-pipeline.yml | 8 ++- .gitignore | 4 +- buildpack.toml | 26 +++++---- scripts/build.sh | 22 ++++--- 13 files changed, 133 insertions(+), 73 deletions(-) diff --git a/.github/pipeline-descriptor.yml b/.github/pipeline-descriptor.yml index c9a1385..d6c8867 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/app-monitoring-maintainers" diff --git a/.github/pipeline-version b/.github/pipeline-version index f5b8b23..9c235b4 100644 --- a/.github/pipeline-version +++ b/.github/pipeline-version @@ -1 +1 @@ -1.36.6 +1.39.0 \ No newline at end of file diff --git a/.github/workflows/pb-create-package.yml b/.github/workflows/pb-create-package.yml index 51ae9f7..87417c3 100644 --- a/.github/workflows/pb-create-package.yml +++ b/.github/workflows/pb-create-package.yml @@ -25,7 +25,7 @@ jobs: username: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install create-package run: | #!/usr/bin/env bash @@ -33,13 +33,24 @@ jobs: set -euo pipefail go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest - - uses: buildpacks/github-actions/setup-tools@v5.5.3 + - uses: buildpacks/github-actions/setup-tools@v5.6.0 with: - crane-version: 0.19.0 + crane-version: 0.19.1 yj-version: 5.1.0 - - 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: | @@ -106,21 +117,23 @@ jobs: if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then create-package \ - --source ${SOURCE_PATH:-.} \ + --source "${SOURCE_PATH:-.}" \ --cache-location "${HOME}"/carton-cache \ --destination "${HOME}"/buildpack \ --include-dependencies \ --version "${VERSION}" else create-package \ - --source ${SOURCE_PATH:-.} \ + --source "${SOURCE_PATH:-.}" \ --destination "${HOME}"/buildpack \ --version "${VERSION}" fi - PACKAGE_FILE=${SOURCE_PATH:-.}/package.toml - [[ -e ${PACKAGE_FILE} ]] && cp ${PACKAGE_FILE} "${HOME}"/package.toml - printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}"/buildpack "${OS}" >> "${HOME}"/package.toml + PACKAGE_FILE="${SOURCE_PATH:-.}/package.toml" + if [ -f "${PACKAGE_FILE}" ]; then + cp "${PACKAGE_FILE}" "${HOME}/buildpack/package.toml" + printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}/buildpack" "${OS}" >> "${HOME}/buildpack/package.toml" + fi env: INCLUDE_DEPENDENCIES: "false" OS: linux @@ -133,15 +146,23 @@ jobs: set -euo pipefail + COMPILED_BUILDPACK="${HOME}/buildpack" + + # create-package puts the buildpack here, we need to run from that directory + # for component buildpacks so that pack doesn't need a package.toml + cd "${COMPILED_BUILDPACK}" + CONFIG="" + if [ -f "${COMPILED_BUILDPACK}/package.toml" ]; then + CONFIG="--config ${COMPILED_BUILDPACK}/package.toml" + fi PACKAGE_LIST=($PACKAGES) # Extract first repo (Docker Hub) as the main to package & register PACKAGE=${PACKAGE_LIST[0]} if [[ "${PUBLISH:-x}" == "true" ]]; then - pack buildpack package \ - "${PACKAGE}:${VERSION}" \ - --config "${HOME}"/package.toml \ + pack -v buildpack package \ + "${PACKAGE}:${VERSION}" ${CONFIG} \ --publish if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then @@ -165,10 +186,9 @@ jobs: done else - pack buildpack package \ - "${PACKAGE}:${VERSION}" \ - --config "${HOME}"/package.toml \ - --format "${FORMAT}" + pack -v buildpack package \ + "${PACKAGE}:${VERSION}" ${CONFIG} \ + --format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish") fi env: PACKAGES: docker.io/paketobuildpacks/new-relic gcr.io/paketo-buildpacks/new-relic @@ -199,7 +219,7 @@ jobs: DIGEST: ${{ steps.package.outputs.digest }} GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - if: ${{ true }} - uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:4.0.1 + uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.6.0 with: address: docker.io/paketobuildpacks/new-relic@${{ steps.package.outputs.digest }} id: paketo-buildpacks/new-relic diff --git a/.github/workflows/pb-tests.yml b/.github/workflows/pb-tests.yml index 6adcf4e..3f2fddb 100644 --- a/.github/workflows/pb-tests.yml +++ b/.github/workflows/pb-tests.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install create-package run: | #!/usr/bin/env bash @@ -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: | @@ -93,21 +104,23 @@ jobs: if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then create-package \ - --source ${SOURCE_PATH:-.} \ + --source "${SOURCE_PATH:-.}" \ --cache-location "${HOME}"/carton-cache \ --destination "${HOME}"/buildpack \ --include-dependencies \ --version "${VERSION}" else create-package \ - --source ${SOURCE_PATH:-.} \ + --source "${SOURCE_PATH:-.}" \ --destination "${HOME}"/buildpack \ --version "${VERSION}" fi - PACKAGE_FILE=${SOURCE_PATH:-.}/package.toml - [[ -e ${PACKAGE_FILE} ]] && cp ${PACKAGE_FILE} "${HOME}"/package.toml - printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}"/buildpack "${OS}" >> "${HOME}"/package.toml + PACKAGE_FILE="${SOURCE_PATH:-.}/package.toml" + if [ -f "${PACKAGE_FILE}" ]; then + cp "${PACKAGE_FILE}" "${HOME}/buildpack/package.toml" + printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}/buildpack" "${OS}" >> "${HOME}/buildpack/package.toml" + fi env: INCLUDE_DEPENDENCIES: "true" OS: linux @@ -118,15 +131,23 @@ jobs: set -euo pipefail + COMPILED_BUILDPACK="${HOME}/buildpack" + + # create-package puts the buildpack here, we need to run from that directory + # for component buildpacks so that pack doesn't need a package.toml + cd "${COMPILED_BUILDPACK}" + CONFIG="" + if [ -f "${COMPILED_BUILDPACK}/package.toml" ]; then + CONFIG="--config ${COMPILED_BUILDPACK}/package.toml" + fi PACKAGE_LIST=($PACKAGES) # Extract first repo (Docker Hub) as the main to package & register PACKAGE=${PACKAGE_LIST[0]} if [[ "${PUBLISH:-x}" == "true" ]]; then - pack buildpack package \ - "${PACKAGE}:${VERSION}" \ - --config "${HOME}"/package.toml \ + pack -v buildpack package \ + "${PACKAGE}:${VERSION}" ${CONFIG} \ --publish if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then @@ -150,14 +171,14 @@ jobs: done else - pack buildpack package \ - "${PACKAGE}:${VERSION}" \ - --config "${HOME}"/package.toml \ - --format "${FORMAT}" + pack -v buildpack package \ + "${PACKAGE}:${VERSION}" ${CONFIG} \ + --format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish") fi env: FORMAT: image PACKAGES: test + TTL_SH_PUBLISH: "false" VERSION: ${{ steps.version.outputs.version }} unit: name: Unit Test @@ -172,7 +193,7 @@ jobs: restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install richgo run: | #!/usr/bin/env bash diff --git a/.github/workflows/pb-update-go.yml b/.github/workflows/pb-update-go.yml index 251512d..7b0ceca 100644 --- a/.github/workflows/pb-update-go.yml +++ b/.github/workflows/pb-update-go.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - uses: actions/checkout@v4 - name: Update Go Version & Modules id: update-go @@ -49,7 +49,7 @@ jobs: echo "commit-body=${COMMIT_BODY}" >> "$GITHUB_OUTPUT" echo "commit-semver=${COMMIT_SEMVER}" >> "$GITHUB_OUTPUT" env: - GO_VERSION: "1.20" + GO_VERSION: "1.22" - uses: peter-evans/create-pull-request@v6 with: author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> diff --git a/.github/workflows/pb-update-new-relic-dotnet.yml b/.github/workflows/pb-update-new-relic-dotnet.yml index f1b0261..47d39a6 100644 --- a/.github/workflows/pb-update-new-relic-dotnet.yml +++ b/.github/workflows/pb-update-new-relic-dotnet.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install update-buildpack-dependency run: | #!/usr/bin/env bash @@ -19,9 +19,9 @@ jobs: 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 + - uses: buildpacks/github-actions/setup-tools@v5.6.0 with: - crane-version: 0.19.0 + crane-version: 0.19.1 yj-version: 5.1.0 - uses: actions/checkout@v4 - id: dependency diff --git a/.github/workflows/pb-update-new-relic-java.yml b/.github/workflows/pb-update-new-relic-java.yml index 9262fe6..ea7eb1e 100644 --- a/.github/workflows/pb-update-new-relic-java.yml +++ b/.github/workflows/pb-update-new-relic-java.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install update-buildpack-dependency run: | #!/usr/bin/env bash @@ -19,9 +19,9 @@ jobs: 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 + - uses: buildpacks/github-actions/setup-tools@v5.6.0 with: - crane-version: 0.19.0 + crane-version: 0.19.1 yj-version: 5.1.0 - uses: actions/checkout@v4 - id: dependency diff --git a/.github/workflows/pb-update-new-relic-nodejs.yml b/.github/workflows/pb-update-new-relic-nodejs.yml index 09d6c82..1e38844 100644 --- a/.github/workflows/pb-update-new-relic-nodejs.yml +++ b/.github/workflows/pb-update-new-relic-nodejs.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install update-buildpack-dependency run: | #!/usr/bin/env bash @@ -19,9 +19,9 @@ jobs: 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 + - uses: buildpacks/github-actions/setup-tools@v5.6.0 with: - crane-version: 0.19.0 + crane-version: 0.19.1 yj-version: 5.1.0 - uses: actions/checkout@v4 - id: dependency diff --git a/.github/workflows/pb-update-new-relic-php.yml b/.github/workflows/pb-update-new-relic-php.yml index 2ed98bd..4d3b919 100644 --- a/.github/workflows/pb-update-new-relic-php.yml +++ b/.github/workflows/pb-update-new-relic-php.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install update-buildpack-dependency run: | #!/usr/bin/env bash @@ -19,9 +19,9 @@ jobs: 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 + - uses: buildpacks/github-actions/setup-tools@v5.6.0 with: - crane-version: 0.19.0 + crane-version: 0.19.1 yj-version: 5.1.0 - uses: actions/checkout@v4 - id: dependency diff --git a/.github/workflows/pb-update-pipeline.yml b/.github/workflows/pb-update-pipeline.yml index a80569f..2c05223 100644 --- a/.github/workflows/pb-update-pipeline.yml +++ b/.github/workflows/pb-update-pipeline.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Install octo run: | #!/usr/bin/env bash @@ -55,6 +55,12 @@ jobs: ) git add .github/ + git add .gitignore + + if [ -f scripts/build.sh ]; then + git add scripts/build.sh + fi + git checkout -- . echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" 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/buildpack.toml b/buildpack.toml index 4c2f2e7..e694c5a 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -1,4 +1,4 @@ -# Copyright 2018-2022 the original author or authors. +# Copyright 2018-2024 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. @@ -28,7 +28,7 @@ api = "0.7" uri = "https://github.com/paketo-buildpacks/new-relic/blob/main/LICENSE" [metadata] - include-files = ["LICENSE", "NOTICE", "README.md", "bin/build", "bin/detect", "bin/helper", "bin/main", "buildpack.toml", "resources/newrelic.js", "resources/newrelic.yml", "resources/newrelic.ini"] + 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", "resources/newrelic.js", "resources/newrelic.yml", "resources/newrelic.ini"] pre-package = "scripts/build.sh" [[metadata.configurations]] @@ -56,11 +56,11 @@ api = "0.7" cpes = ["cpe:2.3:a:newrelic:java-agent:8.11.1:*:*:*:*:*:*:*"] id = "new-relic-java" name = "New Relic Java Agent" - purl = "pkg:generic/newrelic-java-agent@8.11.1?arch=amd64" + purl = "pkg:generic/newrelic-java-agent@8.11.1" sha256 = "53b902787cb54163f070a7cec6f240f5ba8a91978cc527c47f90dd12c0ba989d" source = "https://repo1.maven.org/maven2/com/newrelic/agent/java/newrelic-agent/8.11.1/newrelic-agent-8.11.1-sources.jar" source-sha256 = "132a7512f7b40a6171f073a188ff2fb0472cc39c4b4e88caa812226d9e2482ef" - stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"] + stacks = ["*"] uri = "https://repo1.maven.org/maven2/com/newrelic/agent/java/newrelic-agent/8.11.1/newrelic-agent-8.11.1.jar" version = "8.11.1" @@ -75,7 +75,7 @@ api = "0.7" sha256 = "43f699df59fcf39aae0666995a555fc1206c9ec6c34af6bf5771a6ec22bdbf31" source = "https://registry.npmjs.org/newrelic/-/newrelic-11.17.0.tgz" source-sha256 = "43f699df59fcf39aae0666995a555fc1206c9ec6c34af6bf5771a6ec22bdbf31" - stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"] + stacks = ["*"] uri = "https://registry.npmjs.org/newrelic/-/newrelic-11.17.0.tgz" version = "11.17.0" @@ -90,7 +90,7 @@ api = "0.7" sha256 = "e840111f3c4122745cc0ee4e656aab3774b6733373be5db01c404dc2bae855c4" source = "https://github.com/newrelic/newrelic-php-agent/archive/refs/tags/v10.21.0.11.tar.gz" source-sha256 = "36677b1a5af4ecfa7d82e08805ba7c705081f0989d7c7aa8d1443aa516863b35" - stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"] + stacks = ["*"] uri = "https://download.newrelic.com/php_agent/archive/10.21.0.11/newrelic-php5-10.21.0.11-linux.tar.gz" version = "10.21.0" @@ -105,7 +105,7 @@ api = "0.7" sha256 = "464558e58c040f00e0ea75da535e797b71d3c66ed7dbf5c177d9a720649cef82" source = "https://github.com/newrelic/newrelic-dotnet-agent/archive/refs/tags/v10.24.0.tar.gz" source-sha256 = "bf6f652cea60fc5bffffb1bb4b58df490b95b0affa052c462f540f3abb61c5f4" - stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"] + stacks = ["*"] uri = "https://download.newrelic.com/dot_net_agent/previous_releases/10.24.0/newrelic-dotnet-agent_10.24.0_amd64.tar.gz" version = "10.24.0" @@ -113,10 +113,12 @@ api = "0.7" uri = "https://docs.newrelic.com/docs/licenses/license-information" [[stacks]] - id = "io.buildpacks.stacks.bionic" + id = "*" -[[stacks]] - id = "io.paketo.stacks.tiny" +[[targets]] + arch = "amd64" + os = "linux" -[[stacks]] - id = "*" +[[targets]] + arch = "arm64" + os = "linux" diff --git a/scripts/build.sh b/scripts/build.sh index e1ebeb1..9b05e98 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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/new-relic/v4/cmd/helper -GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/new-relic/v4/cmd/main +GOMOD=$(head -1 go.mod | awk '{print $2}') +GOOS="linux" GOARCH="amd64" go build -ldflags='-s -w' -o "linux/amd64/bin/helper" "$GOMOD/cmd/helper" +GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o "linux/arm64/bin/helper" "$GOMOD/cmd/helper" +GOOS="linux" GOARCH="amd64" 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:-false}" != "false" ]; then - upx -q -9 bin/helper bin/main +if [ "${COMPRESS:-none}" != "none" ]; then + $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 \ No newline at end of file