drone-test/.drone.yml

60 lines
1.1 KiB
YAML
Raw Normal View History

2021-10-31 06:32:11 +00:00
---
2020-05-25 04:45:54 +00:00
kind: pipeline
type: kubernetes
name: default
steps:
2021-10-31 07:36:40 +00:00
- name: test
image: golang:1.17.2
commands:
- go test -v
- go build
- echo "hello" > /shared/greetings.txt
- hostname >> /shared/greetings.txt
volumes:
- name: shared
path: /shared
resources:
limits:
cpu: 1000
memory: 300MiB
requests:
cpu: 500
memory: 200MiB
2021-10-31 07:33:52 +00:00
2021-10-31 07:36:40 +00:00
- 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:latest
pull: always
settings:
repo: drone-builds/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
2021-10-31 06:30:34 +00:00
volumes:
2021-10-31 07:36:40 +00:00
- name: shared
claim:
name: go-pkg
2021-10-31 06:32:11 +00:00
---
kind: signature
2021-10-31 07:36:40 +00:00
hmac: f3cbc57fcf2218f846efb316047d808f99c2ed03fb5e8be35bdf7a7d8f48e388
2021-10-31 06:32:11 +00:00
...