Compare commits
No commits in common. "main" and "v0.2.3" have entirely different histories.
42
.drone.yml
42
.drone.yml
@ -1,44 +1,25 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:1.24
|
||||
- name: test
|
||||
image: golang:1.14.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
|
||||
memory: 512MiB
|
||||
memory: 300MiB
|
||||
requests:
|
||||
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
|
||||
pull: always
|
||||
- name: docker
|
||||
image: askbjoernhansen/drone-kaniko:0.22-5
|
||||
settings:
|
||||
repo: ask/drone-test
|
||||
repo: drone-builds/drone-test
|
||||
registry: harbor.ntppool.org
|
||||
auto_tag: true
|
||||
tags: SHA7,${DRONE_SOURCE_BRANCH}
|
||||
@ -47,14 +28,3 @@ steps:
|
||||
from_secret: harbor_username
|
||||
password:
|
||||
from_secret: harbor_password
|
||||
|
||||
volumes:
|
||||
- name: shared
|
||||
claim:
|
||||
name: go-pkg
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 2b21527432d95cf52636c65e091d9129c198299a425d12b2860d468262234d62
|
||||
|
||||
...
|
||||
|
@ -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
|
||||
ADD . .
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o demo
|
||||
|
||||
FROM alpine:3.21 as production
|
||||
|
||||
USER root
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o demo
|
||||
|
||||
FROM alpine:3.11 as production
|
||||
COPY --from=builder /go/src/gitea.develooper.com/ask/drone-test/demo .
|
||||
CMD ["./demo"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user