Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add taskcluster yml #768

Merged
merged 3 commits into from May 15, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -0,0 +1,32 @@
version: 0
tasks:
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
env: true
events:
- push
branches:
- auto
- master
- try
payload:
maxRunTime: 3600
image: ubuntu@sha256:edf05697d8ea17028a69726b4b450ad48da8b29884cd640fec950c904bfb50ce
command:
- /usr/bin/env
- bash
- '--login'
- '-c'
- >-
git clone {{event.head.repo.url}} saltfs
&& cd saltfs
&& git config advice.detachedHead false
&& git checkout {{event.head.sha}}
&& ./etc/build_image.sh
metadata:
name: Servo Trusty OCI image builder
description: Build Trusty OCI images using Salt for building/testing Servo
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
@@ -66,16 +66,17 @@ matrix:
- env:
- SALT_NODE_ID=servo-linux1
- SALT_FROM_SCRATCH=true
# ubuntu/14.04
- SALT_DOCKER_IMAGE=ubuntu@sha256:edf05697d8ea17028a69726b4b450ad48da8b29884cd640fec950c904bfb50ce
# ubuntu:trusty
# NOTE: Keep in sync with Dockerfile, .taskcluster.yml
- SALT_DOCKER_IMAGE=ubuntu@sha256:084989eb923bd86dbf7e706d464cf3587274a826b484f75b69468c19f8ae354c
os: linux
sudo: required
dist: trusty
- env:
- SALT_NODE_ID=servo-linux1
- SALT_FROM_SCRATCH=true
# ubuntu/16.04
- SALT_DOCKER_IMAGE=ubuntu@sha256:f3a61450ae43896c4332bda5e78b453f4a93179045f20c8181043b26b5e79028
# ubuntu:xenial
- SALT_DOCKER_IMAGE=ubuntu@sha256:ec0e4e8bf2c1178e025099eed57c566959bb408c6b478c284c1683bc4298b683
os: linux
sudo: required
dist: trusty
@@ -1,7 +1,9 @@
# Ubuntu Xenial
FROM ubuntu@sha256:a0ee7647e24c8494f1cf6b94f1a3cd127f423268293c25d924fbe18fd82db5a4
# ubuntu:trusty
# NOTE: Keep in sync with .travis.yml
FROM ubuntu@sha256:084989eb923bd86dbf7e706d464cf3587274a826b484f75b69468c19f8ae354c

ARG SALT_ROOT=/tmp/salt-bootstrap
ARG SALT_NODE_ID=servo-linux1

COPY ./ "${SALT_ROOT}"

@@ -16,7 +18,6 @@ RUN : \
--id="${SALT_NODE_ID}" \
--config-dir="${SALT_ROOT}/.travis" \
--file-root="${SALT_ROOT}" \
--log-level=warning \
--retcode-passthrough \
--force-color \
state.apply common,servo-build-dependencies \
@@ -0,0 +1,31 @@
# Docker usage

## Overview

As part of a move to [TaskCluster](https://docs.taskcluster.net/),
we are moving Linux builds from VMs
to [Docker](https://www.docker.com/) containers.
The Dockerfile in this repository will be used to create container images
that are suitable for running Servo builds.
To ease the transition, we will reuse our [Salt](https://saltstack.com/)
rules for provisioning in containers.

In the future, the Dockerfile and supporting files will be moved into the main
Servo repository.
This will allow our decision task to rebuild our Docker
images when there are any changes,
to enable making builder configuration changes concurrently with code changes,
e.g. adding a new dependency.

## Usage

Docker images are automatically built by Taskcluster on pushes to master,
as well as when invoked by Homu by pushes to auto and try.

To build manually, run from the saltfs root:
```sh
$ sudo docker build .
```

Currently, this creates an image capable only of building Servo itself,
not testing (no Xvfb) or cross-compiling (Android, ARM, etc.) yet.
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

shopt -s nullglob


main() {
docker build \
--force-rm=true \
--no-cache=true \
--compress=true \
./.
}


main "$@"
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.