Skip to content

Commit

Permalink
Revert "[CI] googleStorageUploadExt step (elastic#24048)"
Browse files Browse the repository at this point in the history
This reverts commit 8064395.
  • Loading branch information
v1v committed Apr 30, 2021
1 parent c5b5b77 commit a9c713d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
16 changes: 9 additions & 7 deletions .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pipeline {
JOB_GCS_BUCKET = 'beats-ci-artifacts'
JOB_GCS_BUCKET_STASH = 'beats-ci-temp'
JOB_GCS_CREDENTIALS = 'beats-ci-gcs-plugin'
JOB_GCS_EXT_CREDENTIALS = 'beats-ci-gcs-plugin-file-credentials'
DOCKERELASTIC_SECRET = 'secret/observability-team/ci/docker-registry/prod'
DOCKER_REGISTRY = 'docker.elastic.co'
GITHUB_CHECK_E2E_TESTS_NAME = 'E2E Tests'
Expand Down Expand Up @@ -471,11 +470,14 @@ def publishPackages(baseDir){
uploadPackages("${bucketUri}/${beatsFolderName}", baseDir)
}

def uploadPackages(bucketUri, beatsFolder){
googleStorageUploadExt(bucket: bucketUri,
credentialsId: "${JOB_GCS_EXT_CREDENTIALS}",
pattern: "${beatsFolder}/build/distributions/**/*",
sharedPublicly: true)
def uploadPackages(bucketUri, baseDir){
googleStorageUpload(bucket: bucketUri,
credentialsId: "${JOB_GCS_CREDENTIALS}",
pathPrefix: "${baseDir}/build/distributions/",
pattern: "${baseDir}/build/distributions/**/*",
sharedPublicly: true,
showInline: true
)
}

/**
Expand Down Expand Up @@ -530,4 +532,4 @@ def fixPermissions() {
}
}
}
}
}
22 changes: 12 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pipeline {
DOCKER_REGISTRY = 'docker.elastic.co'
JOB_GCS_BUCKET = 'beats-ci-temp'
JOB_GCS_CREDENTIALS = 'beats-ci-gcs-plugin'
JOB_GCS_EXT_CREDENTIALS = 'beats-ci-gcs-plugin-file-credentials'
OSS_MODULE_PATTERN = '^[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*'
PIPELINE_LOG_LEVEL = 'INFO'
PYTEST_ADDOPTS = "${params.PYTEST_ADDOPTS}"
Expand Down Expand Up @@ -387,10 +386,13 @@ def publishPackages(beatsFolder){
* @param beatsFolder the beats folder.
*/
def uploadPackages(bucketUri, beatsFolder){
googleStorageUploadExt(bucket: bucketUri,
credentialsId: "${JOB_GCS_EXT_CREDENTIALS}",
googleStorageUpload(bucket: bucketUri,
credentialsId: "${JOB_GCS_CREDENTIALS}",
pathPrefix: "${beatsFolder}/build/distributions/",
pattern: "${beatsFolder}/build/distributions/**/*",
sharedPublicly: true)
sharedPublicly: true,
showInline: true
)
}

/**
Expand Down Expand Up @@ -785,12 +787,12 @@ def archiveTestOutput(Map args = [:]) {
* disk space of the jenkins instance
*/
def tarAndUploadArtifacts(Map args = [:]) {
def fileName = args.file.replaceAll('[^A-Za-z-0-9]','-')
tar(file: fileName, dir: args.location, archive: false, allowMissing: true)
googleStorageUploadExt(bucket: "gs://${JOB_GCS_BUCKET}/${env.JOB_NAME}-${env.BUILD_ID}",
credentialsId: "${JOB_GCS_EXT_CREDENTIALS}",
pattern: "${fileName}",
sharedPublicly: true)
tar(file: args.file, dir: args.location, archive: false, allowMissing: true)
googleStorageUpload(bucket: "gs://${JOB_GCS_BUCKET}/${env.JOB_NAME}-${env.BUILD_ID}",
credentialsId: "${JOB_GCS_CREDENTIALS}",
pattern: "${args.file}",
sharedPublicly: true,
showInline: true)
}

/**
Expand Down

0 comments on commit a9c713d

Please sign in to comment.