diff options
author | Jared Kauppila <Jared.Kauppila@sentry.com> | 2021-10-26 12:07:48 -0500 |
---|---|---|
committer | Jared Kauppila <Jared.Kauppila@sentry.com> | 2021-10-26 12:08:13 -0500 |
commit | 3817534dffb6a903b8ce195abea2f4739b026dc9 (patch) | |
tree | b89bebc91ecadab866198548b5e6132373b8f565 /kitchen-tests | |
parent | 05986bd3460175a821999701b43d40c7c705e491 (diff) | |
download | chef-3817534dffb6a903b8ce195abea2f4739b026dc9.tar.gz |
Reference `GITHUB_REPOSITORY` if available when pulling Infra Client source code during tests to enable forked builds
Signed-off-by: Jared Kauppila <Jared.Kauppila@sentry.com>
Diffstat (limited to 'kitchen-tests')
-rw-r--r-- | kitchen-tests/README.md | 2 | ||||
-rw-r--r-- | kitchen-tests/kitchen.yml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/kitchen-tests/README.md b/kitchen-tests/README.md index a997dc4370..73c766d82b 100644 --- a/kitchen-tests/README.md +++ b/kitchen-tests/README.md @@ -57,7 +57,7 @@ Test Kitchen is configured in the `kitchen.yml` file, which resides in this dire The provisioner can be configured to pull client source code from a GitHub repository using any valid Git reference. You are encouraged to modify any of these settings, but please return them to their original values before submitting a pull request for review (unless, of course, your changes are enhancements to the default provisioner settings). -By default, the provisioner is configured to pull your most recent commit to `chef/chef`. You can change this by modifying the `github` and `branch` provisioner options: +By default, the provisioner is configured to pull your most recent commit to the `GITHUB_REPOSITORY` environment variable (if executed via Github Actions), otherwise defaults to `chef/chef`. You can change this by modifying the `github` and `branch` provisioner options: - `github`: Set this to `"<your_username>/<your_chef_repo>"`. The default is `"chef/chef"`. - `branch`: This can be any valid git reference (e.g., branch name, tag, or commit SHA). If omitted, it defaults to `main`. diff --git a/kitchen-tests/kitchen.yml b/kitchen-tests/kitchen.yml index 0e2811f73a..cde6e9baba 100644 --- a/kitchen-tests/kitchen.yml +++ b/kitchen-tests/kitchen.yml @@ -22,10 +22,10 @@ lifecycle: - remote: /opt/chef/bin/chef-client -v - remote: /opt/chef/bin/ohai -v - remote: /opt/chef/embedded/bin/gem install appbundler appbundle-updater --no-doc - - remote: scl enable devtoolset-8 '/opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['BUILDKITE_COMMIT'] || %x(git rev-parse HEAD).chomp %> --tarball --github chef/chef' + - remote: scl enable devtoolset-8 '/opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['BUILDKITE_COMMIT'] || %x(git rev-parse HEAD).chomp %> --tarball --github <%= ENV['GITHUB_REPOSITORY'] || chef/chef %>' includes: - centos-6 - - remote: /opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['BUILDKITE_COMMIT'] || %x(git rev-parse HEAD).chomp %> --tarball --github chef/chef + - remote: /opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['BUILDKITE_COMMIT'] || %x(git rev-parse HEAD).chomp %> --tarball --github <%= ENV['GITHUB_REPOSITORY'] || chef/chef %> excludes: - centos-6 - remote: echo "Installed Chef / Ohai release:" |