Compare commits

..

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

3 changed files with 28 additions and 60 deletions

View File

@ -1,20 +1,13 @@
---
kind: pipeline
type: kubernetes
name: default
steps:
- name: test
image: golang:1.23.3
- name: test
image: golang:1.16.3
commands:
- pwd
- go test -v
- go build
- echo "hello" > /shared/greetings.txt
- hostname >> /shared/greetings.txt
volumes:
- name: shared
path: /shared
resources:
limits:
cpu: 1000
@ -23,22 +16,11 @@ steps:
cpu: 500
memory: 200MiB
- name: read
pull: if-not-exists
image: alpine
volumes:
- name: shared
path: /shared
commands:
- pwd
- ls /shared
- cat /shared/greetings.txt
- name: docker
image: harbor.ntppool.org/ntppool/drone-kaniko:main
- name: docker
image: harbor.ntppool.org/ntppool/drone-kaniko:latest
pull: always
settings:
repo: ask/drone-test
repo: drone-builds/drone-test
registry: harbor.ntppool.org
auto_tag: true
tags: SHA7,${DRONE_SOURCE_BRANCH}
@ -47,14 +29,3 @@ steps:
from_secret: harbor_username
password:
from_secret: harbor_password
volumes:
- name: shared
claim:
name: go-pkg
---
kind: signature
hmac: d251c6c49b413a1db16481ea7f75050ab2775ab9ec9e52c8770f06232cf28058
...

View File

@ -1,11 +1,8 @@
FROM golang:1.23.3-alpine3.20 as builder
FROM golang:1.16.4-alpine3.13 as builder
WORKDIR /go/src/gitea.develooper.com/ask/drone-test
ADD . .
RUN CGO_ENABLED=1 GOOS=linux go build -o demo
FROM alpine:3.20 as production
USER root
FROM alpine:3.13 as production
COPY --from=builder /go/src/gitea.develooper.com/ask/drone-test/demo .
CMD ["./demo"]

2
go.mod
View File

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