Skip to content

Commit

Permalink
Add missing variable
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
  • Loading branch information
gaiksaya committed Jul 20, 2022
1 parent 4d428a3 commit 7a1d832
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
uploadArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME})
uploadArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME})
uploadArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT})
uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT], groovy.lang.Closure)
uploadArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME})
uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PROMOTION_ROLE_NAME], groovy.lang.Closure)
uploadArtifacts.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/vars-build/1.3.0/33/linux/x64/tar)
uploadArtifacts.uploadToS3({sourcePath=tar/builds, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.3.0/33/linux/x64/tar/builds})
uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC})
Expand All @@ -46,7 +47,7 @@
uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
uploadToS3.s3Upload({file=tar/dist, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.3.0/33/linux/x64/tar/dist})
uploadArtifacts.echo(Uploading to s3://ARTIFACT_PRODUCTION_BUCKET_NAME/vars-build/1.3.0/33/linux/x64/tar)
uploadArtifacts.withAWS({role=role, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
uploadArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
uploadArtifacts.s3Upload({file=tar/builds/opensearch/dist/opensearch-min-1.3.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/core/opensearch/1.3.0/})
uploadArtifacts.s3Upload({file=tar/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/bundle/opensearch/1.3.0/})
BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33)
Expand Down
5 changes: 3 additions & 2 deletions tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
uploadArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME})
uploadArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME})
uploadArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT})
uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT], groovy.lang.Closure)
uploadArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME})
uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PROMOTION_ROLE_NAME], groovy.lang.Closure)
uploadArtifacts.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/vars-build/1.1.0/33/linux/x64/tar)
uploadArtifacts.uploadToS3({sourcePath=tar/builds, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.1.0/33/linux/x64/tar/builds})
uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC})
Expand All @@ -36,7 +37,7 @@
uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
uploadToS3.s3Upload({file=tar/dist, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.1.0/33/linux/x64/tar/dist})
uploadArtifacts.echo(Uploading to s3://ARTIFACT_PRODUCTION_BUCKET_NAME/vars-build/1.1.0/33/linux/x64/tar)
uploadArtifacts.withAWS({role=role, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
uploadArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
uploadArtifacts.s3Upload({file=tar/builds/opensearch/dist/opensearch-min-1.1.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/core/opensearch/1.1.0/})
uploadArtifacts.s3Upload({file=tar/dist/opensearch/opensearch-1.1.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/bundle/opensearch/1.1.0/})
BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33)
Expand Down
3 changes: 2 additions & 1 deletion tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
uploadArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME})
uploadArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME})
uploadArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT})
uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT], groovy.lang.Closure)
uploadArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME})
uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PROMOTION_ROLE_NAME], groovy.lang.Closure)
uploadArtifacts.echo(Uploading to s3://artifact-bucket/vars-build/1.3.0/33/linux/x64/tar)
uploadArtifacts.uploadToS3({sourcePath=tar/builds, bucket=artifact-bucket, path=vars-build/1.3.0/33/linux/x64/tar/builds})
uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC})
Expand Down
3 changes: 2 additions & 1 deletion vars/uploadArtifacts.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ void call(Map args = [:]) {
withCredentials([
string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME'),
string(credentialsId: 'jenkins-artifact-production-bucket-name', variable: 'ARTIFACT_PRODUCTION_BUCKET_NAME'),
string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT'),]) {
string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT'),
string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME')]) {
echo "Uploading to s3://${ARTIFACT_BUCKET_NAME}/${artifactPath}"

uploadToS3(
Expand Down

0 comments on commit 7a1d832

Please sign in to comment.