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 afd9b0c commit 1c18728
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions linux_new/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def JVM = 'hotspot'

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

// Github Artifact Repos
def binaryRepo = "${params.VERSION.replace('jdk', 'temurin')}-binaries/releases/tag/${params.TAG}"
Expand Down Expand Up @@ -185,17 +185,17 @@ def CheckAndUpload(String Target, String Distro, String BuildArch, String RelVer
echo "Entering Check & Upload"
echo "Debug 2001"
echo "${Target} ${Distro} ${BuildArch} ${RelVersion} ${DistroList} ${Value} ${PackageDir} ${Key} ${FileName}"
// echo "Target = ${Target}/${FileName}"
echo "Target = ${Target}/${FileName}"
// echo "Distro = ${Distro}"
echo "Arch = ${BuildArch}"
echo "Version = ${RelVersion}"
def RelNumber = params.VERSION.replaceAll(/[^\d]/, '')
echo "RELNUM = ${RelNumber}"
// echo "DistroList = ${DistroList}"
// echo "Value = ${Value}"
// echo "PackageDir = ${PackageDir}"
// echo "Key = ${Key}"
// echo "Filename = ${FileName}"
echo "DistroList = ${DistroList}"
echo "Value = ${Value}"
echo "PackageDir = ${PackageDir}"
echo "Key = ${Key}"
echo "Filename = ${FileName}"

env.TARGET = Target
env.DISTRO = Distro
Expand All @@ -207,11 +207,12 @@ def CheckAndUpload(String Target, String Distro, String BuildArch, String RelVer
env.PACKAGEDIR = PackageDir
env.KEY = Key
env.FILENAME = FileName
// env.DESTTARGET = RHELTarget = "${RHELkey}/Packages"

// WORKING HERE

try {
def ResponseCode = sh(script: "curl -o /dev/null --silent --head --write-out '%{http_code}' ${Target}/${FileName}", returnStdout: true).trim()
def ResponseCode = sh(script: "curl -o /dev/null --silent --head --write-out '%{http_code}' ${artBaseURL}/${Target}/${FileName}", returnStdout: true).trim()
echo "ResponseCode = ${ResponseCode}"
if ( ResponseCode == '200') {
echo "Target Exists - Skipping"
Expand Down Expand Up @@ -916,7 +917,7 @@ stage('Build & Archive Package') {
for (AlpPackFile in AllFiles) {
def AlpFileName = AlpPackFile.name
def AlpFilePath = AlpPackFile.path
def Target = "${artBaseURL}/apk/alpine/main/${AlpArch}"
def Target = "apk/alpine/main/${AlpArch}"
echo "Debug 1000 - Alpine Upload Debugging"
echo "Target = ${Target}"
echo "Distro = ${AlpDistro}"
Expand All @@ -940,7 +941,7 @@ stage('Build & Archive Package') {
for (DebPackFile in DebPackFiles) {
DebFileName = DebPackFile.name
def DebFilePath = DebPackFile.path
DebTarget = "${artBaseURL}/deb/pool/main/t/temurin-${Release}"
DebTarget = "deb/pool/main/t/temurin-${Release}"
echo "Debug 1001 - Debian Upload Debugging"
echo "Target = ${DebTarget}"
echo "Distro = ${DebDistro}"
Expand Down Expand Up @@ -1016,7 +1017,8 @@ stage('Build & Archive Package') {
suse_distros.each { suse_distro ->
SUSEkey = "${suse_distro}/${SUSEarchitecture}"
// SUSETarget = "https://adoptium.jfrog.io/artifactory/${SUSEkey}/Packages"
SUSETarget = "${artBaseURL}/${SUSEkey}/Packages"
// SUSETarget = "${artBaseURL}/${SUSEkey}/Packages"
SUSETarget = "${SUSEkey}/Packages"
CheckAndUpload(SUSETarget, SUSEDistro, SUSEarchitecture, '', '', '', SUSETarget, SUSEkey, SUSEFilePath)
}
// SUSETarget = "https://adoptium.jfrog.io/artifactory/"
Expand Down

0 comments on commit 1c18728

Please sign in to comment.