From 32f8dfdd9ffab9ec9562b3534f7b4561db650df9 Mon Sep 17 00:00:00 2001 From: Nikhil Gupta <35272911+nikhil2611@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:14:29 +0530 Subject: [PATCH] Chef-18535 Removed the release branch changes and fixed pipeline (#428) * updating version to major version and few plan file fixes Signed-off-by: nikhil2611 * reverting back the release branch changes and version update Signed-off-by: nikhil2611 * swapping order of action Signed-off-by: nikhil2611 * swapping order of action to fix expeditor error Signed-off-by: nikhil2611 * commenting the trigger pipeline to test expeditor config Signed-off-by: nikhil2611 * commenting the build gem to test expeditor config Signed-off-by: nikhil2611 * commenting the build gem to test expeditor config Signed-off-by: nikhil2611 * fixing expeditor error Signed-off-by: nikhil2611 * fixing expeditor error Signed-off-by: nikhil2611 * fixing the expeditor errro Signed-off-by: nikhil2611 * adding back the trigger pipeline Signed-off-by: nikhil2611 * adding old config to test the expeditor failure Signed-off-by: nikhil2611 * now trying to add updated config Signed-off-by: nikhil2611 * adding release branch to test the expeditor validation Signed-off-by: nikhil2611 * reverted back the release branch Signed-off-by: nikhil2611 * update to unstable channel in the workload Signed-off-by: nikhil2611 * removed the build gem Signed-off-by: nikhil2611 * added back the release branch Signed-off-by: nikhil2611 * added back the release branch Signed-off-by: nikhil2611 * added the env variable in the builkite config Signed-off-by: nikhil2611 --------- 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 | 14 +++----- .expeditor/habitat-test.pipeline.yml | 2 ++ VERSION | 2 +- habitat/plan.ps1 | 1 - habitat/plan.sh | 33 ++++++++++--------- lib/chef-vault/version.rb | 2 +- 9 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.expeditor/build.habitat.yml b/.expeditor/build.habitat.yml index 72ea256..5c7e6ed 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 b9befd9..b63683b 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 a78e0a8..2233bd8 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='chef-vault' 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 afd4f60..024448a 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -10,9 +10,8 @@ rubygems: - chef-vault artifact_channels: - - dev - - workstation-build - - LTS-2024 + - unstable + - chef-dke-lts2024 github: # This deletes the GitHub PR branch after successfully merged into the release branch @@ -62,17 +61,13 @@ subscriptions: - 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:* + - workload: project_promoted:{{agent_id}}:unstable:* actions: - built_in:promote_habitat_packages pipelines: - verify: description: Pull Request validation tests - public: true - habitat/build: env: - HAB_NONINTERACTIVE: "true" @@ -85,5 +80,4 @@ pipelines: - HAB_NONINTERACTIVE: "true" - HAB_NOCOLORING: "true" - HAB_STUDIO_SECRET_HAB_NONINTERACTIVE: "true" - trigger: pull_request - + trigger: pull_request \ No newline at end of file diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml index f49e004..f85d2a3 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 8294c18..068399f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.2 \ No newline at end of file +4.1.13 \ No newline at end of file diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index 72c3128..1c3a7fd 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -1,7 +1,6 @@ $ErrorActionPreference = "Stop" $PSDefaultParameterValues['*:ErrorAction']='Stop' -$env:HAB_BLDR_CHANNEL = "LTS-2024" $pkg_name="chef-vault" $pkg_origin="chef" $pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION") diff --git a/habitat/plan.sh b/habitat/plan.sh index 338ca25..2d83e23 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -1,5 +1,4 @@ -export HAB_BLDR_CHANNEL="LTS-2024" -_chef_client_ruby="core/ruby3_1" +ruby_pkg="core/ruby3_1" pkg_name="chef-vault" pkg_origin="chef" pkg_maintainer="The Chef Maintainers " @@ -7,7 +6,6 @@ pkg_description="Gem that allows you to encrypt a Chef Data Bag Item using the p pkg_license=('Apache-2.0') pkg_bin_dirs=( bin - vendor/bin ) pkg_build_deps=( core/make @@ -15,13 +13,18 @@ pkg_build_deps=( core/gcc core/libarchive ) -pkg_deps=( - $_chef_client_ruby - core/coreutils - core/git -) +pkg_deps=(${ruby_pkg} 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" } @@ -36,8 +39,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" @@ -50,13 +53,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 chef-vault-*.gem --no-document wrap_ruby_chef_vault - set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems" + set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" } wrap_ruby_chef_vault() { @@ -77,10 +80,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" } diff --git a/lib/chef-vault/version.rb b/lib/chef-vault/version.rb index ff3ae3f..2b92c91 100644 --- a/lib/chef-vault/version.rb +++ b/lib/chef-vault/version.rb @@ -15,6 +15,6 @@ # limitations under the License. class ChefVault - VERSION = "0.1.2" + VERSION = "4.1.13" MAJOR, MINOR, TINY = VERSION.split(".") end