CI: also build qa
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
1a3e14040c
commit
1ad4382e97
25
.drone.yml
25
.drone.yml
|
@ -20,6 +20,7 @@ steps:
|
|||
- go get -v -d srs.epita.fr/fic-server/backend
|
||||
- go get -v -d srs.epita.fr/fic-server/frontend
|
||||
- go get -v -d srs.epita.fr/fic-server/dashboard
|
||||
- go get -v -d srs.epita.fr/fic-server/qa
|
||||
- mkdir deploy
|
||||
|
||||
- name: build admin
|
||||
|
@ -42,6 +43,11 @@ steps:
|
|||
commands:
|
||||
- go build -v -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
|
||||
|
||||
- name: build qa
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -o deploy/qa-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/qa
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
|
@ -100,6 +106,11 @@ steps:
|
|||
commands:
|
||||
- go build -v -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
|
||||
|
||||
- name: build qa
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -o deploy/qa-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/qa
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
|
@ -170,3 +181,17 @@ steps:
|
|||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: docker qa
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: nemunaire/fic-qa
|
||||
tags: latest
|
||||
dockerfile: Dockerfile-qa
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
FROM golang:alpine as gobuild
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
WORKDIR /go/src/srs.epita.fr/fic-server/qa
|
||||
|
||||
ADD qa/*.go ./
|
||||
ADD qa/api/*.go ./api/
|
||||
ADD libfic ../libfic/
|
||||
ADD settings ../settings/
|
||||
|
||||
RUN go get -d -v
|
||||
RUN go build -v
|
||||
|
||||
|
||||
FROM alpine
|
||||
|
||||
EXPOSE 8083
|
||||
|
||||
WORKDIR /srv
|
||||
|
||||
ENTRYPOINT ["/srv/qa", "--bind=:8083"]
|
||||
|
||||
VOLUME /srv/htdocs-qa/
|
||||
|
||||
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/qa/qa /srv/qa
|
||||
COPY qa/static/index.html /srv/htdocs-qa/
|
||||
COPY qa/static/css/bootstrap.min.css frontend/static/css/fic.css frontend/static/css/glyphicon.css /srv/htdocs-qa/css/
|
||||
COPY frontend/static/fonts /srv/htdocs-qa/fonts
|
||||
COPY frontend/static/img/ /srv/htdocs-qa/img/
|
||||
COPY qa/static/js/qa.js frontend/static/js/angular.min.js qa/static/js/angular-resource.min.js frontend/static/js/angular-route.min.js frontend/static/js/angular-sanitize.min.js frontend/static/js/bootstrap.min.js frontend/static/js/common.js frontend/static/js/i18n frontend/static/js/jquery.min.js /srv/htdocs-qa/js/
|
|
@ -182,6 +182,12 @@ server {
|
|||
proxy_redirect off;
|
||||
}
|
||||
|
||||
location /qa/ {
|
||||
proxy_pass http://fic-qa:8083;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
location /registration {
|
||||
#auth_basic "Secure Zone";
|
||||
#auth_basic_user_file ficpasswd;
|
||||
|
|
Loading…
Reference in New Issue