Skip to content

Commit fd4bf7c

Browse files
committed
fix(ci): provide build metadata in docker smoke task
1 parent 1c9af03 commit fd4bf7c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ desc 'Build and run docker image/container, and send requests to it'
4646
task :test do
4747
current_dir = ENV.fetch('GITHUB_WORKSPACE', __dir__)
4848
smoke_auto_source_enabled = ENV.fetch('SMOKE_AUTO_SOURCE_ENABLED', 'false')
49+
smoke_build_tag = ENV.fetch('SMOKE_BUILD_TAG', ENV.fetch('BUILD_TAG', 'docker-smoke'))
50+
smoke_git_sha = ENV.fetch('SMOKE_GIT_SHA', ENV.fetch('GITHUB_SHA', ENV.fetch('GIT_SHA', 'docker-smoke')))
4951
image_name = 'html2rss/web'
5052
skip_build = ENV.fetch('DOCKER_SMOKE_SKIP_BUILD', 'false') == 'true'
5153

@@ -60,6 +62,8 @@ task :test do
6062
'-d',
6163
'-p 4000:4000',
6264
'--env PUMA_LOG_CONFIG=1',
65+
"--env BUILD_TAG=#{smoke_build_tag}",
66+
"--env GIT_SHA=#{smoke_git_sha}",
6367
'--env HEALTH_CHECK_TOKEN=CHANGE_ME_HEALTH_CHECK_TOKEN',
6468
'--env HTML2RSS_SECRET_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
6569
"--env AUTO_SOURCE_ENABLED=#{smoke_auto_source_enabled}",

0 commit comments

Comments
 (0)