Compare commits

..

No commits in common. "4e19398db3e54c40ba0637a3fb8093b0c719c0af" and "80ee60f3a1f35c076583e246968af74cdfec8f32" have entirely different histories.

2 changed files with 6 additions and 56 deletions

View File

@ -1,54 +0,0 @@
---
kind: secret
name: docker_username
get:
path: odit-registry-builder
name: username
---
kind: secret
name: docker_password
get:
path: odit-registry-builder
name: password
---
kind: pipeline
type: kubernetes
name: build:latest
steps:
- name: docker release
image: registry.odit.services/library/drone-kaniko
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: library/npm-cache-proxy
tags:
- latest
cache: true
trigger:
branch:
- main
---
kind: pipeline
type: kubernetes
name: build:tags
steps:
- name: build_tag
image: registry.odit.services/library/drone-kaniko
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: library/npm-cache-proxy
tags:
- "${DRONE_TAG}"
cache: true
registry: registry.odit.services
trigger:
event:
- tag

View File

@ -1,6 +1,8 @@
# === BUILD STAGE === #
FROM golang:1.20-alpine3.16 as build
RUN apk add --no-cache git
WORKDIR /srv/app
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
@ -8,7 +10,8 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go test -v ./... && go build -ldflags="-w -s" -o build
RUN go test -v ./...
RUN go build -ldflags="-w -s" -o build
# === RUN STAGE === #
FROM registry.odit.services/hub/library/alpine:3.16 as run
@ -22,6 +25,7 @@ RUN apk update \
WORKDIR /srv/app
COPY --from=build /srv/app/build /srv/app/build
ENV LISTEN_ADDRESS=0.0.0.0:8080 GIN_MODE=release
ENV LISTEN_ADDRESS 0.0.0.0:8080
ENV GIN_MODE release
CMD ["/srv/app/build"]