Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1552 from chef/jsnapp/IPACK-31-make-it-easy-to-re…
…produce-verify-pipeline-builds-locally Make it easy to reproduce verify pipeline builds locally
- Loading branch information
Showing
8 changed files
with
72 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.bundle | ||
Gemfile.lock | ||
pkg/* | ||
test/pkg/* | ||
/binstubs | ||
/bin | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
FROM chefes/releng-base | ||
|
||
ARG SOFTWARE | ||
ARG VERSION | ||
|
||
COPY ./ /omnibus-software | ||
COPY ./test /test | ||
|
||
WORKDIR /test | ||
|
||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -P omnibus-toolchain | ||
|
||
RUN . /opt/omnibus-toolchain/bin/load-omnibus-toolchain \ | ||
&& DEBUG=1 bundle config set --local without development \ | ||
&& DEBUG=1 bundle install \ | ||
&& bundle exec omnibus build test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
builder: | ||
build: . | ||
volumes: | ||
- ./:/omnibus-software | ||
- ./test:/test | ||
working_dir: /test | ||
command: bash --init-file omnibus-build.sh | ||
|
||
# Multiple concurrent "docker-compose run" commands on the same system in the CI pipeline caused intermittent failures | ||
# while creating the network. | ||
# Using "network_mode: bridge" forces compose to use docker's legacy default bridge network instead. | ||
# We considered namespacing the network using COMPOSE_PROJECT_NAME=$BUILDKITE_JOB_ID but using the legacy bridge network | ||
# means we can avoid worrying about any impact and management overhead that multiple networks might create. | ||
network_mode: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "omnibus", github: "chef/omnibus", branch: "main" | ||
gem "omnibus-software", path: "/omnibus-software" | ||
gem "omnibus-software", path: "/omnibus-software" | ||
|
||
group :development do | ||
gem "pry" | ||
gem "pry-byebug" | ||
gem "pry-stack_explorer" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# shellcheck disable=SC1090 | ||
. ~/.bashrc | ||
|
||
# shellcheck disable=SC1091 | ||
. /opt/omnibus-toolchain/bin/load-omnibus-toolchain | ||
|
||
if [[ $CI == true ]]; then | ||
DEBUG=1 bundle config set --local without development | ||
fi | ||
|
||
rm -f Gemfile.lock | ||
|
||
DEBUG=1 bundle install | ||
|
||
if [[ $CI == true ]]; then | ||
bundle exec omnibus build test | ||
exit $? | ||
fi |