Skip to content

Commit 7d1e7e3

Browse files
authored
Merge pull request #1919 from habitat-sh/jah/pipeline-check
Fixes verify pipeline and a bit of hygeine
2 parents a90a1f8 + e765236 commit 7d1e7e3

5 files changed

Lines changed: 38 additions & 26 deletions

File tree

.buildkite/hooks/pre-command

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
if [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef-canary' ]]; then
4+
AWS_REGION='us-west-1'
5+
elif [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef' ]] || [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef-oss' ]]; then
6+
AWS_REGION='us-west-2'
7+
fi
8+
9+
HAB_AUTH_TOKEN=$(aws ssm get-parameter --name 'habitat-prod-auth-token' --with-decryption --query Parameter.Value --output text --region "${AWS_REGION}")
10+
export HAB_AUTH_TOKEN

.expeditor/builder_seed.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ file_descriptor = "Packages needed to run an instance of Builder"
55
channel = "stable"
66
packages = [
77
# Supervisor and prerequisites
8-
"core/hab-launcher",
9-
"core/hab",
10-
"core/hab-sup",
8+
"chef/hab-launcher",
9+
"chef/hab",
10+
"chef/hab-sup",
1111
]
1212

1313
[[x86_64-linux]]

.expeditor/scripts/verify/builder-api-functional.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,32 @@
22

33
set -euo pipefail
44

5+
readonly channel='acceptance'
6+
57
# 10/11/2024: We need to use the most recent hab binary that is not yet in stable
68
# to build against LTS without conflicts with existing stable packages
7-
hab pkg install core/hab --channel acceptance -bf
9+
hab pkg install chef/hab --channel="${channel}" --binlink --force
10+
11+
# 2025-07-16: Installing these works around a bug that exists at the
12+
# current time where the HAB_AUTH_TOKEN isn't read when packages are
13+
# automatically installed by calls to different hab commands.
14+
# See https://progresssoftware.atlassian.net/browse/CHEF-23525
15+
hab pkg install chef/hab-studio --channel="${channel}" --binlink --force
16+
hab pkg install chef/hab-sup --channel="${channel}" --binlink --force
17+
hab pkg install chef/hab-launcher --channel="${channel}" --binlink --force
818

919
echo "--- Generating signing key"
1020
hab origin key generate "$HAB_ORIGIN"
1121

12-
echo "--- Updating .studiorc"
13-
cat .expeditor/templates/studiorc >> .studiorc
22+
echo "--- Updating .studiorc"
23+
cat .expeditor/templates/studiorc >>.studiorc
1424

1525
echo "--- Copying habitat-env"
1626
cp .secrets/habitat-env.sample .secrets/habitat-env
1727

1828
echo "--- Entering studio"
1929
env HAB_NONINTERACTIVE=true \
2030
HAB_STUDIO_SUP=false \
21-
HAB_INTERNAL_BLDR_CHANNEL=acceptance \
22-
HAB_STUDIO_SECRET_HAB_INTERNAL_BLDR_CHANNEL=acceptance \
31+
HAB_INTERNAL_BLDR_CHANNEL="${channel}" \
32+
HAB_STUDIO_SECRET_HAB_INTERNAL_BLDR_CHANNEL="${channel}" \
2333
hab studio enter

.expeditor/templates/studiorc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# This file (.expeditor/templates/studiorc) is concatenated onto .studiorc when
2+
# .expeditor/scripts/verify/builder-api-functional.sh runs.
3+
24
cd /src || exit
35

46
echo "--- Installing prerequisites"

.expeditor/verify.pipeline.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@ expeditor:
33
buildkite:
44
timeout_in_minutes: 30
55
env:
6-
HAB_BLDR_CHANNEL: LTS-2024
7-
HAB_REFRESH_CHANNEL: LTS-2024
8-
HAB_FALLBACK_CHANNEL: LTS-2024
9-
HAB_STUDIO_SECRET_HAB_BLDR_CHANNEL: LTS-2024
10-
HAB_STUDIO_SECRET_HAB_REFRESH_CHANNEL: LTS-2024
11-
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: LTS-2024
6+
HAB_BLDR_CHANNEL: LTS-2024
7+
HAB_REFRESH_CHANNEL: LTS-2024
8+
HAB_FALLBACK_CHANNEL: LTS-2024
9+
HAB_STUDIO_SECRET_HAB_BLDR_CHANNEL: LTS-2024
10+
HAB_STUDIO_SECRET_HAB_REFRESH_CHANNEL: LTS-2024
11+
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: LTS-2024
1212

1313
steps:
14-
#######################################################################
15-
# Linting!
16-
#######################################################################
17-
1814
- label: "[lint] :linux: :bash: Shellcheck"
1915
command:
2016
- ./test/shellcheck.sh
@@ -53,10 +49,6 @@ steps:
5349
executor:
5450
docker:
5551

56-
#######################################################################
57-
# Unit Tests - Linux!
58-
#######################################################################
59-
6052
- label: "[unit] :linux: builder-api"
6153
command:
6254
- ./test/run_cargo_test.sh builder-api
@@ -125,6 +117,7 @@ steps:
125117
docker:
126118
privileged: true
127119
environment:
120+
- HAB_AUTH_TOKEN
128121
- HAB_ORIGIN=habitat
129122
- HAB_STUDIO_SECRET_NODE_OPTIONS="--dns-result-order=ipv4first"
130123

@@ -141,7 +134,4 @@ steps:
141134
privileged: true
142135
environment:
143136
- HAB_ORIGIN=habitat
144-
# The following variables are only set inside `studio` and how we enter
145-
# `studio` should not matter.
146-
# test test
147137
- HAB_STUDIO_SECRET_NODE_OPTIONS="--dns-result-order=ipv4first"

0 commit comments

Comments
 (0)