Skip to content

Commit

Permalink
more test
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Oct 31, 2024
1 parent 9cff97c commit 19eca43
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vars/uploadMinSnapshotsToS3.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ void call(Map args = [:]) {

def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest))
String productName = inputManifest.build.getFilename()
String version_plain = inputManifest.build.version
String qualifier = inputManifest.build.qualifier ? '-' + inputManifest.build.qualifier : ''
String revision = version_plain + qualifier
def buildManifestYamlOnly = readYaml(file: "$WORKSPACE/${distribution_arg}/builds/${productName}/manifest.yml")
echo("Retreving build manifest from: $WORKSPACE/${distribution_arg}/builds/${productName}/manifest.yml")

def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: "$WORKSPACE/${distribution_arg}/builds/${productName}/manifest.yml"))
Expand Down Expand Up @@ -87,13 +91,13 @@ void call(Map args = [:]) {
// core plugins
if (architecture == "x64" && platform == "linux" && distribution == "tar" && corePluginDirExists) {
echo("Upload core plugins")
List<String> corePluginList = buildManifest.components.artifacts.'core-plugins'
List<String> corePluginList = buildManifestYamlOnly.components.artifacts.'core-plugins'[0]
echo("corePluginList: ${corePluginList}")
for (String pluginSubPath : corePluginList) {
String pluginSubFolder = pluginSubPath.split('/')[0]
String pluginNameWithExt = pluginSubPath.split('/')[1]
String pluginName = pluginNameWithExt.replace('-' + version + 'SNAPSHOT' + '.zip', '')
String pluginFullPath = ['plugins', pluginName, version + 'SNAPSHOT'].join('/')
String pluginName = pluginNameWithExt.replace('-' + revision + 'SNAPSHOT' + '.zip', '')
String pluginFullPath = ['plugins', pluginName, revision + 'SNAPSHOT'].join('/')
echo("pluginFullPath: ${pluginFullPath}")
//s3Upload(
// bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}",
Expand Down

0 comments on commit 19eca43

Please sign in to comment.