forked from opensearch-project/opensearch-build-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildShManifestIncremental_Jenkinsfile.txt
35 lines (35 loc) · 3.68 KB
/
BuildShManifestIncremental_Jenkinsfile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
BuildShManifestIncremental_Jenkinsfile.run()
BuildShManifestIncremental_Jenkinsfile.pipeline(groovy.lang.Closure)
BuildShManifestIncremental_Jenkinsfile.echo(Executing on agent [label:none])
BuildShManifestIncremental_Jenkinsfile.stage(Test build manifest jenkins var, groovy.lang.Closure)
BuildShManifestIncremental_Jenkinsfile.script(groovy.lang.Closure)
BuildShManifestIncremental_Jenkinsfile.buildManifest({inputManifest=tests/data/opensearch-input-2.12.0.yml, distribution=tar, platform=linux, architecture=x64, incremental=true, previousBuildId=latest})
buildManifest.legacySCM(groovy.lang.Closure)
buildManifest.library({identifier=jenkins@main, retriever=null})
buildManifest.readYaml({file=tests/data/opensearch-input-2.12.0.yml})
InputManifest.asBoolean()
buildManifest.sh({script=curl -sL dummy-url/dummy-build-job/2.12.0/index/linux/x64/tar/index.json | jq -r ".latest" > /dev/null 2>&1, returnStatus=true})
buildManifest.sh({script=curl -sL dummy-url/dummy-build-job/2.12.0/index.json | jq -r ".latest" > /dev/null 2>&1, returnStatus=true})
buildManifest.echo(Use new URL path for the latest index.)
buildManifest.sh({script=curl -sL dummy-url/dummy-build-job/2.12.0/index/linux/x64/tar/index.json | jq -r ".latest", returnStdout=true})
buildManifest.echo(Incremental build enabled! Retrieving previous build library.)
buildManifest.retrievePreviousBuild({inputManifest=tests/data/opensearch-input-2.12.0.yml, distribution=tar, platform=linux, architecture=x64, incremental=true, previousBuildId=latest, distributionBuildNumber=bbb
ccc})
retrievePreviousBuild.legacySCM(groovy.lang.Closure)
retrievePreviousBuild.library({identifier=jenkins@main, retriever=null})
retrievePreviousBuild.readYaml({file=tests/data/opensearch-input-2.12.0.yml})
InputManifest.asBoolean()
retrievePreviousBuild.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME})
retrievePreviousBuild.withCredentials([ARTIFACT_BUCKET_NAME], groovy.lang.Closure)
retrievePreviousBuild.downloadFromS3({assumedRoleName=opensearch-bundle, roleAccountNumberCred=jenkins-aws-account-public, downloadPath=dummy-build-job/2.12.0/bbb
ccc/linux/x64/tar/, bucketName=ARTIFACT_BUCKET_NAME, localPath=/tmp/workspace/download, force=true})
downloadFromS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_NUMBER})
downloadFromS3.withCredentials([AWS_ACCOUNT_NUMBER], groovy.lang.Closure)
downloadFromS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_NUMBER, duration=900, roleSessionName=jenkins-session, region=us-east-1}, groovy.lang.Closure)
downloadFromS3.s3Download({file=/tmp/workspace/download, bucket=ARTIFACT_BUCKET_NAME, path=dummy-build-job/2.12.0/bbb
ccc/linux/x64/tar/, force=true})
retrievePreviousBuild.sh(rm -rf tar && mkdir -p tar && mv -v /tmp/workspace/download/dummy-build-job/2.12.0/bbb
ccc/linux/x64/tar/* /tmp/workspace/tar)
retrievePreviousBuild.echo(Setting up Maven Local for OpenSearch build.)
retrievePreviousBuild.sh(mkdir -p ~/.m2/repository/org/ && cp -r tar/builds/opensearch/maven/org/opensearch/ ~/.m2/repository/org/)
buildManifest.sh(./build.sh tests/data/opensearch-input-2.12.0.yml -d tar -p linux -a x64 --incremental)