Skip to content

Commit

Permalink
Fix Jfrog CLI command (adoptium#724)
Browse files Browse the repository at this point in the history
* Fix Jfrog CLI command

* Update Jenkinsfile

* Update Jenkinsfile

* Update Jenkinsfile

* Update Jenkinsfile

* try now
  • Loading branch information
gdams authored Aug 31, 2023
1 parent 3d594df commit 83f892e
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions linux/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ pipeline {
}
}
}
stage('BUILD')
{
stage('BUILD') {
parallel{
stage('Build Installer for Alpine') {
when {
Expand Down Expand Up @@ -183,6 +182,7 @@ def jenkinsStepDeb() {
// reallocate jenkins agent per element in list
node("linux&&${debLabel}") {
setup('Debian', "${DebARCH}")
tool name: 'jfrog-cli', type: 'jfrog'
unstash 'installercode'
buildAndTest('Debian', "${DebARCH}")
if (params.uploadPackage.toBoolean()) {
Expand Down Expand Up @@ -279,8 +279,11 @@ def uploadArtifacts(String DISTRO, String buildArch) {

def uploadAlpineArtifacts(String buildArch) {
// currently only support x64 as buildArch
jf "rt u '**/build/ospackage/temurin-*j*.apk' 'apk/alpine/main/${buildArch}/' --flat=true"
jf "rt u '**/build/ospackage/temurin-*src*.apk' 'apk/alpine/main/${buildArch}/' --flat=true"
// set BUILDARCH environment variable for ${buildArch}
env.BUILDARCH = buildArch
jf 'rt u **/build/ospackage/temurin-*j*.apk apk/alpine/main/${BUILDARCH}/ --flat=true'
jf 'rt u **/build/ospackage/temurin-*src*.apk apk/alpine/main/${BUILDARCH}/ --flat=true'
// unset BUILDARCH environment variable
}

def uploadDebArtifacts(String buildArch) {
Expand Down Expand Up @@ -329,7 +332,9 @@ def uploadDebArtifacts(String buildArch) {
*/
sleep 2
} else {
jf "rt u '**/build/ospackage/temurin-*${debArchList[buildArch]}.deb' 'deb/pool/main/t/temurin-${VERSION}/' --props='${distro_list}deb.component=main;deb.architecture=${debArchList[buildArch]}' --flat=true"
env.BUILDARCH = debArchList[buildArch]
env.DISTROLIST = distro_list
jf 'rt u **/build/ospackage/temurin-*${BUILDARCH}.deb deb/pool/main/t/temurin-${VERSION}/ --target-props=${DISTROLIST}deb.component=main;deb.architecture=${BUILDARCH} --flat=true'
break
}
}
Expand Down Expand Up @@ -396,7 +401,10 @@ def uploadRpmArtifacts(String DISTRO, String rpmArch) {
*/
sleep 2
} else {
jf "rt u '**/build/ospackage/*.${entry.value}.rpm' '${packageDir}/${entry.key}/Packages/' --flat=true"
env.VALUE = entry.value
env.KEY = entry.key
env.PACKAGEDIR = packageDir
jf 'rt u **/build/ospackage/*.${VALUE}.rpm ${PACKAGEDIR}/${KEY}/Packages/ --flat=true'
break
}
}
Expand Down

0 comments on commit 83f892e

Please sign in to comment.