mirror of
https://github.com/rancher/rke.git
synced 2025-07-10 13:54:04 +00:00
drone 1.x syntax
fix github-release plugin syntax drone does not support tag events with branch conditions anymore include alpha in binary_prerelease job update drone syntax for 1.x
This commit is contained in:
parent
d2783a9298
commit
a0b252c9cd
138
.drone.yml
138
.drone.yml
@ -1,59 +1,93 @@
|
|||||||
---
|
---
|
||||||
pipeline:
|
kind: pipeline
|
||||||
build:
|
name: default
|
||||||
privileged: true
|
|
||||||
image: rancher/dapper:1.11.2
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
commands:
|
|
||||||
- dapper ci
|
|
||||||
|
|
||||||
build-all-binaries:
|
platform:
|
||||||
privileged: true
|
os: linux
|
||||||
image: rancher/dapper:1.11.2
|
arch: amd64
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
environment:
|
|
||||||
- CROSS=1
|
|
||||||
commands:
|
|
||||||
- dapper build
|
|
||||||
when:
|
|
||||||
branch: [ master, release/* ]
|
|
||||||
event: tag
|
|
||||||
|
|
||||||
stage-binaries:
|
steps:
|
||||||
image: rancher/dapper:1.11.2
|
- name: ci
|
||||||
commands:
|
pull: default
|
||||||
- cp -r ./bin/* ./package/
|
image: rancher/dapper:1.11.2
|
||||||
when:
|
commands:
|
||||||
branch: [ master, release/* ]
|
- dapper ci
|
||||||
event: tag
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
github_binary_prerelease:
|
- name: build-all-binaries
|
||||||
image: plugins/github-release
|
pull: default
|
||||||
|
image: rancher/dapper:1.11.2
|
||||||
|
commands:
|
||||||
|
- dapper build
|
||||||
|
environment:
|
||||||
|
CROSS: 1
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
ref:
|
||||||
|
include:
|
||||||
|
- "refs/heads/master"
|
||||||
|
- "refs/heads/release/*"
|
||||||
|
|
||||||
|
- name: stage-binaries
|
||||||
|
pull: default
|
||||||
|
image: rancher/dapper:1.11.2
|
||||||
|
commands:
|
||||||
|
- "cp -r ./bin/* ./package/"
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
ref:
|
||||||
|
include:
|
||||||
|
- "refs/heads/master"
|
||||||
|
- "refs/heads/release/*"
|
||||||
|
|
||||||
|
- name: github_binary_prerelease
|
||||||
|
pull: default
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_token
|
||||||
|
checksum:
|
||||||
|
- sha256
|
||||||
|
files:
|
||||||
|
- "build/bin/rke_*"
|
||||||
|
- "dist/artifacts/${DRONE_TAG}/*"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
files:
|
when:
|
||||||
- build/bin/rke_*
|
event:
|
||||||
- dist/artifacts/${DRONE_TAG}/*
|
- tag
|
||||||
checksum:
|
ref:
|
||||||
- sha256
|
- "refs/tags/*rc*"
|
||||||
secrets: [github_token]
|
- "refs/tags/*alpha*"
|
||||||
when:
|
|
||||||
branch: [ master, release/* ]
|
|
||||||
event: tag
|
|
||||||
ref:
|
|
||||||
include: [ refs/tags/*rc* ]
|
|
||||||
|
|
||||||
github_binary_release:
|
- name: github_binary_release
|
||||||
image: plugins/github-release
|
pull: default
|
||||||
files:
|
image: plugins/github-release
|
||||||
- build/bin/rke_*
|
settings:
|
||||||
- dist/artifacts/${DRONE_TAG}/*
|
|
||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
secrets: [github_token]
|
files:
|
||||||
when:
|
- "build/bin/rke_*"
|
||||||
branch: [ master, release/* ]
|
- "dist/artifacts/${DRONE_TAG}/*"
|
||||||
event: tag
|
api_key:
|
||||||
ref:
|
from_secret: github_token
|
||||||
exclude: [ refs/tags/*rc* ]
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
ref:
|
||||||
|
exclude:
|
||||||
|
- "refs/tags/*rc*"
|
||||||
|
- "refs/tags/*alpha*"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
Loading…
Reference in New Issue
Block a user