summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-07-29 11:25:14 -0700
committerGitHub <noreply@github.com>2020-07-29 11:25:14 -0700
commit286694aca72a435ed4e73672facfea2389511b80 (patch)
tree5e9cbd880a8af279e749101193a56eb4ef211c86
parentaea681173ed4f8d00b187ca33d933212b273ef38 (diff)
parent6c6f02f5599e97756f913039dec5602ce4e35095 (diff)
downloadchef-286694aca72a435ed4e73672facfea2389511b80.tar.gz
Merge pull request #10180 from chef/nkierpiec/add-dobi
Add dobi-powered Docker build pipelines
-rw-r--r--.expeditor/build.docker.yml3
-rw-r--r--.expeditor/config.yml18
-rwxr-xr-x.expeditor/update_version.sh13
-rw-r--r--.gitignore3
-rw-r--r--Dockerfile8
-rw-r--r--cspell.json2
-rw-r--r--dobi.yaml21
7 files changed, 47 insertions, 21 deletions
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..b2f0d22c68 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
@@ -86,17 +84,17 @@ merge_actions:
subscriptions:
# the omnibus/docker/gem chain
- # - workload: artifact_published:unstable:chef:{{version_constraint}}
- # actions:
- # - built_in:build_docker_image
- # - workload: artifact_published:current:chef:{{version_constraint}}
- # actions:
- # - built_in:tag_docker_image
+ - workload: artifact_published:unstable:chef:{{version_constraint}}
+ actions:
+ - trigger_pipeline:docker/build
+ - workload: artifact_published:current:chef:{{version_constraint}}
+ actions:
+ - built_in:promote_docker_images
- workload: artifact_published:stable:chef:{{version_constraint}}
actions:
- built_in:rollover_changelog
- bash:.expeditor/update_dockerfile.sh
- # - built_in:tag_docker_image
+ - built_in:promote_docker_images
- built_in:publish_rubygems
- built_in:promote_habitat_packages
- built_in:notify_chefio_slack_channels
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh
index b362157d4b..3312cccbc0 100755
--- a/.expeditor/update_version.sh
+++ b/.expeditor/update_version.sh
@@ -11,10 +11,15 @@
set -evx
-sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-config/lib/chef-config/version.rb
-sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-bin/lib/chef-bin/version.rb
-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
+VERSION=$(cat VERSION)
+
+sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-config/lib/chef-config/version.rb
+sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-bin/lib/chef-bin/version.rb
+sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-utils/lib/chef-utils/version.rb
+sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"${VERSION}\")/" lib/chef/version.rb
+
+# Update the version for the dobi
+sed -i -r "s/^(\s*)VERSION: \".+\"/\1VERSION: \"${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/Dockerfile b/Dockerfile
index 4d2898cf17..5d2610093d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,20 +12,14 @@
#
# When a build is promoted to our "stable" channel .expeditor/update_dockerfile.sh is run to update the version
# in this file and also tag that image as "latest" on Docker Hub. Additionally major and minor tags will be
-# applied so 15.0.260 would be tagged as "latest", "15" and "15.0", as well as "15.0.260".
+# applied so 15.0.260 would be tagged as "latest", "stable", "15" and "15.0", as well as "15.0.260".
FROM busybox
LABEL maintainer="Chef Software, Inc. <docker@chef.io>"
-ARG EXPEDITOR_CHANNEL
ARG CHANNEL=stable
-ARG EXPEDITOR_VERSION
ARG VERSION=16.3.45
-# Allow the build arg below to be controlled by either build arguments
-ENV VERSION ${EXPEDITOR_VERSION:-${VERSION}}
-ENV CHANNEL ${EXPEDITOR_CHANNEL:-${CHANNEL}}
-
RUN wget "http://packages.chef.io/files/${CHANNEL}/chef/${VERSION}/el/6/chef-${VERSION}-1.el6.x86_64.rpm" -O /tmp/chef-client.rpm && \
rpm2cpio /tmp/chef-client.rpm | cpio -idmv && \
rm -rf /tmp/chef-client.rpm
diff --git a/cspell.json b/cspell.json
index 476ba54404..a53c1ee896 100644
--- a/cspell.json
+++ b/cspell.json
@@ -375,6 +375,8 @@
"distro",
"distros",
"DMGs",
+ "dmidecode",
+ "dnephin",
"docgen",
"dockerd",
"dockerenv",
diff --git a/dobi.yaml b/dobi.yaml
new file mode 100644
index 0000000000..4de875ce34
--- /dev/null
+++ b/dobi.yaml
@@ -0,0 +1,21 @@
+# Chef Expeditor uses this file to build the chef/chef Docker image using Dobi (dnephin/dobi)
+#
+# If you wish to build the chef-infra-client Docker image, you do not need to use this file.
+# You can build the Docker image for yourself by simply running:
+#
+# docker build .
+#
+# For more information on how this file is used, please check out the Chef Expeditor docs:
+# https://expeditor.chef.io/docs/pipelines/docker/
+
+image=chef:
+ image: '{env.IMAGE_REGISTRY}/chef'
+ context: .
+ tags:
+ - '{env.VERSION}'
+ args:
+ VERSION: '{env.VERSION}'
+ CHANNEL: unstable
+ annotations:
+ tags:
+ - expeditor:final-channel-tags={{major}},{{major}}.{{minor}} \ No newline at end of file