run watsjs/testflight against prebuilt Concourse

This commit is contained in:
Alex Suraci 2018-10-01 17:10:35 -04:00
parent 08f09e4c38
commit a186e776be
7 changed files with 27 additions and 23 deletions

1
.env Normal file
View File

@ -0,0 +1 @@
DOCKERFILE=Dockerfile

View File

@ -0,0 +1,17 @@
FROM concourse/dev
# generate one-off keys for development
RUN mkdir /concourse-keys
RUN ssh-keygen -t rsa -N '' -f /concourse-keys/tsa_host_key
RUN ssh-keygen -t rsa -N '' -f /concourse-keys/session_signing_key
RUN ssh-keygen -t rsa -N '' -f /concourse-keys/worker_key
RUN cp /concourse-keys/worker_key.pub /concourse-keys/authorized_worker_keys
# keys for 'web'
ENV CONCOURSE_TSA_HOST_KEY /concourse-keys/tsa_host_key
ENV CONCOURSE_TSA_AUTHORIZED_KEYS /concourse-keys/authorized_worker_keys
ENV CONCOURSE_SESSION_SIGNING_KEY /concourse-keys/session_signing_key
# keys for 'worker'
ENV CONCOURSE_TSA_PUBLIC_KEY /concourse-keys/tsa_host_key.pub
ENV CONCOURSE_TSA_WORKER_PRIVATE_KEY /concourse-keys/worker_key

View File

@ -7,13 +7,13 @@ groups:
- name: develop
jobs:
- unit
- dev-image
- testflight
- watsjs
- name: images
jobs:
- unit-image
- dev-image
jobs:
- name: unit
@ -101,9 +101,6 @@ jobs:
params: {format: oci}
- get: postgres-image
params: {format: oci}
- task: make
image: unit-image
file: concourse/ci/tasks/make.yml
- task: testflight
image: unit-image
privileged: true
@ -124,9 +121,6 @@ jobs:
params: {format: oci}
- get: postgres-image
params: {format: oci}
- task: make
image: unit-image
file: concourse/ci/tasks/make.yml
- task: watsjs
image: unit-image
privileged: true

View File

@ -7,8 +7,6 @@ image_resource:
inputs:
- name: concourse
- name: built-concourse
optional: true
- name: dev-image
optional: true
- name: postgres-image

View File

@ -7,8 +7,6 @@ image_resource:
inputs:
- name: concourse
- name: built-concourse
optional: true
- name: dev-image
optional: true
- name: postgres-image

View File

@ -19,9 +19,6 @@ function cleanup_loopbacks() {
}
concourse_dir=$PWD/concourse
if [ -d built-concourse ]; then
concourse_dir=$PWD/built-concourse
fi
function cleanup() {
docker-compose -f $concourse_dir/docker-compose.yml down
@ -37,15 +34,10 @@ start_docker
[ -d dev-image ] && docker load -i dev-image/image.tar
[ -d postgres-image ] && docker load -i postgres-image/image.tar
pushd $concourse_dir
# for better yarn output
stty columns 80
yarn install
yarn build
pushd concourse
# do not collide with outer Concourse network
export CONCOURSE_GARDEN_NETWORK_POOL="10.224.0.0/16"
docker-compose up -d
DOCKERFILE=ci/dockerfiles/dev-test/Dockerfile docker-compose up -d
popd
"$@"

View File

@ -10,7 +10,9 @@ services:
- POSTGRES_PASSWORD=
web:
build: .
build:
context: .
dockerfile: ${DOCKERFILE}
volumes:
- .:/src
command: web
@ -28,7 +30,9 @@ services:
- CONCOURSE_LOG_LEVEL=debug
worker:
build: .
build:
context: .
dockerfile: ${DOCKERFILE}
command: worker
privileged: true
depends_on: [web]