Add Concourse CI configs

This commit is contained in:
Brad Ison 2017-02-02 17:11:12 -05:00
parent 5a06530b43
commit 66c8153d72
7 changed files with 272 additions and 0 deletions

View file

@ -1,3 +1,4 @@
./ci/
conf/stack
screenshots
tools

View file

@ -0,0 +1,178 @@
resource_types:
- name: pull-request
type: docker-image
source:
repository: quay.io/quay/pr-resource
username: {{quay-robot-username}}
password: {{quay-robot-password}}
resources:
- name: build-image
type: docker-image
source:
repository: quay.io/quay/quay-build-image
username: {{quay-robot-username}}
password: {{quay-robot-password}}
- name: quay-pull-request
type: pull-request
source:
access_token: {{quay-github-token}}
private_key: {{quay-git-private-key}}
repo: coreos-inc/quay
uri: git@github.com:coreos-inc/quay.git
base: master
disable_forks: true
jobs:
- name: karma
max_in_flight: 4
plan:
- get: quay-pull-request
trigger: true
version: every
- get: build-image
- put: quay-pull-request
params:
path: quay-pull-request
context: karma
status: pending
- task: karma
image: build-image
file: quay-pull-request/ci/tasks/karma.yaml
on_success:
put: quay-pull-request
params:
path: quay-pull-request
context: karma
status: success
on_failure:
put: quay-pull-request
params:
path: quay-pull-request
context: karma
status: failure
- name: unit
max_in_flight: 4
plan:
- get: quay-pull-request
trigger: true
version: every
- get: build-image
- put: quay-pull-request
params:
path: quay-pull-request
context: unit
status: pending
- task: unit
image: build-image
file: quay-pull-request/ci/tasks/unit.yaml
on_success:
put: quay-pull-request
params:
path: quay-pull-request
context: unit
status: success
on_failure:
put: quay-pull-request
params:
path: quay-pull-request
context: unit
status: failure
- name: registry
plan:
- get: quay-pull-request
trigger: true
version: every
- get: build-image
- put: quay-pull-request
params:
path: quay-pull-request
context: registry
status: pending
- task: registry
image: build-image
file: quay-pull-request/ci/tasks/registry.yaml
on_success:
put: quay-pull-request
params:
path: quay-pull-request
context: registry
status: success
on_failure:
put: quay-pull-request
params:
path: quay-pull-request
context: registry
status: failure
- name: mysql
plan:
- get: quay-pull-request
trigger: true
version: every
- get: build-image
- put: quay-pull-request
params:
path: quay-pull-request
context: mysql
status: pending
- task: mysql
image: build-image
file: quay-pull-request/ci/tasks/mysql.yaml
on_success:
put: quay-pull-request
params:
path: quay-pull-request
context: mysql
status: success
on_failure:
put: quay-pull-request
params:
path: quay-pull-request
context: mysql
status: failure
- name: postgres
plan:
- get: quay-pull-request
trigger: true
version: every
- get: build-image
- put: quay-pull-request
params:
path: quay-pull-request
context: postgres
status: pending
- task: postgres
image: build-image
file: quay-pull-request/ci/tasks/postgres.yaml
on_success:
put: quay-pull-request
params:
path: quay-pull-request
context: postgres
status: success
on_failure:
put: quay-pull-request
params:
path: quay-pull-request
context: postgres
status: failure

14
ci/tasks/karma.yaml Normal file
View file

@ -0,0 +1,14 @@
---
platform: linux
inputs:
- name: quay-pull-request
run:
path: /bin/sh
args:
- -c
- |
set -eux
cd quay-pull-request
npm install
npm link typescript
npm test

23
ci/tasks/mysql.yaml Normal file
View file

@ -0,0 +1,23 @@
---
platform: linux
inputs:
- name: quay-pull-request
run:
path: /bin/sh
args:
- -c
- |
set -eux
export TEST=true
export TEST_DATABASE_URI='mysql+pymysql://quay@127.0.0.1/genschema'
export SKIP_DB_SCHEMA=true
pip install --quiet -r quay-pull-request/requirements.txt
pip install --quiet -r quay-pull-request/requirements-tests.txt
service mysql start
mysqladmin create genschema
mysql -e "CREATE USER 'quay'@'127.0.0.1' IDENTIFIED BY '';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'quay'@'127.0.0.1';"
cd quay-pull-request
PYTHONPATH="." alembic upgrade head
PYTHONPATH="." python -m unittest discover -f
service mysql stop

24
ci/tasks/postgres.yaml Normal file
View file

@ -0,0 +1,24 @@
---
platform: linux
inputs:
- name: quay-pull-request
run:
path: /bin/sh
args:
- -c
- |
set -eux
export TEST=true
export TEST_DATABASE_URI='postgresql://quay:quay@127.0.0.1/quaytest'
export SKIP_DB_SCHEMA=true
pip install --quiet -r quay-pull-request/requirements.txt
pip install --quiet -r quay-pull-request/requirements-tests.txt
service postgresql start
su postgres -c "createuser --echo --superuser --no-password quay"
su postgres -c "psql -c \"ALTER USER quay WITH PASSWORD 'quay';\""
su postgres -c "psql -c 'CREATE DATABASE quaytest;'"
su postgres -c "psql -c 'GRANT ALL PRIVILEGES ON DATABASE quaytest TO quay';"
cd quay-pull-request
PYTHONPATH="." alembic upgrade head
PYTHONPATH="." python -m unittest discover -f
service postgresql stop

16
ci/tasks/registry.yaml Normal file
View file

@ -0,0 +1,16 @@
---
platform: linux
inputs:
- name: quay-pull-request
run:
path: /bin/sh
args:
- -c
- |
set -eux
export TEST=true
pip install --quiet -r quay-pull-request/requirements.txt
pip install --quiet -r quay-pull-request/requirements-tests.txt
cd quay-pull-request
PYTHONPATH="." py.test --timeout=7200 --verbose \
--show-count -x test/registry_tests.py

16
ci/tasks/unit.yaml Normal file
View file

@ -0,0 +1,16 @@
---
platform: linux
inputs:
- name: quay-pull-request
run:
path: /bin/sh
args:
- -c
- |
set -eux
export TEST=true
pip install --quiet -r quay-pull-request/requirements.txt
pip install --quiet -r quay-pull-request/requirements-tests.txt
cd quay-pull-request
PYTHONPATH="." py.test --timeout=7200 --verbose \
--show-count -x .