From 38cff919080ab2a8e0a535cb587de6167cda7f6d Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Wed, 21 Jun 2017 23:45:19 -0300 Subject: [PATCH] FEATURE: Build a public test image every week --- image/auto_build.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/image/auto_build.rb b/image/auto_build.rb index f7502c3..40ce7b0 100644 --- a/image/auto_build.rb +++ b/image/auto_build.rb @@ -5,8 +5,9 @@ require 'optparse' images = { base: { name: 'base', tag: "discourse/base:build", squash: true }, - discourse_test: { name: 'discourse_test', tag: "discourse/discourse_test:build", squash: false}, - discourse_dev: { name: 'discourse_dev', tag: "discourse/discourse_dev:build", squash: false } + discourse_test_build: { name: 'discourse_test', tag: "discourse/discourse_test:build", squash: false}, + discourse_dev: { name: 'discourse_dev', tag: "discourse/discourse_dev:build", squash: false }, + discourse_test_public: { name: 'discourse_test', tag: "discourse/discourse_test:release", squash: true, extra_args: ' --build-arg tag=release '} } def run(command) @@ -26,7 +27,7 @@ def run(command) end def build(image) - lines = run("cd #{image[:name]} && docker build . --no-cache --tag #{image[:tag]} #{image[:squash] ? '--squash' : ''}") + lines = run("cd #{image[:name]} && docker build . --no-cache --tag #{image[:tag]} #{image[:squash] ? '--squash' : ''} #{image[:extra_args] ? image[:extra_args] : ''}") raise "Error building the image for #{image[:name]}: #{lines[-1]}" if lines[-1] =~ /successfully built/ end -- 2.25.1