Compare commits

..

No commits in common. "main" and "v0.3.0" have entirely different histories.
main ... v0.3.0

3 changed files with 27 additions and 63 deletions

View File

@ -1,60 +1,30 @@
---
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: default name: default
steps: steps:
- name: test - name: test
image: golang:1.24 image: golang:1.14.3
commands: commands:
- pwd - go test -v
- go test -v - go build
- go build resources:
- echo "hello" > /shared/greetings.txt limits:
- hostname >> /shared/greetings.txt cpu: 1000
volumes: memory: 300MiB
- name: shared requests:
path: /shared cpu: 500
resources: memory: 200MiB
limits:
cpu: 1000
memory: 512MiB
requests:
cpu: 500
memory: 200MiB
- name: read - name: docker
pull: if-not-exists image: askbjoernhansen/drone-kaniko:0.22-6
image: alpine settings:
volumes: repo: drone-builds/drone-test
- name: shared registry: harbor.ntppool.org
path: /shared auto_tag: true
commands: tags: SHA7,${DRONE_SOURCE_BRANCH}
- pwd cache: true
- ls /shared username:
- cat /shared/greetings.txt from_secret: harbor_username
password:
- name: docker from_secret: harbor_password
image: harbor.ntppool.org/ntppool/drone-kaniko:main
pull: always
settings:
repo: ask/drone-test
registry: harbor.ntppool.org
auto_tag: true
tags: SHA7,${DRONE_SOURCE_BRANCH}
cache: true
username:
from_secret: harbor_username
password:
from_secret: harbor_password
volumes:
- name: shared
claim:
name: go-pkg
---
kind: signature
hmac: 2b21527432d95cf52636c65e091d9129c198299a425d12b2860d468262234d62
...

View File

@ -1,11 +1,8 @@
FROM golang:1.24-alpine3.21 as builder FROM golang:1.14.3 as builder
WORKDIR /go/src/gitea.develooper.com/ask/drone-test WORKDIR /go/src/gitea.develooper.com/ask/drone-test
ADD . . ADD . .
RUN CGO_ENABLED=1 GOOS=linux go build -o demo RUN CGO_ENABLED=0 GOOS=linux go build -o demo
FROM alpine:3.21 as production
USER root
FROM alpine:3.11 as production
COPY --from=builder /go/src/gitea.develooper.com/ask/drone-test/demo . COPY --from=builder /go/src/gitea.develooper.com/ask/drone-test/demo .
CMD ["./demo"] CMD ["./demo"]

3
go.mod
View File

@ -1,3 +0,0 @@
module gitea.develooper.com/ask/drone-test
go 1.23