Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
steelhead31 committed Jan 10, 2025
1 parent fff9ebe commit e87d2b8
Showing 1 changed file with 61 additions and 27 deletions.
88 changes: 61 additions & 27 deletions linux_new/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
def NODE_LABEL = 'build&&linux&&x64&&dockerBuild&&dynamicAzure' // Default node
def PRODUCT = 'temurin'
def JVM = 'hotspot'

// Artifactory Global Variables
def baseURL = "https://github.com/adoptium/"
def artBaseURL = "https://adoptium.jfrog.io/artifactory"

// Github Artifact Repos
def binaryRepo = "${params.VERSION.replace('jdk', 'temurin')}-binaries/releases/tag/${params.TAG}"
def binaryDLRepo = "${params.VERSION.replace('jdk', 'temurin')}-binaries/releases/download/${params.TAG}"
def fullURL = "${baseURL}/${binaryRepo}"
Expand All @@ -26,32 +30,60 @@ def deb_distros = [
"bionic" // Ubuntu/18.04 (LTS)
]

// def rhel_distros = [
// 'rpm/centos/7',
// 'rpm/rocky/8',
// 'rpm/rhel/7',
// 'rpm/rhel/8',
// 'rpm/rhel/9',
// 'rpm/fedora/35',
// 'rpm/fedora/36',
// 'rpm/fedora/37',
// 'rpm/fedora/38',
// 'rpm/fedora/39',
// 'rpm/fedora/40',
// 'rpm/fedora/41',
// 'rpm/fedora/42',
// 'rpm/fedora/rawhide',
// 'rpm/oraclelinux/7',
// 'rpm/oraclelinux/8',
// 'rpm/amazonlinux/2'
// ]

// def suse_distros = [
// 'rpm/opensuse/15.3',
// 'rpm/opensuse/15.4',
// 'rpm/opensuse/15.5',
// 'rpm/sles/12',
// 'rpm/sles/15'
// ]

def rhel_distros = [
'rpm/centos/7',
'rpm/rocky/8',
'rpm/rhel/7',
'rpm/rhel/8',
'rpm/rhel/9',
'rpm/fedora/35',
'rpm/fedora/36',
'rpm/fedora/37',
'rpm/fedora/38',
'rpm/fedora/39',
'rpm/fedora/40',
'rpm/fedora/41',
'rpm/fedora/42',
'rpm/fedora/rawhide',
'rpm/oraclelinux/7',
'rpm/oraclelinux/8',
'rpm/amazonlinux/2'
'sfr-rpm-test/centos/7',
'sfr-rpm-test/rocky/8',
'sfr-rpm-test/rhel/7',
'sfr-rpm-test/rhel/8',
'sfr-rpm-test/rhel/9',
'sfr-rpm-test/fedora/35',
'sfr-rpm-test/fedora/36',
'sfr-rpm-test/fedora/37',
'sfr-rpm-test/fedora/38',
'sfr-rpm-test/fedora/39',
'sfr-rpm-test/fedora/40',
'sfr-rpm-test/fedora/41',
'sfr-rpm-test/fedora/42',
'sfr-rpm-test/fedora/rawhide',
'sfr-rpm-test/oraclelinux/7',
'sfr-rpm-test/oraclelinux/8',
'sfr-rpm-test/amazonlinux/2'
]

def suse_distros = [
'rpm/opensuse/15.3',
'rpm/opensuse/15.4',
'rpm/opensuse/15.5',
'rpm/sles/12',
'rpm/sles/15'
'sfr-rpm-test/opensuse/15.3',
'sfr-rpm-test/opensuse/15.4',
'sfr-rpm-test/opensuse/15.5',
'sfr-rpm-test/sles/12',
'sfr-rpm-test/sles/15'
]

/* End Of Distro Definitions*/
Expand Down Expand Up @@ -175,7 +207,7 @@ def CheckAndUpload(String Target, String Distro, String BuildArch, String RelVer
env.PACKAGEDIR = PackageDir
env.KEY = Key
env.FILENAME = FileName

// WORKING HERE

try {
Expand All @@ -188,7 +220,7 @@ def CheckAndUpload(String Target, String Distro, String BuildArch, String RelVer
switch(Distro) { // Distro Values ( Alpine / RPMS / Debian )
case "Debian":
echo "About To Upload Debian File"
env.VERSION=17
// env.VERSION=17
// Debian : jf 'rt u **/build/ospackage/{FileName} deb/pool/main/t/temurin-${RelVersion}/ --target-props=${DistroList}deb.component=main;deb.architecture=${BuildArch} --flat=true'
// def Target = "https://adoptium.jfrog.io/artifactory/deb/pool/main/t/temurin-${VERSION}/${FileName}"
// CheckAndUpload(Target, Distro, BUILDARCH, VERSION, DISTROLIST, '', '', '', '' )
Expand All @@ -201,9 +233,9 @@ def CheckAndUpload(String Target, String Distro, String BuildArch, String RelVer
// echo "DistroList = ${DISTROLIST}"
// sh "find . -path '*/build/ospackage/${FileName}' -exec ls -ltr {} +"
echo "Debian Sample Command:"
echo "jf 'rt u ${FILENAME} sfr-deb-test/pool/main/t/temurin-${VERSION}/ --target-props=${DISTROLIST}deb.component=main;deb.architecture=${BUILDARCH} --flat=true'"
echo "jf 'rt u ${FILENAME} deb/pool/main/t/temurin-${VERSION}/ --target-props=${DISTROLIST}deb.component=main;deb.architecture=${BUILDARCH} --flat=true'"
// This Upload Works
jf 'rt u ${FILENAME} sfr-deb-test/pool/main/t/temurin-${VERSION}/ --target-props=${DISTROLIST}deb.component=main;deb.architecture=${BUILDARCH} --flat=true'
// jf 'rt u ${FILENAME} deb/pool/main/t/temurin-${VERSION}/ --target-props=${DISTROLIST}deb.component=main;deb.architecture=${BUILDARCH} --flat=true'
break
case "Alpine":
echo "About To Upload Alpine File"
Expand All @@ -225,6 +257,7 @@ def CheckAndUpload(String Target, String Distro, String BuildArch, String RelVer
echo "RPM Sample Command:"
echo "jf 'rt u ${FILENAME} ${PACKAGEDIR} --flat=true'"
// sh "ls -l ${FileName}"
jf 'rt u ${FILENAME} ${PACKAGEDIR} --flat=true'
break
default:
echo "Default Case"
Expand Down Expand Up @@ -981,7 +1014,8 @@ stage('Build & Archive Package') {
// Calculate Key
suse_distros.each { suse_distro ->
SUSEkey = "${suse_distro}/${SUSEarchitecture}"
SUSETarget = "https://adoptium.jfrog.io/artifactory/${SUSEkey}/Packages"
// SUSETarget = "https://adoptium.jfrog.io/artifactory/${SUSEkey}/Packages"
SUSETarget = "${artBaseURL}/${SUSEkey}/Packages"
CheckAndUpload(SUSETarget, SUSEDistro, SUSEarchitecture, '', '', '', SUSETarget, SUSEkey, SUSEFilePath)
}
// SUSETarget = "https://adoptium.jfrog.io/artifactory/"
Expand Down

0 comments on commit e87d2b8

Please sign in to comment.