add dredd to dev dc environment

This commit is contained in:
Anton Markelov 2018-10-22 12:13:59 +10:00
parent cbe0c5ffc8
commit 7bab8e0332
5 changed files with 43 additions and 1 deletions

View File

@ -8,6 +8,9 @@ services:
MYSQL_DATABASE: semaphore
MYSQL_USER: semaphore
MYSQL_PASSWORD: semaphore
## uncomment if you want to store mysql data between launches
#volumes:
# - /tmp/mysql_data:/var/lib/mysql
ports:
- "3306:3306"

View File

@ -0,0 +1,12 @@
version: '2'
services:
dredd:
image: ansiblesemaphore/dredd:dev-compose
command: ["--config", ".dredd/dredd.yml"]
build:
context: ./../../../
dockerfile: ./deployment/docker/dev/dredd.Dockerfile
external_links:
- dev_semaphore_dev_1:semaphore_dev

View File

@ -8,6 +8,9 @@ services:
MYSQL_DATABASE: semaphore
MYSQL_USER: semaphore
MYSQL_PASSWORD: semaphore
## uncomment if you want to store mysql data between launches
#volumes:
# - /tmp/mysql_data:/var/lib/mysql
ports:
- "3306:3306"
@ -34,4 +37,3 @@ services:
- "3000:3000"
depends_on:
- mysql

View File

@ -0,0 +1,24 @@
# hadolint ignore=DL3006
FROM tomwhiston/dredd:latest
ENV TASK_VERSION=v2.0.1 \
GOPATH=/home/developer/go \
SEMAPHORE_SERVICE=semaphore_dev \
SEMAPHORE_PORT=3000 \
MYSQL_SERVICE=mysql \
MYSQL_PORT=3306
# We need the source and task to compile the hooks
USER 0
RUN dnf install -y nc
COPY deployment/docker/ci/dredd/entrypoint /usr/local/bin
COPY . /home/developer/go/src/github.com/ansible-semaphore/semaphore
WORKDIR /usr/local/bin
RUN curl -L "https://github.com/go-task/task/releases/download/${TASK_VERSION}/task_linux_amd64.tar.gz" | tar xvz && \
chown -R developer /home/developer/go
# Get tools and do compile
WORKDIR /home/developer/go/src/github.com/ansible-semaphore/semaphore
RUN task deps:tools && task deps:be && task compile:be && task compile:api:hooks
ENTRYPOINT ["/usr/local/bin/entrypoint"]

1
public/vendor Submodule

@ -0,0 +1 @@
Subproject commit 31cbac89f1465de60797d2879addc8c71de93d1b