summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Kierpiec <nkierpiec@chef.io>2020-07-20 16:50:14 -0400
committerTom Duffield <tom@chef.io>2020-07-28 10:53:20 -0500
commit80237aea6ac8e21a22ca23973ac6583aee681058 (patch)
tree8b4d80c035e46fe6f925af5019ab3122a7fc92de
parent160de74d71f81e7ffcd7b19cfc1e6987fdd389e0 (diff)
downloadchef-80237aea6ac8e21a22ca23973ac6583aee681058.tar.gz
Added dobi to the chef project
Dobi will take care of building/tagging/pushing docker images. - Added dobi.yaml with specs for how to build - Added build.docker.yml file which expeditor uses to build out `docker_build.pipeline.yml` - Added .envrc for local development to be able to utilize dobi - Updated relevant files that use expeditor/dobi Signed-off-by: Nathaniel Kierpiec <nkierpiec@chef.io>
-rw-r--r--.envrc2
-rw-r--r--.expeditor/build.docker.yml3
-rw-r--r--.expeditor/config.yml4
-rwxr-xr-x.expeditor/update_version.sh3
-rw-r--r--.gitignore3
-rw-r--r--dobi.yaml8
6 files changed, 20 insertions, 3 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000000..7f9b335cc1
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,2 @@
+export IMAGE_REGISTRY="localhost:5000"
+export VERSION=$(cat VERSION) \ No newline at end of file
diff --git a/.expeditor/build.docker.yml b/.expeditor/build.docker.yml
new file mode 100644
index 0000000000..691cf68e81
--- /dev/null
+++ b/.expeditor/build.docker.yml
@@ -0,0 +1,3 @@
+image_registry: chef
+env:
+ VERSION: "16.3.18" \ No newline at end of file
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index fc7e78a75c..8a6f5c48d1 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -20,12 +20,10 @@ rubygems:
- chef-bin
- chef-utils
-docker_images:
- - chef
-
pipelines:
- verify:
public: true
+ - docker/build
- habitat/build
- habitat/test:
definition: .expeditor/habitat-test.pipeline.yml
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh
index b362157d4b..d92c019ebb 100755
--- a/.expeditor/update_version.sh
+++ b/.expeditor/update_version.sh
@@ -16,6 +16,9 @@ sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-bin/li
sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-utils/lib/chef-utils/version.rb
sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"$(cat VERSION)\")/" lib/chef/version.rb
+# Update the version for the dobi
+sed -i -r "s/^(\s*)VERSION: \".+\"/\1VERSION: \"$(cat VERSION)\"/" .expeditor/build.docker.yml
+
# Update the version inside Gemfile.lock
bundle update chef chef-config chef-utils --jobs=7 --conservative
diff --git a/.gitignore b/.gitignore
index df2d678539..d63295d803 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,9 @@ tags
results
*.swp
+# Docker
+.dobi
+
# You should check in your Gemfile.lock in applications, and not in gems
external_tests/*.lock
/Gemfile.local
diff --git a/dobi.yaml b/dobi.yaml
new file mode 100644
index 0000000000..bd831c3746
--- /dev/null
+++ b/dobi.yaml
@@ -0,0 +1,8 @@
+
+# Images
+
+image=chef:
+ image: '{env.IMAGE_REGISTRY}/chef'
+ context: .
+ tags:
+ - '{env.VERSION}' \ No newline at end of file