Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pipeline {
BASE_DIR = "src/github.com/elastic/${env.REPO}"
PIPELINE_LOG_LEVEL = 'INFO'
SUFFIX_ARN_FILE = 'arn-file.md'
ELASTIC_LAYER_NAME = 'apm-lambda-extension'
}
options {
timeout(time: 1, unit: 'HOURS')
Expand All @@ -30,6 +29,7 @@ pipeline {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}")
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
setEnvVar('ELASTIC_LAYER_NAME', "elastic-apm-lambda-extension${getVersion()}")
}
}
stage('Lint'){
Expand Down Expand Up @@ -171,3 +171,15 @@ pipeline {
}
}
}

/**
* Transform TAG releases from v{major}.{minor}.{patch} to
* ver-{major}-{minor}-{patch}. f.i: given v1.2.3 then
* ver-1-2-3.
*/
def getVersion() {
if (env.BRANCH_NAME?.trim() && env.BRANCH_NAME.startsWith('v')) {
return env.BRANCH_NAME.replaceAll('v', '-ver').replaceAll('\\.', '-')
}
return ''
}
2 changes: 1 addition & 1 deletion apm-lambda-extension/cli/build-and-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getLastJsonFromShellOutput (output) {
function buildAndPublish () {
return new Promise(function (resolve, reject) {
if (!process.env.ELASTIC_LAYER_NAME) {
process.env.ELASTIC_LAYER_NAME = 'apm-lambda-extension'
process.env.ELASTIC_LAYER_NAME = 'elastic-apm-extension'
}
console.log('running cd .. && make build-and-publish')
exec('cd .. && make build-and-publish', (error, stdout, stderr) => {
Expand Down