File tree Expand file tree Collapse file tree 3 files changed +71
-1
lines changed Expand file tree Collapse file tree 3 files changed +71
-1
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,39 @@ pipeline {
250250 }
251251 }
252252 }
253+
254+ /**
255+ Publish a snapshot. A "snapshot" is a packaging of the latest *unreleased* APM agent,
256+ published to a known GCS bucket for use in edge demo/test environments.
257+ */
258+ stage(' Publish snapshot' ) {
259+ options { skipDefaultCheckout() }
260+ environment {
261+ BUCKET_NAME = ' oblt-artifacts'
262+ DOCKER_REGISTRY = ' docker.elastic.co'
263+ DOCKER_REGISTRY_SECRET = ' secret/observability-team/ci/docker-registry/prod'
264+ GCS_ACCOUNT_SECRET = ' secret/observability-team/ci/snapshoty'
265+ }
266+ when { branch ' main' }
267+ steps {
268+ withGithubNotify(context : ' Publish snapshot packages' ) {
269+ deleteDir()
270+ unstash name : ' source'
271+ withNodeJSEnv(version : env. BUILD_NODE_VERSION ) {
272+ dir(env. BASE_DIR ) {
273+ sh(label : ' package snapshot' , script : ' npm run package:snapshot' )
274+ snapshoty(
275+ bucket : env. BUCKET_NAME ,
276+ gcsAccountSecret : env. GCS_ACCOUNT_SECRET ,
277+ dockerRegistry : env. DOCKER_REGISTRY ,
278+ dockerSecret : env. DOCKER_REGISTRY_SECRET
279+ )
280+ }
281+ }
282+ }
283+ }
284+ }
285+
253286 stage(' Release' ) {
254287 options { skipDefaultCheckout() }
255288 when {
Original file line number Diff line number Diff line change 1+ ---
2+
3+ # Version of configuration to use
4+ version : ' 1.0'
5+
6+ # You can define a Google Cloud Account to use
7+ account :
8+ # Project id of the service account
9+ project : ' ${GCS_PROJECT}'
10+ # Private key id of the service account
11+ private_key_id : ' ${GCS_PRIVATE_KEY_ID}'
12+ # Private key of the service account
13+ private_key : ' ${GCS_PRIVATE_KEY}'
14+ # Email of the service account
15+ client_email : ' ${GCS_CLIENT_EMAIL}'
16+ # URI token
17+ token_uri : ' https://oauth2.googleapis.com/token'
18+
19+ # List of artifacts
20+ artifacts :
21+ # Path to use for artifacts discovery
22+ - path : ' ./build/snapshot'
23+ # Files pattern to match
24+ files_pattern : ' elastic-apm-node-(?P<app_version>\d+\.\d+\.\d+)\.tgz'
25+ # File layout on GCS bucket
26+ output_pattern : ' {project}/{jenkins_branch_name}/elastic-apm-node-{app_version}-{jenkins_git_commit_short}.tgz'
27+ # List of metadata processors to use.
28+ metadata :
29+ # Define static custom metadata
30+ - name : ' custom'
31+ data :
32+ project : ' apm-agent-nodejs'
33+ # Add git metadata
34+ - name : ' git'
35+ # Add jenkins metadata
36+ - name : ' jenkins'
Original file line number Diff line number Diff line change 2828 "docker:start" : " docker-compose -f ./test/docker-compose.yml up -d" ,
2929 "docker:stop" : " docker-compose -f ./test/docker-compose.yml down" ,
3030 "docker:clean" : " ./test/script/docker/cleanup.sh" ,
31- "docker:dev" : " docker-compose -f ./dev-utils/docker-compose.yml run --workdir=/agent nodejs-agent"
31+ "docker:dev" : " docker-compose -f ./dev-utils/docker-compose.yml run --workdir=/agent nodejs-agent" ,
32+ "package:snapshot" : " rm -rf ./build/snapshot && mkdir -p ./build/snapshot && npm pack --pack-destination ./build/snapshot"
3233 },
3334 "directories" : {
3435 "test" : " test"
You can’t perform that action at this time.
0 commit comments