From 2f352f7f9d96ddb281f70d77f6307a6488610a24 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 30 Apr 2021 13:39:36 +0100 Subject: [PATCH] Revert "[CI] googleStorageUploadExt step (#24048)" (#25454) This reverts commit 8064395f7e529247e4a74c7d7a1205e2abe4db13. (cherry picked from commit cdcbe36be36b50791ff4aaf7fa69fc457b675333) --- .ci/packaging.groovy | 16 +++++++++------- Jenkinsfile | 22 ++++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.ci/packaging.groovy b/.ci/packaging.groovy index a718aa26744..14327ded2be 100644 --- a/.ci/packaging.groovy +++ b/.ci/packaging.groovy @@ -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' @@ -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 + ) } /** @@ -530,4 +532,4 @@ def fixPermissions() { } } } -} +} \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 30479827d91..c280bfc5840 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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}" @@ -326,10 +325,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 + ) } /** @@ -724,12 +726,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) } /**