1 Star 0 Fork 0

wwjiang007/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.drone.yml 17.98 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
---
kind: pipeline
name: default-linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: rancher/dapper:v0.5.2
commands:
- dapper ci
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- push
- pull_request
- tag
- name: stage-binaries
image: rancher/dapper:v0.5.2
commands:
- "cp -r ./bin/* ./package/"
when:
event:
- push
- tag
- name: docker-publish-head
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-amd64
password:
from_secret: docker_password
repo: rancher/rancher
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish-head-agent
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
- RANCHER_TAG=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-amd64
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile.agent
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-amd64
password:
from_secret: docker_password
repo: rancher/rancher-agent
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish-head-runtime
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile.runtime
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-amd64
password:
from_secret: docker_password
repo: rancher/rancher-runtime
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: bin-publish
image: plugins/gcs
settings:
acl:
- allUsers:READER
cache_control: "public,no-cache,proxy-revalidate"
source: bin/rancherd
target: releases.rancher.com/rancherd/rancherd-master
token:
from_secret: google_auth_key
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- "VERSION=${DRONE_TAG}"
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: rancher/rancher
tag: "${DRONE_TAG}-linux-amd64"
username:
from_secret: docker_username
when:
event:
- tag
- name: docker-publish-agent
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- "VERSION=${DRONE_TAG}"
- "RANCHER_TAG=${DRONE_TAG}-linux-amd64"
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: "${DRONE_TAG}-linux-amd64"
username:
from_secret: docker_username
when:
event:
- tag
- name: docker-publish-runtime
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- "VERSION=${DRONE_TAG}"
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile.runtime
password:
from_secret: docker_password
repo: rancher/rancher-runtime
tag: "${DRONE_TAG}-linux-amd64"
username:
from_secret: docker_username
when:
event:
- tag
- name: github_binary_prerelease
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
files:
- "bin/rancher-*"
- "bin/rancherd-*"
prerelease: true
when:
event:
- tag
ref:
include:
- "refs/tags/*rc*"
- "refs/tags/*alpha*"
- name: github_binary_release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
files:
- "bin/rancher-*"
- "bin/rancherd-*"
when:
event:
- tag
ref:
include:
- "refs/tags/v2*"
exclude:
- "refs/tags/*rc*"
- "refs/tags/*alpha*"
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to publish an image/artifact.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
exclude:
- promote
---
kind: pipeline
name: default-linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: build
image: rancher/dapper:v0.5.2
commands:
- dapper ci
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- push
- pull_request
- tag
- name: stage-binaries
image: rancher/dapper:v0.5.2
commands:
- "cp -r ./bin/* ./package/"
when:
event:
- push
- tag
- name: docker-publish-head
image: plugins/docker
settings:
build_args:
- ARCH=arm64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-arm64
password:
from_secret: docker_password
repo: rancher/rancher
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish-head-agent
image: plugins/docker
settings:
build_args:
- ARCH=arm64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
- RANCHER_TAG=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-arm64
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile.agent
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-linux-arm64
password:
from_secret: docker_password
repo: rancher/rancher-agent
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish
image: plugins/docker
settings:
build_args:
- ARCH=arm64
- "VERSION=${DRONE_TAG}"
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: rancher/rancher
tag: "${DRONE_TAG}-linux-arm64"
username:
from_secret: docker_username
when:
event:
- tag
- name: docker-publish-agent
image: plugins/docker
settings:
build_args:
- ARCH=arm64
- "VERSION=${DRONE_TAG}"
- "RANCHER_TAG=${DRONE_TAG}-linux-arm64"
context: package/
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: "${DRONE_TAG}-linux-arm64"
username:
from_secret: docker_username
when:
event:
- tag
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to publish an image/artifact.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
exclude:
- promote
---
kind: pipeline
name: default-windows-1809
platform:
os: windows
arch: amd64
version: 1809
steps:
- name: build
pull: always
image: rancher/dapper:v0.5.2
commands:
- dapper.exe -f Dockerfile-windows.dapper -d ci
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
event:
- push
- pull_request
- tag
- name: stage-binaries
image: rancher/dapper:v0.5.2
commands:
- "cp -r ./bin/* ./package/windows/"
when:
event:
- push
- tag
- name: docker-publish-head-agent
image: plugins/docker:windows-1809-amd64
settings:
build_args:
- SERVERCORE_VERSION=1809
- ARCH=amd64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
context: package/windows
custom_dns: 1.1.1.1
dockerfile: package/windows/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-windows-1809
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish-agent
image: plugins/docker:windows-1809-amd64
settings:
build_args:
- SERVERCORE_VERSION=1809
- ARCH=amd64
- "VERSION=${DRONE_TAG}"
context: package/windows
custom_dns: 1.1.1.1
dockerfile: package/windows/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: "${DRONE_TAG}-windows-1809"
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
event:
- tag
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to publish an image/artifact.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker_pipe
host:
path: \\\\.\\pipe\\docker_engine
trigger:
event:
exclude:
- promote
---
kind: pipeline
name: default-windows-1903
platform:
os: windows
arch: amd64
version: 1903
steps:
- name: build
pull: always
image: rancher/dapper:v0.5.2
commands:
- dapper.exe -f Dockerfile-windows.dapper -d ci
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
event:
- push
- pull_request
- tag
- name: stage-binaries
image: rancher/dapper:v0.5.2
commands:
- "cp -r ./bin/* ./package/windows/"
when:
event:
- push
- tag
- name: docker-publish-head-agent
image: plugins/docker:windows-1903-amd64
settings:
build_args:
- SERVERCORE_VERSION=1903
- ARCH=amd64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
context: package/windows
custom_dns: 1.1.1.1
dockerfile: package/windows/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-windows-1903
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish-agent
image: plugins/docker:windows-1903-amd64
settings:
build_args:
- SERVERCORE_VERSION=1903
- ARCH=amd64
- "VERSION=${DRONE_TAG}"
context: package/windows
custom_dns: 1.1.1.1
dockerfile: package/windows/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: "${DRONE_TAG}-windows-1903"
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
event:
- tag
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to publish an image/artifact.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker_pipe
host:
path: \\\\.\\pipe\\docker_engine
trigger:
event:
exclude:
- promote
---
kind: pipeline
name: default-windows-1909
platform:
os: windows
arch: amd64
version: 1909
steps:
- name: build
pull: always
image: rancher/dapper:v0.5.2
commands:
- dapper.exe -f Dockerfile-windows.dapper -d ci
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
event:
- push
- pull_request
- tag
- name: stage-binaries
image: rancher/dapper:v0.5.2
commands:
- "cp -r ./bin/* ./package/windows/"
when:
event:
- push
- tag
- name: docker-publish-head-agent
image: plugins/docker:windows-1909-amd64
settings:
build_args:
- SERVERCORE_VERSION=1909
- ARCH=amd64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
context: package/windows
custom_dns: 1.1.1.1
dockerfile: package/windows/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-windows-1909
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
event:
- push
- name: docker-publish-agent
image: plugins/docker:windows-1909-amd64
settings:
build_args:
- SERVERCORE_VERSION=1909
- ARCH=amd64
- "VERSION=${DRONE_TAG}"
context: package/windows
custom_dns: 1.1.1.1
dockerfile: package/windows/Dockerfile.agent
password:
from_secret: docker_password
repo: rancher/rancher-agent
tag: "${DRONE_TAG}-windows-1909"
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
when:
event:
- tag
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to publish an image/artifact.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker_pipe
host:
path: \\\\.\\pipe\\docker_engine
trigger:
event:
exclude:
- promote
---
kind: pipeline
name: manifest
steps:
- name: push-runtime-manifest
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest-runtime.tmpl
when:
instance:
include:
- drone-publish.rancher.io
event:
- push
- tag
- name: push-agent-manifest
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest-agent.tmpl
when:
instance:
include:
- drone-publish.rancher.io
event:
- push
- tag
- name: push-agent-manifest-head
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest-agent-head.tmpl
when:
instance:
include:
- drone-publish.rancher.io
event:
- push
- name: push-manifest
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest.tmpl
when:
instance:
include:
- drone-publish.rancher.io
event:
- push
- tag
- name: build-chart
image: rancher/dapper:v0.5.2
commands:
- dapper chart/ci
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- push
- tag
- name: chart-publish
image: plugins/gcs
settings:
acl:
- allUsers:READER
cache_control: "public,no-cache,proxy-revalidate"
source: bin/chart
target: releases.rancher.com/server-charts
token:
from_secret: google_auth_key
when:
event:
- tag
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to push manifests.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
include:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
exclude:
- promote
depends_on:
- default-linux-amd64
- default-linux-arm64
- default-windows-1809
- default-windows-1903
- default-windows-1909
---
kind: pipeline
name: publish
platform:
os: linux
arch: amd64
steps:
- name: chart-promote
image: rancher/dapper:v0.5.2
commands:
- dapper chart/copy
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- promote
target:
- promote-stable
- name: chart-publish
image: plugins/gcs
settings:
acl:
- allUsers:READER
cache_control: "public,no-cache,proxy-revalidate"
source: bin/chart
target: releases.rancher.com/server-charts
token:
from_secret: google_auth_key
- name: slack_notify
image: plugins/slack
settings:
template: "Build {{build.link}} failed to promote chart.\n"
username: Drone_Publish
webhook:
from_secret: slack_webhook
when:
event:
exclude:
- pull_request
instance:
include:
- drone-publish.rancher.io
status:
- failure
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
- promote
...
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wwjiang007/rancher.git
git@gitee.com:wwjiang007/rancher.git
wwjiang007
rancher
rancher
master

搜索帮助