Skip to content

Commit

Permalink
Merge pull request #71 from puppetlabs/CAT-2025
Browse files Browse the repository at this point in the history
(CAT-2025) Fix to release job
  • Loading branch information
jordanbreen28 authored Sep 11, 2024
2 parents 8ec5ec8 + 083f0b9 commit 297f5b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pdk-release.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export PDK_DEB_URL_ARM64="https://apt.puppetlabs.com/pool/jammy/puppet-tools/p/pdk/pdk_3.2.0.1-1jammy_arm64.deb"
export PDK_DEB_URL_AMD64="https://apt.puppetlabs.com/pool/jammy/puppet-tools/p/pdk/pdk_3.2.0.1-1jammy_amd64.deb"
export PDK_VERSION="3.2.0.1"
export PDK_DEB_URL_ARM64="https://apt.puppetlabs.com/pool/jammy/puppet-tools/p/pdk/pdk_3.3.0.0-1jammy_arm64.deb"
export PDK_DEB_URL_AMD64="https://apt.puppetlabs.com/pool/jammy/puppet-tools/p/pdk/pdk_3.3.0.0-1jammy_amd64.deb"
export PDK_VERSION="3.3.0.0"
export PDK_RELEASE_TYPE="release"
13 changes: 6 additions & 7 deletions update-pdk-release-file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
PDK_NIGHTLIES_BASE = "#{NIGHTLIES_HOST}/apt/pool/#{UBUNTU_RELEASE}/puppet-tools/p/pdk"
RELEASES_HOST = "https://apt.puppetlabs.com"
PDK_RELEASES_BASE = "#{RELEASES_HOST}/pool/#{UBUNTU_RELEASE}/puppet-tools/p/pdk"
PDK_RELEASE_PKG_REGEX = /^pdk_(?<version>\d+\.\d+\.\d+\.\d+)-1#{UBUNTU_RELEASE}_amd64/
PDK_NIGHTLY_PKG_REGEX = /^pdk_(?<version>\d+\.\d+\.\d+\.\d+\..*)-1#{UBUNTU_RELEASE}_amd64/
PDK_RELEASE_PKG_REGEX = /^pdk_(?<version>\d+\.\d+\.\d+\.\d+)-1#{UBUNTU_RELEASE}_(amd|arm)64/
PDK_NIGHTLY_PKG_REGEX = /^pdk_(?<version>\d+\.\d+\.\d+\.\d+\..*)-1#{UBUNTU_RELEASE}_(amd|arm)64/

def pdk_nightlies_html
URI.parse("#{PDK_NIGHTLIES_BASE}/index_by_lastModified_reverse.html").read
Expand Down Expand Up @@ -67,17 +67,16 @@ def pdk_release_versions

# Find the newest ARM PDK release
all_arm_releases = all_pdk_releases.select{ |i| i[:href].match(/arm64/) }.sort_by { |ver| ver[:released_at] }.reverse
arm_latest = all_arm_releases.first || exit(1)

arm_latest = all_arm_releases.first
# Find the newest AMD PDK release
all_amd_releases = all_pdk_releases.select{ |i| i[:href].match(/amd64/) }.sort_by { |ver| ver[:released_at] }.reverse
amd_latest = all_amd_releases.first || exit(1)
amd_latest = all_amd_releases.first

File.open('pdk-release.env', 'w+') do |release_file|
release_file.puts "export PDK_DEB_URL_ARM64=\"#{arm_latest[:href]}\""
release_file.puts "export PDK_DEB_URL_AMD64=\"#{amd_latest[:href]}\""
release_file.puts "export PDK_VERSION=\"#{pdk_latest[:version]}\""
release_file.puts "export PDK_RELEASE_TYPE=\"#{pdk_latest[:type]}\""
release_file.puts "export PDK_VERSION=\"#{amd_latest[:version]}\""
release_file.puts "export PDK_RELEASE_TYPE=\"#{amd_latest[:type]}\""
end

exit(0)

0 comments on commit 297f5b1

Please sign in to comment.