Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Oct 30, 2024
1 parent 52d01f0 commit bf7965f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions vars/uploadMinSnapshotsToS3.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,25 @@ void call(Map args = [:]) {
withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') {
// min artifacts
echo("Upload min snapshots")
s3Upload(file: "${srcDir}/${baseName}-latest.${extension}", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}")
s3Upload(file: "${srcDir}/${baseName}-latest.${extension}.sha512", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}.sha512")
s3Upload(file: "${srcDir}/${baseName}-latest.${extension}.build-manifest.yml", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}.build-manifest.yml")
//s3Upload(file: "${srcDir}/${baseName}-latest.${extension}", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}")
//s3Upload(file: "${srcDir}/${baseName}-latest.${extension}.sha512", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}.sha512")
//s3Upload(file: "${srcDir}/${baseName}-latest.${extension}.build-manifest.yml", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}.build-manifest.yml")
// core plugins
if (architecture == "x64" && platform == "linux" && distribution == "tar" && corePluginDirExists) {
echo("Upload core plugins")
List<String> corePluginList = buildManifest.components.artifacts.'core-plugins'[0]
for (String pluginSubPath : corePluginList) {
String pluginSubFolder = pluginSubPath.split('/')[0]
String pluginNameWithExt = pluginSubPath.split('/')[1]
String pluginName = pluginNameWithExt.replace('-' + revision + '.zip', '')
String pluginNameNoExt = pluginNameWithExt.replace('-' + revision, '')
String pluginFullPath = ['plugins', pluginName, revision].join('/')
s3Upload(
bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}",
path: "releases/$pluginFullPath/",
workingDir: "$prefixPath/$artifactPath/builds/$filename/core-plugins/",
includePathPattern: "**/${pluginName}*"
)
String pluginName = pluginNameWithExt.replace('-' + version + 'SNAPSHOT' + '.zip', '')
String pluginFullPath = ['plugins', pluginName, version + 'SNAPSHOT'].join('/')
echo("pluginFullPath: ${pluginFullPath}")
//s3Upload(
// bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}",
// path: "test/snapshots/${pluginFullPath}/",
// workingDir: "${corePluginDir}/",
// includePathPattern: "**/${pluginName}*"
//)
}
}
}
Expand Down

0 comments on commit bf7965f

Please sign in to comment.