Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
steelhead31 committed Dec 24, 2024
1 parent 54a9be6 commit fd7ca81
Showing 1 changed file with 37 additions and 63 deletions.
100 changes: 37 additions & 63 deletions linux_new/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,9 @@ def getPackageBuildLabel(String arch, String distro) {
// Helper function to check and upload files
def CheckAndUpload(String Target, String Distro, String BuildArch, String Version, String DistroList, String Value, String PackageDir, String Key, String FileName) {
echo "Entering Check & Upload"
// Received From Alpine : CheckAndUpload(Target, UpDistro, buildArch, '', '', '', '', '' , FileName)
// Received From Deb : CheckAndUpload(DebTarget, DebDistro, arch, Release, distro_list, '', '', '', DebFileName)
// Received From RPM :

echo "Debug 2001"
echo "${Target} ${Distro} ${BuildArch} ${Version} ${DistroList} ${Value} ${PackageDir} ${Key} ${FileName}"
// echo "Target = ${Target}"
// echo "Distro = ${Distro}"
// echo "Arch = ${BuildArch}"
// echo "Version = ${Version}"
// echo "DList = ${DistroList}"
// echo "Value = ${Value}"
// echo "PackageDir = ${PackageDir}"
// echo "Key = ${Key}"
// echo "Filename = ${FileName}"

}

// Function Definitions End
Expand Down Expand Up @@ -775,12 +763,12 @@ stage('Build & Archive Package') {
def AlpFileName = PackFile.name
def AlpFilePath = AlpPackFile.path
def Target = "https://adoptium.jfrog.io/artifactory/apk/alpine/main/${arch}/${AlpFileName}"
echo "Debug 1000 - Alpine Upload Debugging"
echo "Target = ${Target}"
echo "Distro = ${AlpDistro}"
echo "buildArch = ${arch}"
echo "FileName = ${AlpFileName}"
echo "FilePath = ${AlpFilePath}"
// echo "Debug 1000 - Alpine Upload Debugging"
// echo "Target = ${Target}"
// echo "Distro = ${AlpDistro}"
// echo "buildArch = ${arch}"
// echo "FileName = ${AlpFileName}"
// echo "FilePath = ${AlpFilePath}"
CheckAndUpload(Target, AlpDistro, arch, '', '', '', '', '' , AlpFileName)
}
}
Expand All @@ -799,14 +787,14 @@ stage('Build & Archive Package') {
DebFileName = DebPackFile.name
def DebFilePath = DebPackFile.path
DebTarget = "https://adoptium.jfrog.io/artifactory/deb/pool/main/t/temurin-${Release}/${DebFileName}"
echo "Debug 1001 - Debian Upload Debugging"
echo "Target = ${DebTarget}"
echo "Distro = ${DebDistro}"
echo "buildArch = ${arch}"
echo "Release = ${Release}"
echo "FileName = ${DebFileName}"
echo "FilePath = ${DebFilePath}"
echo "DistroList = ${distro_list}"
// echo "Debug 1001 - Debian Upload Debugging"
// echo "Target = ${DebTarget}"
// echo "Distro = ${DebDistro}"
// echo "buildArch = ${arch}"
// echo "Release = ${Release}"
// echo "FileName = ${DebFileName}"
// echo "FilePath = ${DebFilePath}"
// echo "DistroList = ${distro_list}"
CheckAndUpload(DebTarget, DebDistro, arch, '', distro_list, '', '', '' , DebFileName)
}
echo "Preapring For RHEL Upload"
Expand All @@ -821,34 +809,27 @@ stage('Build & Archive Package') {
RHELFilePath = RHELPackFile.path
def RHELarchex = RHELFileName =~ /(?:\d+\.\d+-\d+)\.(\w+)\.(?:src\.)?rpm/
RHELarchitecture = RHELarchex ? RHELarchex[0][1] : null
echo "Extracted architecture: ${RHELarchitecture}"
// echo "Extracted architecture: ${RHELarchitecture}"
// OverRide Architecture For SRC RPMS
if (RHELFileName.contains(".src.rpm")) {
RHELarchitecture = "source"
echo "Overriden Architecture : ${RHELarchitecture}"
// echo "Overriden Architecture : ${RHELarchitecture}"
}
// Calculate Key
rhel_distros.each { rhel_distro ->
RHELkey = "${rhel_distro}/${RHELarchitecture}"
}
RHELTarget = "https://adoptium.jfrog.io/artifactory/"
echo "Debug 1001 - RHEL Upload Debugging"
echo "Target = ${RHELTarget}"
echo "Key = ${RHELkey}"
echo "Value = ${Release}"
echo "Distro = ${RHELDistro}"
echo "PackageDir = ${RHELTarget}"
echo "buildArch = ${RHELarchitecture}"
echo "FileName = ${RHELFileName}"
echo "FilePath = ${RHELFilePath}"
// echo "DistroList = ${distro_list}"
// echo "Debug 1001 - RHEL Upload Debugging"
// echo "Target = ${RHELTarget}"
// echo "Key = ${RHELkey}"
// echo "Value = ${Release}"
// echo "Distro = ${RHELDistro}"
// echo "PackageDir = ${RHELTarget}"
// echo "buildArch = ${RHELarchitecture}"
// echo "FileName = ${RHELFileName}"
// echo "FilePath = ${RHELFilePath}"
CheckAndUpload(RHELTarget, RHELDistro, RHELarchitecture, '', '', '', RHELTarget, RHELkey, RHELFileName)
// From Original : CheckAndUpload(Target, Distro, rpmArchList.each, '', '', VALUE , PACKAGEDIR, KEY, '' )

// Received From Alpine : CheckAndUpload(Target, UpDistro, buildArch, '', '', '', '', '' , FileName)
// Received From Deb : CheckAndUpload(DebTarget, DebDistro, arch, Release, distro_list, '', '', '', DebFileName)
// Received From RPM :
// echo "${Target} ${Distro} ${BuildArch} ${Version} ${DistroList} ${Value} ${PackageDir} ${Key} ${FileName}"
}
echo "Preapring For SUSE Upload"
def SUSEFileName = ''
Expand All @@ -862,34 +843,27 @@ stage('Build & Archive Package') {
SUSEFilePath = SUSEPackFile.path
def SUSEarchex = SUSEFileName =~ /(?:\d+\.\d+-\d+)\.(\w+)\.(?:src\.)?rpm/
SUSEarchitecture = SUSEarchex ? SUSEarchex[0][1] : null
echo "Extracted architecture: ${SUSEarchitecture}"
// echo "Extracted architecture: ${SUSEarchitecture}"
// OverRide Architecture For SRC RPMS
if (SUSEFileName.contains(".src.rpm")) {
SUSEarchitecture = "source"
echo "Overriden Architecture : ${SUSEarchitecture}"
// echo "Overriden Architecture : ${SUSEarchitecture}"
}
// Calculate Key
suse_distros.each { suse_distro ->
SUSEkey = "${suse_distro}/${SUSEarchitecture}"
}
SUSETarget = "https://adoptium.jfrog.io/artifactory/"
echo "Debug 1003 - SUSE Upload Debugging"
echo "Target = ${SUSETarget}"
echo "Key = ${SUSEkey}"
echo "Value = ${Release}"
echo "Distro = ${SUSEDistro}"
echo "PackageDir = ${SUSETarget}"
echo "buildArch = ${SUSEarchitecture}"
echo "FileName = ${SUSEFileName}"
echo "FilePath = ${SUSEFilePath}"
// echo "DistroList = ${distro_list}"
// echo "Debug 1003 - SUSE Upload Debugging"
// echo "Target = ${SUSETarget}"
// echo "Key = ${SUSEkey}"
// echo "Value = ${Release}"
// echo "Distro = ${SUSEDistro}"
// echo "PackageDir = ${SUSETarget}"
// echo "buildArch = ${SUSEarchitecture}"
// echo "FileName = ${SUSEFileName}"
// echo "FilePath = ${SUSEFilePath}"
CheckAndUpload(SUSETarget, SUSEDistro, SUSEarchitecture, '', '', '', SUSETarget, SUSEkey, SUSEFileName)
// From Original : CheckAndUpload(Target, Distro, rpmArchList.each, '', '', VALUE , PACKAGEDIR, KEY, '' )

// Received From Alpine : CheckAndUpload(Target, UpDistro, buildArch, '', '', '', '', '' , FileName)
// Received From Deb : CheckAndUpload(DebTarget, DebDistro, arch, Release, distro_list, '', '', '', DebFileName)
// Received From RPM :
// echo "${Target} ${Distro} ${BuildArch} ${Version} ${DistroList} ${Value} ${PackageDir} ${Key} ${FileName}"
}
} // End Of Linux Distro
}
Expand Down

0 comments on commit fd7ca81

Please sign in to comment.