parent
b18135e579
commit
64c096860a
@ -0,0 +1,48 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: Build Application
|
||||||
|
steps:
|
||||||
|
- name: Build And Test
|
||||||
|
image: golang:1.14
|
||||||
|
commands:
|
||||||
|
- go build ./...
|
||||||
|
- go test ./...
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: Build Docker Image
|
||||||
|
steps:
|
||||||
|
- name: Build Docker Image
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
registry: docker.teamortix.com
|
||||||
|
username: droneci
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: docker.teamortix.com/teamortix/status
|
||||||
|
tags: test
|
||||||
|
purge: true
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
depends_on:
|
||||||
|
- Build Application
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: Continuous Deployment
|
||||||
|
steps:
|
||||||
|
- name: Deploy Docker Image
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
registry: docker.teamortix.com
|
||||||
|
username: droneci
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: docker.teamortix.com/teamortix/status
|
||||||
|
auto_tag: true
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
depends_on:
|
||||||
|
- Build Application
|
@ -0,0 +1,10 @@
|
|||||||
|
FROM golang:1.14.2 AS build
|
||||||
|
WORKDIR /root/
|
||||||
|
COPY . .
|
||||||
|
RUN go build -o Status .
|
||||||
|
|
||||||
|
FROM golang:1.14.2
|
||||||
|
WORKDIR /root/
|
||||||
|
COPY --from=build /root/Status .
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD ["./ASUBot"]
|
Loading…
Reference in New Issue