Oops
continuous-integration/drone/push Build is failing Details

This commit is contained in:
DutchEllie 2022-05-11 14:28:02 +02:00
parent 4c7659bd37
commit 91e95a69e3
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
3 changed files with 103 additions and 9 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.drone.yml
docker-ignore.yml
LICENCE
README.md

View File

@ -6,8 +6,21 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: build-main - name: build-pepebot
image: golang:1.16.4-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- go build -a -installsuffix cgo -o /build/app ./discord
- name: build-publish-image
image: plugins/docker image: plugins/docker
volumes:
- name: build
path: /build
settings: settings:
cache_from: cache_from:
- "dutchellie/pepebot:latest" - "dutchellie/pepebot:latest"
@ -19,8 +32,36 @@ steps:
repo: dutchellie/pepebot repo: dutchellie/pepebot
tags: tags:
- latest-amd64 - latest-amd64
volumes:
- name: build
temp: {}
---
kind: pipeline
type: kubernetes
name: pepebot_service_build_x86
platform:
os: linux
arch: amd64
steps:
- name: build-pepebot_service
image: golang:1.17-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- cd ./pepeservice
- go build -a -installsuffix cgo -o /build/app .
- name: build-service - name: build-service
image: plugins/docker image: plugins/docker
volumes:
- name: build
path: /build
settings: settings:
cache_from: cache_from:
- "dutchellie/pepebot_service:latest" - "dutchellie/pepebot_service:latest"
@ -33,6 +74,10 @@ steps:
tags: tags:
- latest-amd64 - latest-amd64
volumes:
- name: build
temp: {}
--- ---
kind: pipeline kind: pipeline
@ -43,8 +88,21 @@ platform:
arch: arm64 arch: arm64
steps: steps:
- name: build-main - name: build-pepebot
image: golang:1.16.4-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- go build -a -installsuffix cgo -o /build/app ./discord
- name: build-publish-image
image: plugins/docker image: plugins/docker
volumes:
- name: build
path: /build
settings: settings:
cache_from: cache_from:
- "dutchellie/pepebot:latest" - "dutchellie/pepebot:latest"
@ -56,8 +114,36 @@ steps:
repo: dutchellie/pepebot repo: dutchellie/pepebot
tags: tags:
- latest-arm64 - latest-arm64
volumes:
- name: build
temp: {}
---
kind: pipeline
type: docker
name: pepebot_service_build_arm64
platform:
os: linux
arch: arm64
steps:
- name: build-pepebot_service
image: golang:1.17-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- cd ./pepeservice
- go build -a -installsuffix cgo -o /build/app .
- name: build-service - name: build-service
image: plugins/docker image: plugins/docker
volumes:
- name: build
path: /build
settings: settings:
cache_from: cache_from:
- "dutchellie/pepebot_service:latest" - "dutchellie/pepebot_service:latest"
@ -70,6 +156,10 @@ steps:
tags: tags:
- latest-arm64 - latest-arm64
volumes:
- name: build
temp: {}
--- ---
kind: pipeline kind: pipeline

View File

@ -1,13 +1,13 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM golang:1.16.4-alpine AS builder #FROM golang:1.16.4-alpine AS builder
WORKDIR /go/src/quenten.nl/pepebot/ #WORKDIR /go/src/quenten.nl/pepebot/
#
COPY . ./ #COPY . ./
RUN go mod download #RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app ./discord #RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app ./discord
FROM alpine:latest FROM alpine:latest
RUN apk --no-cache add ca-certificates RUN apk --no-cache add ca-certificates
WORKDIR /root/ WORKDIR /root/
COPY --from=builder /go/src/quenten.nl/pepebot/app . COPY /build/app .
CMD ["./app"] CMD ["./app"]