drone-test/.drone.yml

74 lines
1.3 KiB
YAML
Raw Permalink 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
2023-06-04 00:33:22 +00:00
image: golang:1.20.4
2021-10-31 07:36:40 +00:00
commands:
2023-06-04 00:33:22 +00:00
- pwd
2021-10-31 07:36:40 +00:00
- 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
2023-06-04 00:33:22 +00:00
- name: download
image: fedora:38
commands:
- ls; pwd
- ./scripts/download-release test/187 dist/
resources:
requests:
cpu: 250
memory: 64MiB
limits:
cpu: 250
memory: 256MiB
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
2023-06-04 00:33:22 +00:00
image: harbor.ntppool.org/ntppool/drone-kaniko:main
2021-10-31 07:36:40 +00:00
pull: always
settings:
2021-11-08 18:25:01 +00:00
repo: ask/drone-test
2021-10-31 07:36:40 +00:00
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
2023-06-04 00:33:22 +00:00
hmac: 94513b436eb1b0ef9f1d1b0f128328f23bb343f1b9d9d6e7a0e80dacc22d3c48
2021-10-31 06:32:11 +00:00
...