diff options
Diffstat (limited to 'taskcluster/ci/docker-image')
-rw-r--r-- | taskcluster/ci/docker-image/image.yml | 68 | ||||
-rw-r--r-- | taskcluster/ci/docker-image/kind.yml | 19 |
2 files changed, 87 insertions, 0 deletions
diff --git a/taskcluster/ci/docker-image/image.yml b/taskcluster/ci/docker-image/image.yml new file mode 100644 index 000000000..f9a1113f0 --- /dev/null +++ b/taskcluster/ci/docker-image/image.yml @@ -0,0 +1,68 @@ +--- +task: + created: + relative-datestamp: "0 seconds" + deadline: + relative-datestamp: "24 hours" + metadata: + name: 'Docker Image Build: {{image_name}}' + description: 'Build the docker image {{image_name}} for use by dependent tasks' + source: '{{source}}' + owner: mozilla-taskcluster-maintenance@mozilla.com + tags: + createdForUser: '{{owner}}' + + workerType: taskcluster-images + provisionerId: aws-provisioner-v1 + schedulerId: task-graph-scheduler + + routes: + # Indexing routes to avoid building the same image twice + - index.{{index_image_prefix}}.level-{{level}}.{{image_name}}.latest + - index.{{index_image_prefix}}.level-{{level}}.{{image_name}}.pushdate.{{year}}.{{month}}-{{day}}-{{pushtime}} + - index.{{index_image_prefix}}.level-{{level}}.{{image_name}}.hash.{{context_hash}} + # Treeherder routes + - tc-treeherder.v2.{{project}}.{{head_rev}}.{{pushlog_id}} + - tc-treeherder-stage.v2.{{project}}.{{head_rev}}.{{pushlog_id}} + + scopes: + - secrets:get:project/taskcluster/gecko/hgfingerprint + - docker-worker:cache:level-{{level}}-imagebuilder-v1 + + payload: + env: + HASH: '{{context_hash}}' + PROJECT: '{{project}}' + CONTEXT_URL: '{{context_url}}' + IMAGE_NAME: '{{image_name}}' + GECKO_BASE_REPOSITORY: '{{base_repository}}' + GECKO_HEAD_REPOSITORY: '{{head_repository}}' + GECKO_HEAD_REV: '{{head_rev}}' + HG_STORE_PATH: '/home/worker/checkouts/hg-store' + cache: + 'level-{{level}}-imagebuilder-v1': '/home/worker/checkouts' + features: + dind: true + chainOfTrust: true + taskclusterProxy: true + image: '{{#docker_image}}image_builder{{/docker_image}}' + maxRunTime: 3600 + artifacts: + '{{artifact_path}}': + type: 'file' + path: '/home/worker/workspace/artifacts/image.tar.zst' + expires: + relative-datestamp: "1 year" + extra: + imageMeta: # Useful when converting back from JSON in action tasks + level: '{{level}}' + contextHash: '{{context_hash}}' + imageName: '{{image_name}}' + treeherderEnv: + - staging + - production + treeherder: + jobKind: other + build: + platform: 'taskcluster-images' + groupSymbol: 'I' diff --git a/taskcluster/ci/docker-image/kind.yml b/taskcluster/ci/docker-image/kind.yml new file mode 100644 index 000000000..d1c118c8e --- /dev/null +++ b/taskcluster/ci/docker-image/kind.yml @@ -0,0 +1,19 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +implementation: 'taskgraph.task.docker_image:DockerImageTask' +images_path: '../../../testing/docker' + +# make a task for each docker-image we might want. For the moment, since we +# write artifacts for each, these are whitelisted, but ideally that will change +# (to use subdirectory clones of the proper directory), at which point we can +# generate tasks for every docker image in the directory, secure in the +# knowledge that unnecessary images will be omitted from the target task graph +images: + desktop-test: dt + desktop1604-test: dt16t + desktop-build: db + tester: tst + lint: lnt + android-gradle-build: agb |