From e0a54a067cde4e9c49bfbfe6fc314d5e072b8c31 Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Mon, 6 Feb 2023 16:01:53 +0100 Subject: [PATCH 01/22] Create GH actions workflow for agent release --- .ci/ReleaseChangelog.java | 126 +++++++++++++++++++ .github/workflows/release.yml | 224 +++++++++++++++++++++++++++++++++ scripts/jenkins/push_docker.sh | 4 +- 3 files changed, 352 insertions(+), 2 deletions(-) create mode 100644 .ci/ReleaseChangelog.java create mode 100644 .github/workflows/release.yml diff --git a/.ci/ReleaseChangelog.java b/.ci/ReleaseChangelog.java new file mode 100644 index 0000000000..8d6092e0e1 --- /dev/null +++ b/.ci/ReleaseChangelog.java @@ -0,0 +1,126 @@ +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.Instant; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; +import java.util.OptionalInt; +import java.util.function.Predicate; + +public class ReleaseChangelog { + + public static void main(String[] args) throws IOException { + if (args.length != 2) { + System.out.println("Expected exactly two arguments: "); + System.exit(-1); + } + Path fileName = Paths.get(args[0]); + String version = args[1].trim(); + if (!version.matches("\\d+\\.\\d+\\.\\d+")) { + System.out.println("Version must be in the format x.x.x but was not: " + version); + System.exit(-1); + } + Lines f = new Lines(Files.readAllLines(fileName, StandardCharsets.UTF_8)); + int unreleasedStart = f.findLine(str -> str.trim().equals("=== Unreleased"), 0).orElseThrow() + 1; + int unreleasedEnd = f.findLine(str -> str.startsWith("[[release-notes-"), unreleasedStart).orElseThrow(); + + Lines changes = f.cut(unreleasedStart, unreleasedEnd); + f.insert(new Lines(List.of("")), unreleasedStart); //add a blank line below unreleased heading + changes.trim(); + + // a few sanity checks + if (changes.lineCount() == 0) { + System.out.println("Unreleased changes are empty, there must be something wrong!"); + System.exit(-1); + } + OptionalInt wrongIndentedHeading = changes.findLine(str -> str.matches("^==?=?=?[^=].*"), 0); + if (wrongIndentedHeading.isPresent()) { + System.out.println("Found heading which is too high level (must be at least =====) within changes: " + + changes.getLine(wrongIndentedHeading.getAsInt())); + System.exit(-1); + } + + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd") + .withZone(ZoneOffset.UTC); + + changes.insert(new Lines(List.of( + "", + String.format("[[release-notes-%s]]", version), + String.format("==== %s - %s", version, formatter.format(Instant.now())), + "" + )), 0); + + int majorVersion = Integer.parseInt(version.split("\\.")[0]); + String majorHeading = String.format("=== Java Agent version %d.x", majorVersion); + OptionalInt sectionStart = f.findLine(str -> str.trim().equals(majorHeading), 0); + if (sectionStart.isEmpty()) { + System.out.println("Could not find heading for major version: " + majorHeading); + System.out.println("Is this a new major version? If yes, please add an empty section for it manually to the Changelog"); + System.exit(-1); + } + + f.insert(changes, sectionStart.getAsInt() + 1); + + Files.writeString(fileName, f.toString(), StandardCharsets.UTF_8); + } + + static class Lines { + + private final List lines; + + public Lines(List lines) { + this.lines = new ArrayList<>(lines); + } + + int lineCount() { + return lines.size(); + } + + OptionalInt findLine(Predicate condition, int startAt) { + for (int i = startAt; i < lines.size(); i++) { + if (condition.test(lines.get(i))) { + return OptionalInt.of(i); + } + } + return OptionalInt.empty(); + } + + Lines cut(int startInclusive, int endExclusive) { + List cutLines = new ArrayList<>(); + for (int i = startInclusive; i < endExclusive; i++) { + cutLines.add(lines.remove(startInclusive)); + } + return new Lines(cutLines); + } + + void insert(Lines other, int insertAt) { + this.lines.addAll(insertAt, other.lines); + } + + /** + * Trims lines consisting of only blanks at the top and bottom + */ + void trim() { + while (!lines.isEmpty() && lines.get(0).matches("\\s*")) { + lines.remove(0); + } + while (!lines.isEmpty() && lines.get(lines.size() - 1).matches("\\s*")) { + lines.remove(lines.size() - 1); + } + } + + @Override + public String toString() { + return String.join("\n", lines); + } + + public String getLine(int number) { + return lines.get(number); + } + } + +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..113a8557d2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,224 @@ +--- +# Releases the agent +name: Release + +on: + workflow_dispatch: + inputs: + branch: + description: 'The branch to release' + required: true + default: 'main' + version: + description: 'The version to release (e.g. 1.2.3). This workflow will automatically perform the required version bumps' + required: true + update_changelog: + description: | + If enabled, everything in the changelog from the "Unreleased" section will be automatically moved to a new section for the new release. + If disabled, the changelog needs to be prepared for the release manually before triggering this workflow. + type: boolean + required: true + default: true + +env: + JAVA_VERSION: 17 + JAVA_DIST: adopt + MAVEN_CONFIG: >- + -V + -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.http.retryHandler.count=3 + -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 + +jobs: + prepare_release: + name: "Changelog and Version Bump" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + #TODO: Use apmmachine GH user + setup push authorization (SSH?) + with: + ref: ${{ inputs.branch }} + - name: Set up git user + run: | + git config user.name todo-github-actions + git config user.email todo-github-actions@github.com + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DIST }} + cache: 'maven' + - name: Prepare changelog for release + if: ${{ inputs.update_changelog }} + run: | + java .ci/ReleaseChangelog.java CHANGELOG.asciidoc ${{ inputs.version }} + git commit -m "Prepare changelog for release ${{ inputs.version }}" CHANGELOG.asciidoc + - name: Bump version and add git tag + run: ./mvnw release:prepare -B -DpushChanges=false "-Darguments=-DskipTests -Dmaven.javadoc.skip=true" -DreleaseVersion=${{ inputs.version }} + - run: git push --atomic origin ${{ inputs.branch }} v${{ inputs.version }} + + + maven_central_deploy: + name: "Deploy to Maven Central (Buildkite)" + runs-on: ubuntu-latest + needs: + - prepare_release + + # TODO: Run the deployment on Buildkite + # Buildkite needs to + # - checkout the tag "v${{ inputs.version }}" (which is created by the prepare_release job) + # - run ./mvnw -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode + # Note that the previous ./mvnw release:prepare release:perform from jenkins are not required anymore: + # prepare_release does all the fiddling with the git history + steps: + - run: echo "Not implemented yet!" + + await_artifact_on_maven_central: + name: "Wait for artifacts to be available on maven central" + runs-on: ubuntu-latest + needs: + - maven_central_deploy + steps: + - uses: actions/checkout@v3 + - shell: bash + run: | + until .ci/release/wait_maven_artifact_published.sh ${{ inputs.version }} + do + echo "Artifacts not found on maven central. Sleeping 30 seconds, retrying afterwards" + sleep 30s + done + + + update_major_branch: + name: "Update Major Branch" + runs-on: ubuntu-latest + needs: + - await_artifact_on_maven_central + steps: + - uses: actions/checkout@v3 + with: + ref: main + #TODO: Use apmmachine GH user + setup authorization (SSH?) + - run: .ci/release/update_major_branch.sh ${{ inputs.version }} + - run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" + + update_cloudfoundry: + name: "Update Cloudfoundry" + runs-on: ubuntu-latest + needs: + - await_artifact_on_maven_central + steps: + - uses: actions/checkout@v3 + with: + ref: main + #TODO: Use apmmachine + setup authorization (SSH?) + - name: Set up git user + run: | + git config user.name todo-github-actions + git config user.email todo-github-actions@github.com + - name: "Update Cloudfoundry index.yml file" + shell: bash + run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }} + - run: git push origin main + + + build_docker_images: + name: "Build and push docker images" + runs-on: ubuntu-latest + needs: + - await_artifact_on_maven_central + env: + TAG_NAME: v${{ inputs.version }} + SONATYPE_FALLBACK: 1 + steps: + - uses: actions/checkout@v3 + with: + ref: main + fetch-depth: 0 # Load entire history as it is required for the push-script + - name: "Build docker image" + shell: bash + # TODO: add docker login + run: | + ./scripts/jenkins/build_docker.sh + ./scripts/jenkins/push_docker.sh + + publish_aws_lambda: + name: "Publish AWS Lambda" + runs-on: ubuntu-latest + needs: + - await_artifact_on_maven_central + outputs: + arn_content: ${{ steps.arn_output.outputs.arn_content }} + steps: + - uses: actions/checkout@v3 + with: + ref: main + # TODO: actual lambda creation + upload + - name: Setup dummy ARN file + run: | + { + echo "### ARNs of the APM Java Agent's AWS Lambda Layer" + echo '' + echo '|Region|ARN|' + echo '|------|---|' + } > ".ci/arn-file.md" + - uses: actions/upload-artifact@v3 + with: + name: arn-file + path: .ci/arn-file.md + - name: Add ARN file to output + id: arn_output + run: | + echo 'arn_content<> $GITHUB_OUTPUT + cat .ci/arn-file.md >> $GITHUB_OUTPUT + echo 'ARN_CONTENT_EOF' >> $GITHUB_OUTPUT + + + create_github_release: + name: "Create GitHub Release" + needs: + - publish_aws_lambda + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: main + - name: Await release-notes published + shell: bash + run: | + until .ci/release/wait_release_notes_published.sh ${{ inputs.version }} + do + echo "Release notes not published yet. Sleeping 30 seconds, retrying afterwards" + sleep 30s + done + - name: Compute major.x branch + id: get_dotx_branch + run: echo "dotx_branch=$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT + - uses: ncipollo/release-action@v1 + with: + #token: TODO: set apmmachine (or whoever releases) user token here! + tag: v${{ inputs.version }} + name: Release ${{ inputs.version }} + body: | + [Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }}) + ${{ needs.publish_aws_lambda.outputs.arn_content }} + + bump_opbeans: + name: "Bump Opbeans agent version" + runs-on: ubuntu-latest + steps: + #TODO: Use apmmachine + setup authorization (SSH?) + - uses: actions/checkout@v3 + with: + repository: JonasKunz/opbeans-java + ref: main + - name: Set up git user + run: | + git config user.name todo-github-actions + git config user.email todo-github-actions@github.com + - name: Bump version + run: | + .ci/bump-version.sh ${{ inputs.version }} + git tag v${{ inputs.version }} + - run: git push --atomic origin main v${{ inputs.version }} diff --git a/scripts/jenkins/push_docker.sh b/scripts/jenkins/push_docker.sh index e6f26bd0ee..2953639ce9 100755 --- a/scripts/jenkins/push_docker.sh +++ b/scripts/jenkins/push_docker.sh @@ -48,7 +48,7 @@ if [ ${WORKERS+x} ] # We are on a CI worker then retry $RETRIES docker push $DOCKER_PUSH_IMAGE || echo "Push failed after $RETRIES retries" else # We are in a local (non-CI) environment - docker push $DOCKER_PUSH_IMAGE || echo "You may need to run 'docker login' first and then re-run this script" + docker push $DOCKER_PUSH_IMAGE || { echo "You may need to run 'docker login' first and then re-run this script"; exit 1; } fi readonly LATEST_TAG=$(git tag --list --sort=version:refname "v*" | grep -v RC | sed s/^v// | tail -n 1) @@ -62,6 +62,6 @@ then then retry $RETRIES docker push $DOCKER_PUSH_IMAGE_LATEST || echo "Push failed after $RETRIES retries" else # We are in a local (non-CI) environment - docker push $DOCKER_PUSH_IMAGE_LATEST || echo "You may need to run 'docker login' first and then re-run this script" + docker push $DOCKER_PUSH_IMAGE_LATEST || { echo "You may need to run 'docker login' first and then re-run this script"; exit 1; } fi fi From 57e0a18df388aac8789b6ddb6833b625bfc2cbdd Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Mon, 20 Feb 2023 12:40:50 +0100 Subject: [PATCH 02/22] Added missing job dependency --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 113a8557d2..d2c6522b82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -179,6 +179,7 @@ jobs: name: "Create GitHub Release" needs: - publish_aws_lambda + - update_major_branch runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 9eb78abd3e62fc9709798a2023645385953e839a Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Mon, 20 Feb 2023 12:47:51 +0100 Subject: [PATCH 03/22] Added another missing dependency --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2c6522b82..c28d846292 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -208,6 +208,8 @@ jobs: bump_opbeans: name: "Bump Opbeans agent version" runs-on: ubuntu-latest + needs: + - await_artifact_on_maven_central steps: #TODO: Use apmmachine + setup authorization (SSH?) - uses: actions/checkout@v3 From 2414c74461f230a72982dcbc978648fb0a1db10f Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 8 May 2023 15:24:02 +0200 Subject: [PATCH 04/22] Add setup-git action and adapt permissions --- .github/workflows/release.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c28d846292..8457bf7820 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ --- # Releases the agent -name: Release +name: release on: workflow_dispatch: @@ -30,19 +30,20 @@ env: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 +permissions: + contents: write + jobs: prepare_release: + permissions: + contents: write name: "Changelog and Version Bump" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - #TODO: Use apmmachine GH user + setup push authorization (SSH?) with: ref: ${{ inputs.branch }} - - name: Set up git user - run: | - git config user.name todo-github-actions - git config user.email todo-github-actions@github.com + - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3 with: @@ -99,7 +100,7 @@ jobs: - uses: actions/checkout@v3 with: ref: main - #TODO: Use apmmachine GH user + setup authorization (SSH?) + - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - run: .ci/release/update_major_branch.sh ${{ inputs.version }} - run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" @@ -112,11 +113,7 @@ jobs: - uses: actions/checkout@v3 with: ref: main - #TODO: Use apmmachine + setup authorization (SSH?) - - name: Set up git user - run: | - git config user.name todo-github-actions - git config user.email todo-github-actions@github.com + - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - name: "Update Cloudfoundry index.yml file" shell: bash run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }} @@ -198,7 +195,6 @@ jobs: run: echo "dotx_branch=$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT - uses: ncipollo/release-action@v1 with: - #token: TODO: set apmmachine (or whoever releases) user token here! tag: v${{ inputs.version }} name: Release ${{ inputs.version }} body: | @@ -211,15 +207,11 @@ jobs: needs: - await_artifact_on_maven_central steps: - #TODO: Use apmmachine + setup authorization (SSH?) - uses: actions/checkout@v3 with: repository: JonasKunz/opbeans-java ref: main - - name: Set up git user - run: | - git config user.name todo-github-actions - git config user.email todo-github-actions@github.com + - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - name: Bump version run: | .ci/bump-version.sh ${{ inputs.version }} From 1a00ccbd08db92362e82a174369df963c87849d9 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 8 May 2023 16:19:36 +0200 Subject: [PATCH 05/22] Add docker login --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8457bf7820..2a709e2fa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,9 +133,15 @@ jobs: with: ref: main fetch-depth: 0 # Load entire history as it is required for the push-script + - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current + with: + registry: docker.elastic.co + secret: secret/apm-team/ci/docker-registry/prod + url: ${{ secrets.VAULT_ADDR }} + roleId: ${{ secrets.VAULT_ROLE_ID }} + secretId: ${{ secrets.VAULT_SECRET_ID }} - name: "Build docker image" shell: bash - # TODO: add docker login run: | ./scripts/jenkins/build_docker.sh ./scripts/jenkins/push_docker.sh From 4c1baec75379c792449876513a0a756df45ab988 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 15 May 2023 12:27:39 +0200 Subject: [PATCH 06/22] Replace hardcoded occurrences of main with inputs.branch --- .github/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a709e2fa7..409226fa18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,12 +112,12 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: main + ref: ${{ inputs.branch }} - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - name: "Update Cloudfoundry index.yml file" shell: bash run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }} - - run: git push origin main + - run: git push origin ${{ inputs.branch }} build_docker_images: @@ -131,7 +131,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: main + ref: ${{ inputs.branch }} fetch-depth: 0 # Load entire history as it is required for the push-script - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current with: @@ -156,7 +156,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: main + ref: ${{ inputs.branch }} # TODO: actual lambda creation + upload - name: Setup dummy ARN file run: | @@ -187,7 +187,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: main + ref: ${{ inputs.branch }} - name: Await release-notes published shell: bash run: | @@ -216,10 +216,10 @@ jobs: - uses: actions/checkout@v3 with: repository: JonasKunz/opbeans-java - ref: main + ref: ${{ inputs.branch }} - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - name: Bump version run: | .ci/bump-version.sh ${{ inputs.version }} git tag v${{ inputs.version }} - - run: git push --atomic origin main v${{ inputs.version }} + - run: git push --atomic origin ${{ inputs.branch }} v${{ inputs.version }} From 95d27d94a244b1cfc3d5409ac253bb55c42650b6 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 15 May 2023 12:48:36 +0200 Subject: [PATCH 07/22] Use gh cli instead of custom action --- .github/workflows/release.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 409226fa18..ea2e162d6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -199,13 +199,14 @@ jobs: - name: Compute major.x branch id: get_dotx_branch run: echo "dotx_branch=$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT - - uses: ncipollo/release-action@v1 - with: - tag: v${{ inputs.version }} - name: Release ${{ inputs.version }} - body: | - [Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }}) - ${{ needs.publish_aws_lambda.outputs.arn_content }} + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create v${{ inputs.version }} \ + --title="Release ${{ inputs.version }}" \ + --notes="[Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }}) + ${{ needs.publish_aws_lambda.outputs.arn_content }}" bump_opbeans: name: "Bump Opbeans agent version" From 9e74b86bd18fceb16dc56e5fae36072aae5aa141 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 15:13:33 +0200 Subject: [PATCH 08/22] Update .github/workflows/release.yml Co-authored-by: Jonas Kunz --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea2e162d6c..c84fe4fc0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -216,7 +216,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - repository: JonasKunz/opbeans-java + repository: elastic/opbeans-java ref: ${{ inputs.branch }} - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - name: Bump version From dbef751cbdf860d26982058ad08945ff0d030872 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 15:15:15 +0200 Subject: [PATCH 09/22] Remove bump_opbeans job This will be migrated to a updatecli job --- .github/workflows/release.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c84fe4fc0d..729d750d20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -207,20 +207,3 @@ jobs: --title="Release ${{ inputs.version }}" \ --notes="[Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }}) ${{ needs.publish_aws_lambda.outputs.arn_content }}" - - bump_opbeans: - name: "Bump Opbeans agent version" - runs-on: ubuntu-latest - needs: - - await_artifact_on_maven_central - steps: - - uses: actions/checkout@v3 - with: - repository: elastic/opbeans-java - ref: ${{ inputs.branch }} - - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - - name: Bump version - run: | - .ci/bump-version.sh ${{ inputs.version }} - git tag v${{ inputs.version }} - - run: git push --atomic origin ${{ inputs.branch }} v${{ inputs.version }} From b4d7652bb300f06135f6887362df67161647c72c Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 15:17:13 +0200 Subject: [PATCH 10/22] Remove maven config env --- .github/workflows/release.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 729d750d20..43a7a43494 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,12 +23,6 @@ on: env: JAVA_VERSION: 17 JAVA_DIST: adopt - MAVEN_CONFIG: >- - -V - -B - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.http.retryHandler.count=3 - -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 permissions: contents: write From 79e768ad853235a07c6c4a5814129276a9cb2153 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 15:21:23 +0200 Subject: [PATCH 11/22] Use input instead of hard coded ref --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43a7a43494..b64cbdcc61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,7 +93,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: main + ref: ${{ inputs.branch }} - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - run: .ci/release/update_major_branch.sh ${{ inputs.version }} - run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" From 381d1f5ee3c5b14c04a988a4a25b1b99148a8678 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 23:12:16 +0200 Subject: [PATCH 12/22] test --- .buildkite/release.yml | 15 +++++++++++++++ .ci/release.sh | 32 ++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 21 +++++++++++++-------- 3 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 .buildkite/release.yml create mode 100755 .ci/release.sh diff --git a/.buildkite/release.yml b/.buildkite/release.yml new file mode 100644 index 0000000000..a2858f77b6 --- /dev/null +++ b/.buildkite/release.yml @@ -0,0 +1,15 @@ +agents: + provider: "gcp" + +steps: + - label: "Run the snapshot" + key: "release" + commands: + - echo "hello" +# artifact_paths: +# - "release.txt" +# - "**/target/*" + +notify: + - slack: "#apm-agent-java" + if: 'build.state != "passed"' diff --git a/.ci/release.sh b/.ci/release.sh new file mode 100755 index 0000000000..6f80c467e2 --- /dev/null +++ b/.ci/release.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +## This script runs the snapshot given the different environment variables +## dry_run +## +## It relies on the .buildkite/hooks/pre-command so the Vault and other tooling +## are prepared automatically by buildkite. +## + +set -eo pipefail + +# Make sure we delete this folder before leaving even in case of failure +clean_up () { + ARG=$? + export VAULT_TOKEN=$PREVIOUS_VAULT_TOKEN + echo "--- Deleting tmp workspace" + rm -rf $TMP_WORKSPACE + exit $ARG +} +trap clean_up EXIT + +echo "--- Debug JDK installation :coffee:" +echo $JAVA_HOME +echo $PATH +java -version + +set +x +echo "--- Deploy the release :package:" +if [[ "$dry_run" == "true" ]] ; then + echo './mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt' +else + ./mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt +fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b64cbdcc61..3fe856e1d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,15 +59,20 @@ jobs: runs-on: ubuntu-latest needs: - prepare_release - - # TODO: Run the deployment on Buildkite - # Buildkite needs to - # - checkout the tag "v${{ inputs.version }}" (which is created by the prepare_release job) - # - run ./mvnw -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode - # Note that the previous ./mvnw release:prepare release:perform from jenkins are not required anymore: - # prepare_release does all the fiddling with the git history steps: - - run: echo "Not implemented yet!" + - id: buildkite + name: Run Deploy + uses: elastic/apm-pipeline-library/.github/actions/buildkite@current + with: + vaultUrl: ${{ secrets.VAULT_ADDR }} + vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} + vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} + pipeline: apm-agent-java-release + pipelineVersion: ${{ inputs.version }} + waitFor: false + printBuildLogs: false + buildEnvVars: | + dry_run=${{ inputs.dry_run || 'false' }} await_artifact_on_maven_central: name: "Wait for artifacts to be available on maven central" From ea674fb96202b068fbdceb308b838da2ab9ad0b9 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 23:14:03 +0200 Subject: [PATCH 13/22] Add testing workflow --- .github/workflows/tmp-test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/tmp-test.yml diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml new file mode 100644 index 0000000000..d7d5fc9f41 --- /dev/null +++ b/.github/workflows/tmp-test.yml @@ -0,0 +1,20 @@ +name: tmp-test + +on: pull_request + +jobs: + tmp-test: + runs-on: ubuntu-latest + steps: + - id: buildkite + name: Run Deploy + uses: elastic/apm-pipeline-library/.github/actions/buildkite@current + with: + vaultUrl: ${{ secrets.VAULT_ADDR }} + vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} + vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} + pipeline: apm-agent-java-release + waitFor: false + printBuildLogs: false + buildEnvVars: | + dry_run=${{ inputs.dry_run || 'false' }} From 988346c369a51c81e64d15fead1ec9bf5b4c935e Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 23:19:57 +0200 Subject: [PATCH 14/22] test --- .github/workflows/tmp-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml index d7d5fc9f41..ce7940e925 100644 --- a/.github/workflows/tmp-test.yml +++ b/.github/workflows/tmp-test.yml @@ -14,6 +14,7 @@ jobs: vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} pipeline: apm-agent-java-release + pipelineVersion: ${{ github.head_ref }} waitFor: false printBuildLogs: false buildEnvVars: | From 9e0f85589fd424fc299b6254917c522184daa745 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 31 May 2023 23:28:23 +0200 Subject: [PATCH 15/22] test --- .buildkite/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/release.yml b/.buildkite/release.yml index a2858f77b6..43c1119448 100644 --- a/.buildkite/release.yml +++ b/.buildkite/release.yml @@ -6,6 +6,7 @@ steps: key: "release" commands: - echo "hello" + - glcoud --version # artifact_paths: # - "release.txt" # - "**/target/*" From cdcc877762d06f32b4499ea496a45177da2bd63d Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 11:16:03 +0200 Subject: [PATCH 16/22] test --- .ci/release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/release.sh b/.ci/release.sh index 6f80c467e2..92ce5a6ffc 100755 --- a/.ci/release.sh +++ b/.ci/release.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -## This script runs the snapshot given the different environment variables +## This script runs the release given the different environment variables ## dry_run ## ## It relies on the .buildkite/hooks/pre-command so the Vault and other tooling @@ -26,7 +26,7 @@ java -version set +x echo "--- Deploy the release :package:" if [[ "$dry_run" == "true" ]] ; then - echo './mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt' + ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true | release.txt else ./mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt fi From a416d57cd79017dbd7ecd880362ead8a41016b8b Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 11:22:45 +0200 Subject: [PATCH 17/22] test --- .github/workflows/release.yml | 264 +++++++++++++++++----------------- 1 file changed, 134 insertions(+), 130 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fe856e1d1..a3df1e3f58 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,147 +62,151 @@ jobs: steps: - id: buildkite name: Run Deploy - uses: elastic/apm-pipeline-library/.github/actions/buildkite@current + uses: reakaleek/apm-pipeline-library/.github/actions/buildkite@feature/buildkite-download-artifacts with: vaultUrl: ${{ secrets.VAULT_ADDR }} vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} pipeline: apm-agent-java-release pipelineVersion: ${{ inputs.version }} - waitFor: false - printBuildLogs: false + waitFor: true + printBuildLogs: true + artifactName: lambda-zip + artifactPath: "elastic-apm-agent/target/**/elastic-apm-java-aws-lambda-layer-*.zip" buildEnvVars: | - dry_run=${{ inputs.dry_run || 'false' }} + dry_run=true +# buildEnvVars: | +# dry_run=${{ inputs.dry_run || 'false' }} - await_artifact_on_maven_central: - name: "Wait for artifacts to be available on maven central" - runs-on: ubuntu-latest - needs: - - maven_central_deploy - steps: - - uses: actions/checkout@v3 - - shell: bash - run: | - until .ci/release/wait_maven_artifact_published.sh ${{ inputs.version }} - do - echo "Artifacts not found on maven central. Sleeping 30 seconds, retrying afterwards" - sleep 30s - done - +# await_artifact_on_maven_central: +# name: "Wait for artifacts to be available on maven central" +# runs-on: ubuntu-latest +# needs: +# - maven_central_deploy +# steps: +# - uses: actions/checkout@v3 +# - shell: bash +# run: | +# until .ci/release/wait_maven_artifact_published.sh ${{ inputs.version }} +# do +# echo "Artifacts not found on maven central. Sleeping 30 seconds, retrying afterwards" +# sleep 30s +# done +# - update_major_branch: - name: "Update Major Branch" - runs-on: ubuntu-latest - needs: - - await_artifact_on_maven_central - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} - - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - - run: .ci/release/update_major_branch.sh ${{ inputs.version }} - - run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" +# update_major_branch: +# name: "Update Major Branch" +# runs-on: ubuntu-latest +# needs: +# - await_artifact_on_maven_central +# steps: +# - uses: actions/checkout@v3 +# with: +# ref: ${{ inputs.branch }} +# - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current +# - run: .ci/release/update_major_branch.sh ${{ inputs.version }} +# - run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" - update_cloudfoundry: - name: "Update Cloudfoundry" - runs-on: ubuntu-latest - needs: - - await_artifact_on_maven_central - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} - - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - - name: "Update Cloudfoundry index.yml file" - shell: bash - run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }} - - run: git push origin ${{ inputs.branch }} +# update_cloudfoundry: +# name: "Update Cloudfoundry" +# runs-on: ubuntu-latest +# needs: +# - await_artifact_on_maven_central +# steps: +# - uses: actions/checkout@v3 +# with: +# ref: ${{ inputs.branch }} +# - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current +# - name: "Update Cloudfoundry index.yml file" +# shell: bash +# run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }} +# - run: git push origin ${{ inputs.branch }} - build_docker_images: - name: "Build and push docker images" - runs-on: ubuntu-latest - needs: - - await_artifact_on_maven_central - env: - TAG_NAME: v${{ inputs.version }} - SONATYPE_FALLBACK: 1 - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} - fetch-depth: 0 # Load entire history as it is required for the push-script - - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current - with: - registry: docker.elastic.co - secret: secret/apm-team/ci/docker-registry/prod - url: ${{ secrets.VAULT_ADDR }} - roleId: ${{ secrets.VAULT_ROLE_ID }} - secretId: ${{ secrets.VAULT_SECRET_ID }} - - name: "Build docker image" - shell: bash - run: | - ./scripts/jenkins/build_docker.sh - ./scripts/jenkins/push_docker.sh +# build_docker_images: +# name: "Build and push docker images" +# runs-on: ubuntu-latest +# needs: +# - await_artifact_on_maven_central +# env: +# TAG_NAME: v${{ inputs.version }} +# SONATYPE_FALLBACK: 1 +# steps: +# - uses: actions/checkout@v3 +# with: +# ref: ${{ inputs.branch }} +# fetch-depth: 0 # Load entire history as it is required for the push-script +# - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current +# with: +# registry: docker.elastic.co +# secret: secret/apm-team/ci/docker-registry/prod +# url: ${{ secrets.VAULT_ADDR }} +# roleId: ${{ secrets.VAULT_ROLE_ID }} +# secretId: ${{ secrets.VAULT_SECRET_ID }} +# - name: "Build docker image" +# shell: bash +# run: | +# ./scripts/jenkins/build_docker.sh +# ./scripts/jenkins/push_docker.sh - publish_aws_lambda: - name: "Publish AWS Lambda" - runs-on: ubuntu-latest - needs: - - await_artifact_on_maven_central - outputs: - arn_content: ${{ steps.arn_output.outputs.arn_content }} - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} - # TODO: actual lambda creation + upload - - name: Setup dummy ARN file - run: | - { - echo "### ARNs of the APM Java Agent's AWS Lambda Layer" - echo '' - echo '|Region|ARN|' - echo '|------|---|' - } > ".ci/arn-file.md" - - uses: actions/upload-artifact@v3 - with: - name: arn-file - path: .ci/arn-file.md - - name: Add ARN file to output - id: arn_output - run: | - echo 'arn_content<> $GITHUB_OUTPUT - cat .ci/arn-file.md >> $GITHUB_OUTPUT - echo 'ARN_CONTENT_EOF' >> $GITHUB_OUTPUT - +# publish_aws_lambda: +# name: "Publish AWS Lambda" +# runs-on: ubuntu-latest +# needs: +# - await_artifact_on_maven_central +# outputs: +# arn_content: ${{ steps.arn_output.outputs.arn_content }} +# steps: +# - uses: actions/checkout@v3 +# with: +# ref: ${{ inputs.branch }} +# # TODO: actual lambda creation + upload +# - name: Setup dummy ARN file +# run: | +# { +# echo "### ARNs of the APM Java Agent's AWS Lambda Layer" +# echo '' +# echo '|Region|ARN|' +# echo '|------|---|' +# } > ".ci/arn-file.md" +# - uses: actions/upload-artifact@v3 +# with: +# name: arn-file +# path: .ci/arn-file.md +# - name: Add ARN file to output +# id: arn_output +# run: | +# echo 'arn_content<> $GITHUB_OUTPUT +# cat .ci/arn-file.md >> $GITHUB_OUTPUT +# echo 'ARN_CONTENT_EOF' >> $GITHUB_OUTPUT +# - create_github_release: - name: "Create GitHub Release" - needs: - - publish_aws_lambda - - update_major_branch - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} - - name: Await release-notes published - shell: bash - run: | - until .ci/release/wait_release_notes_published.sh ${{ inputs.version }} - do - echo "Release notes not published yet. Sleeping 30 seconds, retrying afterwards" - sleep 30s - done - - name: Compute major.x branch - id: get_dotx_branch - run: echo "dotx_branch=$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT - - name: Create GitHub Release - env: - GH_TOKEN: ${{ github.token }} - run: | - gh release create v${{ inputs.version }} \ - --title="Release ${{ inputs.version }}" \ - --notes="[Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }}) - ${{ needs.publish_aws_lambda.outputs.arn_content }}" +# create_github_release: +# name: "Create GitHub Release" +# needs: +# - publish_aws_lambda +# - update_major_branch +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# ref: ${{ inputs.branch }} +# - name: Await release-notes published +# shell: bash +# run: | +# until .ci/release/wait_release_notes_published.sh ${{ inputs.version }} +# do +# echo "Release notes not published yet. Sleeping 30 seconds, retrying afterwards" +# sleep 30s +# done +# - name: Compute major.x branch +# id: get_dotx_branch +# run: echo "dotx_branch=$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT +# - name: Create GitHub Release +# env: +# GH_TOKEN: ${{ github.token }} +# run: | +# gh release create v${{ inputs.version }} \ +# --title="Release ${{ inputs.version }}" \ +# --notes="[Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }}) +# ${{ needs.publish_aws_lambda.outputs.arn_content }}" From 32029e8bd793d4a6a23a515ca452db1467d2ca99 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 11:27:34 +0200 Subject: [PATCH 18/22] test --- .buildkite/release.yml | 10 ++++------ .ci/release.sh | 5 +++-- .github/workflows/tmp-test.yml | 12 +++++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.buildkite/release.yml b/.buildkite/release.yml index 43c1119448..7f51edc121 100644 --- a/.buildkite/release.yml +++ b/.buildkite/release.yml @@ -4,12 +4,10 @@ agents: steps: - label: "Run the snapshot" key: "release" - commands: - - echo "hello" - - glcoud --version -# artifact_paths: -# - "release.txt" -# - "**/target/*" + commands: .ci/release.sh + artifact_paths: + - "release.txt" + - "**/target/*" notify: - slack: "#apm-agent-java" diff --git a/.ci/release.sh b/.ci/release.sh index 92ce5a6ffc..f8e5dd73d4 100755 --- a/.ci/release.sh +++ b/.ci/release.sh @@ -26,7 +26,8 @@ java -version set +x echo "--- Deploy the release :package:" if [[ "$dry_run" == "true" ]] ; then - ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true | release.txt + ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true | tee release.txt else - ./mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt + echo "hello" | tee release.txt + # ./mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt fi diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml index ce7940e925..8a34b03222 100644 --- a/.github/workflows/tmp-test.yml +++ b/.github/workflows/tmp-test.yml @@ -8,14 +8,16 @@ jobs: steps: - id: buildkite name: Run Deploy - uses: elastic/apm-pipeline-library/.github/actions/buildkite@current + uses: reakaleek/apm-pipeline-library/.github/actions/buildkite@feature/buildkite-download-artifacts with: vaultUrl: ${{ secrets.VAULT_ADDR }} vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} pipeline: apm-agent-java-release - pipelineVersion: ${{ github.head_ref }} - waitFor: false - printBuildLogs: false + pipelineVersion: ${{ inputs.version }} + waitFor: true + printBuildLogs: true + artifactName: lambda-zip + artifactPath: "elastic-apm-agent/target/**/elastic-apm-java-aws-lambda-layer-*.zip" buildEnvVars: | - dry_run=${{ inputs.dry_run || 'false' }} + dry_run=true From c719298932ec70dcbb123ad53f835ea42872e3c1 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 11:30:42 +0200 Subject: [PATCH 19/22] test --- .github/workflows/tmp-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml index 8a34b03222..dac4274912 100644 --- a/.github/workflows/tmp-test.yml +++ b/.github/workflows/tmp-test.yml @@ -14,7 +14,7 @@ jobs: vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} pipeline: apm-agent-java-release - pipelineVersion: ${{ inputs.version }} + pipelineVersion: ${{ github.head_ref }} waitFor: true printBuildLogs: true artifactName: lambda-zip From 9d4cb34dba06092a1bc322d569d2979f826b0c6c Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 11:44:19 +0200 Subject: [PATCH 20/22] test --- .github/workflows/tmp-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml index dac4274912..c743c83862 100644 --- a/.github/workflows/tmp-test.yml +++ b/.github/workflows/tmp-test.yml @@ -18,6 +18,6 @@ jobs: waitFor: true printBuildLogs: true artifactName: lambda-zip - artifactPath: "elastic-apm-agent/target/**/elastic-apm-java-aws-lambda-layer-*.zip" + artifactPath: "elastic-apm-agent/target/elastic-apm-java-aws-lambda-layer-*.zip" buildEnvVars: | dry_run=true From 6b199028e939f1dcf2239269d8d9fbaf04687ba5 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 11:56:24 +0200 Subject: [PATCH 21/22] test --- .github/workflows/tmp-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml index c743c83862..4dd0655423 100644 --- a/.github/workflows/tmp-test.yml +++ b/.github/workflows/tmp-test.yml @@ -16,7 +16,7 @@ jobs: pipeline: apm-agent-java-release pipelineVersion: ${{ github.head_ref }} waitFor: true - printBuildLogs: true + printBuildLogs: false artifactName: lambda-zip artifactPath: "elastic-apm-agent/target/elastic-apm-java-aws-lambda-layer-*.zip" buildEnvVars: | From 03bbd65a3da97a0a6f3dcba18e09f74b9c8f12fb Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 5 Jun 2023 12:44:18 +0200 Subject: [PATCH 22/22] test --- .github/workflows/tmp-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tmp-test.yml b/.github/workflows/tmp-test.yml index 4dd0655423..41ee6fc38e 100644 --- a/.github/workflows/tmp-test.yml +++ b/.github/workflows/tmp-test.yml @@ -18,6 +18,6 @@ jobs: waitFor: true printBuildLogs: false artifactName: lambda-zip - artifactPath: "elastic-apm-agent/target/elastic-apm-java-aws-lambda-layer-*.zip" + artifactPath: "elastic-apm-agent/target/**/elastic-apm-java-aws-lambda-layer-*.zip" buildEnvVars: | dry_run=true