Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef 18535 fixing pipelines #429

Draft
wants to merge 23 commits into
base: workstation-LTS
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .expeditor/buildkite/artifact.habitat.test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# TODO: Set-StrictMode -Version Latest
$PSDefaultParameterValues['*:ErrorAction']='Stop'
$ErrorActionPreference = 'Stop'
$env:HAB_BLDR_CHANNEL = "LTS-2024"
$env:HAB_REFRESH_CHANNEL = "LTS-2024"
$env:HAB_ORIGIN = 'ci'
$env:CHEF_LICENSE = 'accept-no-persist'
$env:HAB_LICENSE = 'accept-no-persist'
Expand Down
2 changes: 1 addition & 1 deletion .expeditor/buildkite/artifact.habitat.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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"
export HAB_REFRESH_CHANNEL="LTS-2024"

echo "--- checking if git is installed"
if ! command -v git &> /dev/null; then
Expand Down
14 changes: 4 additions & 10 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will remove it from the chef-oss Buildkite tenant and make it only visible to internal people

- habitat/build:
env:
- HAB_NONINTERACTIVE: "true"
Expand All @@ -85,5 +80,4 @@ pipelines:
- HAB_NONINTERACTIVE: "true"
- HAB_NOCOLORING: "true"
- HAB_STUDIO_SECRET_HAB_NONINTERACTIVE: "true"
trigger: pull_request

trigger: pull_request
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
4.1.13
2 changes: 1 addition & 1 deletion habitat/plan.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'

$env:HAB_BLDR_CHANNEL = "LTS-2024"
$env:HAB_REFRESH_CHANNEL = "LTS-2024"
$pkg_name="chef-vault"
$pkg_origin="chef"
$pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION")
Expand Down
34 changes: 19 additions & 15 deletions habitat/plan.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
export HAB_BLDR_CHANNEL="LTS-2024"
_chef_client_ruby="core/ruby3_1"
export HAB_REFRESH_CHANNEL="LTS-2024"
ruby_pkg="core/ruby3_1"
pkg_name="chef-vault"
pkg_origin="chef"
pkg_maintainer="The Chef Maintainers <[email protected]>"
pkg_description="Gem that allows you to encrypt a Chef Data Bag Item using the public keys of a list of chef nodes. This allows only those chef nodes to decrypt the encrypted values."
pkg_license=('Apache-2.0')
pkg_bin_dirs=(
bin
vendor/bin
)
pkg_build_deps=(
core/make
core/bash
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"
}
Expand All @@ -36,8 +40,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"
Expand All @@ -50,13 +54,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() {
Expand All @@ -77,10 +81,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"
}
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-vault/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# limitations under the License.

class ChefVault
VERSION = "0.1.2"
VERSION = "4.1.13"
MAJOR, MINOR, TINY = VERSION.split(".")
end