From 5e88d7f329a70f23462e0708698b30658c295285 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Mon, 13 Jan 2025 13:21:36 +0530 Subject: [PATCH 1/6] Updated the version for workstation-LTS to major version Signed-off-by: nikhil2611 --- .expeditor/config.yml | 4 +++- VERSION | 2 +- lib/berkshelf/version.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 5750b7efc..51b4013dc 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -18,7 +18,7 @@ github: release_branches: - workstation-LTS: - version_constraint: 0.* + version_constraint: 9.* - main: version_constraint: 8.* @@ -86,3 +86,5 @@ subscriptions: - workload: project_promoted:{{agent_id}}:workstation-build:* actions: - built_in:promote_habitat_packages + # - built_in:rollover_changelog + # - built_in:publish_rubygems diff --git a/VERSION b/VERSION index 6a36bb4db..c9277c5a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.12 \ No newline at end of file +9.0.0 \ No newline at end of file diff --git a/lib/berkshelf/version.rb b/lib/berkshelf/version.rb index bc632af8d..279584d54 100644 --- a/lib/berkshelf/version.rb +++ b/lib/berkshelf/version.rb @@ -1,3 +1,3 @@ module Berkshelf - VERSION = "0.1.12".freeze + VERSION = "9.0.0".freeze end From dd39706078fd1fc6021f132f20089451e09a9f9d Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Wed, 15 Jan 2025 12:57:45 +0530 Subject: [PATCH 2/6] corrected the plan file Signed-off-by: nikhil2611 --- habitat/plan.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/habitat/plan.sh b/habitat/plan.sh index 54c910f50..2164ecf92 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -1,25 +1,25 @@ export HAB_BLDR_CHANNEL="LTS-2024" -_chef_client_ruby="core/ruby3_1" pkg_name="berkshelf" pkg_origin="chef" +ruby_pkg="core/ruby3_1" pkg_maintainer="The Chef Maintainers " pkg_description="Manage Chef Infra cookbooks and cookbook dependencies." pkg_license=('Apache-2.0') -pkg_bin_dirs=( - bin - vendor/bin -) +pkg_deps=(${ruby_pkg} core/coreutils) +pkg_bin_dirs=(bin) pkg_build_deps=( core/make core/bash core/gcc ) -pkg_deps=( - $_chef_client_ruby - core/coreutils - core/git -) -pkg_svc_user=root + +do_setup_environment() { + build_line 'Setting GEM_HOME="$pkg_prefix/vendor"' + export GEM_HOME="$pkg_prefix/vendor" + + build_line "Setting GEM_PATH=$GEM_HOME" + export GEM_PATH="$GEM_HOME" +} pkg_version() { cat "$SRC_PATH/VERSION" @@ -35,8 +35,8 @@ do_unpack() { } do_build() { - echo $(pkg_path_for $_chef_client_ruby) - export GEM_HOME="$pkg_prefix/vendor/gems" + + export GEM_HOME="$pkg_prefix/vendor" build_line "Setting GEM_PATH=$GEM_HOME" export GEM_PATH="$GEM_HOME" @@ -49,13 +49,13 @@ do_build() { } do_install() { - export GEM_HOME="$pkg_prefix/vendor/gems" + export GEM_HOME="$pkg_prefix/vendor" build_line "Setting GEM_PATH=$GEM_HOME" export GEM_PATH="$GEM_HOME" gem install berkshelf-*.gem --no-document wrap_ruby_berkshelf - set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems" + set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" } wrap_ruby_berkshelf() { @@ -76,10 +76,10 @@ set -e export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$PATH" # Set Ruby paths defined from 'do_setup_environment()' -export GEM_HOME="$pkg_prefix/vendor/gems" -export GEM_PATH="\$GEM_HOME" +export GEM_HOME="$pkg_prefix/vendor" +export GEM_PATH="$GEM_PATH" -exec $(pkg_path_for $_chef_client_ruby)/bin/ruby $real_bin \$@ +exec $(pkg_path_for ${ruby_pkg})/bin/ruby $real_bin \$@ EOF chmod -v 755 "$bin" } From 67dd7406cbccf3c3432679c87881123b4272d4c9 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Wed, 15 Jan 2025 17:12:01 +0530 Subject: [PATCH 3/6] updated the env from HAB_BLDR_CHANNEL to HAB_REFRESH_CHANNEL Signed-off-by: nikhil2611 --- habitat/plan.ps1 | 2 +- habitat/plan.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index 034692d0a..d39e2a71c 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = "Stop" $PSDefaultParameterValues['*:ErrorAction']='Stop' -$env:HAB_BLDR_CHANNEL = "LTS-2024" +$env:HAB_REFRESH_CHANNEL = "LTS-2024" $pkg_name="berkshelf" $pkg_origin="chef" $pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION") diff --git a/habitat/plan.sh b/habitat/plan.sh index 2164ecf92..07d44148a 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -1,4 +1,4 @@ -export HAB_BLDR_CHANNEL="LTS-2024" +export HAB_REFRESH_CHANNEL="LTS-2024" pkg_name="berkshelf" pkg_origin="chef" ruby_pkg="core/ruby3_1" From 44c84ea7d170608451f3856d95d5ab84803d9e5f Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Wed, 22 Jan 2025 18:57:10 +0530 Subject: [PATCH 4/6] remoed the release branch changes and fixing pipeline Signed-off-by: nikhil2611 --- .expeditor/build.habitat.yml | 3 +++ .../buildkite/artifact.habitat.test.ps1 | 1 - .expeditor/buildkite/artifact.habitat.test.sh | 1 - .expeditor/config.yml | 23 ++++++------------- .expeditor/habitat-test.pipeline.yml | 2 ++ VERSION | 2 +- habitat/plan.ps1 | 1 - habitat/plan.sh | 1 - lib/berkshelf/version.rb | 2 +- 9 files changed, 14 insertions(+), 22 deletions(-) diff --git a/.expeditor/build.habitat.yml b/.expeditor/build.habitat.yml index 9c2d3d7a2..d28cae6fa 100644 --- a/.expeditor/build.habitat.yml +++ b/.expeditor/build.habitat.yml @@ -1,4 +1,7 @@ --- +env: + HAB_REFRESH_CHANNEL: "LTS-2024" + origin: chef expeditor: diff --git a/.expeditor/buildkite/artifact.habitat.test.ps1 b/.expeditor/buildkite/artifact.habitat.test.ps1 index 2f7dc420e..edbea3a28 100644 --- a/.expeditor/buildkite/artifact.habitat.test.ps1 +++ b/.expeditor/buildkite/artifact.habitat.test.ps1 @@ -5,7 +5,6 @@ # TODO: Set-StrictMode -Version Latest $PSDefaultParameterValues['*:ErrorAction']='Stop' $ErrorActionPreference = 'Stop' -$env:HAB_BLDR_CHANNEL = "LTS-2024" $env:HAB_ORIGIN = 'ci' $env:CHEF_LICENSE = 'accept-no-persist' $env:HAB_LICENSE = 'accept-no-persist' diff --git a/.expeditor/buildkite/artifact.habitat.test.sh b/.expeditor/buildkite/artifact.habitat.test.sh index 27dc4c9a2..3a4b254b3 100755 --- a/.expeditor/buildkite/artifact.habitat.test.sh +++ b/.expeditor/buildkite/artifact.habitat.test.sh @@ -6,7 +6,6 @@ export HAB_ORIGIN='ci' export PLAN='berkshelf' export CHEF_LICENSE="accept-no-persist" export HAB_LICENSE="accept-no-persist" -export HAB_BLDR_CHANNEL="LTS-2024" echo "--- checking if git is installed" if ! command -v git &> /dev/null; then diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 51b4013dc..6def43fcf 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -17,15 +17,12 @@ github: - "Expeditor: Bump Version Major" release_branches: - - workstation-LTS: - version_constraint: 9.* - main: version_constraint: 8.* artifact_channels: - - dev - - workstation-build - - LTS-2024 + - unstable + - chef-dke-lts2024 changelog: rollup_header: Changes not yet released to rubygems.org @@ -62,11 +59,8 @@ subscriptions: ignore_labels: - "Expeditor: Skip Changelog" - "Expeditor: Skip All" - - trigger_pipeline:habitat/test: + - built_in:build_gem: only_if: built_in:bump_version - ignore_labels: - - "Expeditor: Skip Habitat" - - "Expeditor: Skip All" - trigger_pipeline:habitat/build: only_if: built_in:bump_version ignore_labels: @@ -79,12 +73,9 @@ subscriptions: # when all of the hab package publish to the unstable channel, test and promote them - built_in:promote_habitat_packages - # Subscribe to the promotion of the dev channel to acceptance - - workload: project_promoted:{{agent_id}}:dev:* - actions: - - built_in:promote_habitat_packages - - workload: project_promoted:{{agent_id}}:workstation-build:* + # Subscribe to the promotion of the unstable channel to stable + - workload: project_promoted:{{agent_id}}:chef-dke-lts2024:* actions: - built_in:promote_habitat_packages - # - built_in:rollover_changelog - # - built_in:publish_rubygems + - built_in:rollover_changelog + - built_in:publish_rubygems diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml index 39493f20c..3f117add3 100644 --- a/.expeditor/habitat-test.pipeline.yml +++ b/.expeditor/habitat-test.pipeline.yml @@ -3,6 +3,8 @@ expeditor: defaults: buildkite: timeout_in_minutes: 30 + env: + HAB_REFRESH_CHANNEL: "LTS-2024" retry: automatic: limit: 1 diff --git a/VERSION b/VERSION index c9277c5a6..9c1a8f823 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.0.0 \ No newline at end of file +8.0.16 \ No newline at end of file diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index d39e2a71c..0140fd590 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -1,7 +1,6 @@ $ErrorActionPreference = "Stop" $PSDefaultParameterValues['*:ErrorAction']='Stop' -$env:HAB_REFRESH_CHANNEL = "LTS-2024" $pkg_name="berkshelf" $pkg_origin="chef" $pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION") diff --git a/habitat/plan.sh b/habitat/plan.sh index 07d44148a..51fddb4c0 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -1,4 +1,3 @@ -export HAB_REFRESH_CHANNEL="LTS-2024" pkg_name="berkshelf" pkg_origin="chef" ruby_pkg="core/ruby3_1" diff --git a/lib/berkshelf/version.rb b/lib/berkshelf/version.rb index 279584d54..d0a3bbd1f 100644 --- a/lib/berkshelf/version.rb +++ b/lib/berkshelf/version.rb @@ -1,3 +1,3 @@ module Berkshelf - VERSION = "9.0.0".freeze + VERSION = "8.0.16".freeze end From 0123083b6fcedc3b26f773ea78f9e9db5a02d91d Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Wed, 22 Jan 2025 19:08:08 +0530 Subject: [PATCH 5/6] adding back berkshelf rubygem Signed-off-by: nikhil2611 --- .expeditor/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 6def43fcf..fc7e5ceac 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -4,6 +4,10 @@ slack: notify_channel: chef-ws-notify +# This publish is triggered by the `built_in:publish_rubygems` artifact_action. +rubygems: + - berkshelf + github: # This deletes the GitHub PR branch after successfully merged into the release branch delete_branch_on_merge: true From 7e0cf37dd72469087fc5ac3ba5fe1b77cb574659 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Thu, 23 Jan 2025 17:33:46 +0530 Subject: [PATCH 6/6] fixing expeditor config error Signed-off-by: nikhil2611 --- .expeditor/config.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index fc7e5ceac..720d8d520 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -71,15 +71,18 @@ subscriptions: - "Expeditor: Skip Habitat" - "Expeditor: Skip All" + - workload: project_promoted:{{agent_id}}:* + actions: + - built_in:rollover_changelog + # the habitat chain - workload: buildkite_hab_build_group_published:{{agent_id}}:* actions: # when all of the hab package publish to the unstable channel, test and promote them - built_in:promote_habitat_packages - # Subscribe to the promotion of the unstable channel to stable - - workload: project_promoted:{{agent_id}}:chef-dke-lts2024:* + # Subscribe to the promotion of the unstable channel to stable(chef-dke-lts2024) + - workload: project_promoted:{{agent_id}}:unstable:* actions: - built_in:promote_habitat_packages - - built_in:rollover_changelog - - built_in:publish_rubygems + - built_in:publish_rubygems \ No newline at end of file