-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple lambda layer release from buildkite build (#3251)
- Loading branch information
Showing
8 changed files
with
117 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,9 +102,6 @@ jobs: | |
pipelineVersion: ${{ env.TAG_NAME }} | ||
waitFor: true | ||
printBuildLogs: false | ||
artifactName: lambda-zip | ||
artifactPath: "elastic-apm-agent/target/elastic-apm-java-aws-lambda-layer-*.zip" | ||
artifactIfNoFilesFound: error | ||
# The action fails with .github/actions/buildkite/run.sh: line 24: 3: parameter missing. | ||
# Which is an unexpected bug. | ||
# Adding a random buildEnvVar to circumvent the behaviour. | ||
|
@@ -220,10 +217,14 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.TAG_NAME }} | ||
- uses: actions/download-artifact@v3 | ||
- name: Set up JDK ${{ env.JAVA_VERSION }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
name: lambda-zip | ||
path: elastic-apm-agent/target | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: ${{ env.JAVA_DIST }} | ||
cache: 'maven' | ||
- name: Build Lambda-layer zip using agent from maven-central | ||
run: ./mvnw dependency:purge-local-repository package -pl apm-agent-lambda-layer | ||
- uses: hashicorp/[email protected] | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>apm-agent-parent</artifactId> | ||
<groupId>co.elastic.apm</groupId> | ||
<version>1.40.1-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>apm-agent-lambda-layer</artifactId> | ||
<name>${project.groupId}:${project.artifactId}</name> | ||
|
||
<properties> | ||
<maven-deploy-plugin.skip>true</maven-deploy-plugin.skip> | ||
<apm-agent-parent.base.dir>${project.basedir}/..</apm-agent-parent.base.dir> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- This dependency listing is required so that running | ||
./mvnw dependency:purge-local-repository package -pl apm-agent-lambda-layer | ||
in the parent project forces a redownload of the agent artifact from maven central. | ||
--> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>elastic-apm-agent</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>elastic-apm-agent</artifactId> | ||
<destFileName>elastic-apm-agent.jar</destFileName> | ||
</artifactItem> | ||
</artifactItems> | ||
<outputDirectory>${project.build.directory}</outputDirectory> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/aws-lambda</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>src/main/assembly</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>elastic-apm-handler</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
<delimiters> | ||
<delimiter>[[*]]</delimiter> | ||
</delimiters> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/main/assembly/aws-lambda-layer.xml</descriptor> | ||
</descriptors> | ||
<finalName>elastic-apm-java-aws-lambda-layer-${project.version}</finalName> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters