blob: 215aee9ef096e2738bfe44fc2d39f5d44fd56748 [file] [log] [blame]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine.post_process import Filter
DEPS = [
'dart',
'depot_tools/git',
'recipe_engine/context',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/step',
]
def RunSteps(api):
channel = api.properties.get('channel')
version = api.properties.get('version')
api.git.checkout(url='https://github.com/dart-lang/dart_docker.git')
env = {
'DOCKER_CONFIG': api.path['cleanup'].join('.docker'),
}
with api.context(cwd=api.path['cleanup'], env=env):
dockerhub_key = api.dart.get_secret('dockerhub')
login = [
'/bin/bash',
'-c',
'cat %s | /usr/bin/docker login --username dartbot --password-stdin'
% dockerhub_key]
api.step('docker login', login)
build_push = (api.path['start_dir']
.join('dart_docker')
.join('build_push.sh'))
with api.context(env=env):
api.step('build and push', [build_push, 'google', channel, version])
def GenTests(api):
yield api.test(
'release',
api.properties.generic(channel='stable', version='1.24.3'),
)