mirror of
https://github.com/rancher/cli.git
synced 2026-02-05 09:48:36 +01:00
275 lines
5.0 KiB
YAML
275 lines
5.0 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: build
|
|
pull: default
|
|
image: rancher/dapper:1.10.3
|
|
commands:
|
|
- dapper ci
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
|
|
- name: build-all-binaries
|
|
pull: default
|
|
image: rancher/dapper:1.10.3
|
|
commands:
|
|
- dapper ci
|
|
- ls -lR dist/artifacts
|
|
environment:
|
|
CROSS: 1
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v*"
|
|
|
|
- name: stage-binaries
|
|
pull: default
|
|
image: rancher/dapper:1.10.3
|
|
commands:
|
|
- "cp -r ./bin/* ./package/"
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v*"
|
|
|
|
- name: docker-publish-20-release
|
|
pull: default
|
|
image: plugins/docker
|
|
settings:
|
|
password:
|
|
from_secret: docker_password
|
|
username:
|
|
from_secret: docker_username
|
|
build_args:
|
|
- "VERSION=${DRONE_TAG}"
|
|
context: package/
|
|
dockerfile: package/Dockerfile
|
|
repo: rancher/cli2
|
|
tag:
|
|
- latest
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
exclude:
|
|
- "refs/tags/*rc*"
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/tags/v*"
|
|
|
|
- name: docker-publish-20-rc
|
|
pull: default
|
|
image: plugins/docker
|
|
settings:
|
|
password:
|
|
from_secret: docker_password
|
|
username:
|
|
from_secret: docker_username
|
|
build_args:
|
|
- "VERSION=${DRONE_TAG}"
|
|
context: package/
|
|
dockerfile: package/Dockerfile
|
|
repo: rancher/cli2
|
|
tag: "${DRONE_TAG}"
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/tags/v*"
|
|
|
|
- name: docker-publish-16-release
|
|
pull: default
|
|
image: plugins/docker
|
|
settings:
|
|
password:
|
|
from_secret: docker_password
|
|
username:
|
|
from_secret: docker_username
|
|
build_args:
|
|
- "VERSION=${DRONE_TAG}"
|
|
context: package/
|
|
dockerfile: package/Dockerfile
|
|
repo: rancher/cli
|
|
tag:
|
|
- latest
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
exclude:
|
|
- "refs/tags/*rc*"
|
|
include:
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v1.6*"
|
|
|
|
- name: docker-publish-16-rc
|
|
pull: default
|
|
image: plugins/docker
|
|
settings:
|
|
password:
|
|
from_secret: docker_password
|
|
username:
|
|
from_secret: docker_username
|
|
build_args:
|
|
- "VERSION=${DRONE_TAG}"
|
|
context: package/
|
|
dockerfile: package/Dockerfile
|
|
repo: rancher/cli
|
|
tag:
|
|
- "${DRONE_TAG}"
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v1.6*"
|
|
|
|
- name: binary-publish-release-2
|
|
pull: default
|
|
image: plugins/gcs
|
|
settings:
|
|
token:
|
|
from_secret: google_auth_key
|
|
acl:
|
|
- allUsers:READER
|
|
cache_control: "public,max-age=3600"
|
|
source: "dist/artifacts/${DRONE_TAG}"
|
|
target: "releases.rancher.com/cli2/${DRONE_TAG}"
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/tags/v*"
|
|
|
|
- name: binary-publish-latest-2
|
|
pull: default
|
|
image: plugins/gcs
|
|
settings:
|
|
token:
|
|
from_secret: google_auth_key
|
|
acl:
|
|
- allUsers:READER
|
|
cache_control: "public,max-age=3600"
|
|
source: dist/artifacts/latest
|
|
target: releases.rancher.com/cli2/latest
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
exclude:
|
|
- "refs/tags/*rc*"
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/tags/v*"
|
|
|
|
- name: binary-publish-release-16
|
|
pull: default
|
|
image: plugins/gcs
|
|
settings:
|
|
token:
|
|
from_secret: google_auth_key
|
|
acl:
|
|
- allUsers:READER
|
|
cache_control: "public,max-age=3600"
|
|
source: "dist/artifacts/${DRONE_TAG}"
|
|
target: "releases.rancher.com/cli/${DRONE_TAG}"
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v1.6*"
|
|
|
|
- name: binary-publish-latest-16
|
|
pull: default
|
|
image: plugins/gcs
|
|
settings:
|
|
token:
|
|
from_secret: google_auth_key
|
|
acl:
|
|
- allUsers:READER
|
|
cache_control: "public,max-age=3600"
|
|
source: dist/artifacts/latest
|
|
target: releases.rancher.com/cli/latest
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
exclude:
|
|
- "refs/tags/*rc*"
|
|
include:
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v1.6*"
|
|
|
|
- name: github-binary-publish-release
|
|
pull: default
|
|
image: plugins/github-release
|
|
settings:
|
|
api_key:
|
|
from_secret: github_token
|
|
checksum:
|
|
- sha256
|
|
checksum_flatten: true
|
|
files:
|
|
- "dist/artifacts/${DRONE_TAG}/rancher*"
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
exclude:
|
|
- "refs/tags/*rc*"
|
|
include:
|
|
- "refs/heads/master"
|
|
- "refs/heads/v1.6"
|
|
- "refs/tags/v*"
|
|
|
|
- name: github-binary-publish-prerelease
|
|
pull: default
|
|
image: plugins/github-release
|
|
settings:
|
|
api_key:
|
|
from_secret: github_token
|
|
checksum:
|
|
- sha256
|
|
checksum_flatten: true
|
|
files:
|
|
- "dist/artifacts/${DRONE_TAG}/rancher*"
|
|
prerelease: true
|
|
when:
|
|
event:
|
|
- tag
|
|
ref:
|
|
- "refs/tags/*rc*"
|
|
|
|
volumes:
|
|
- name: socket
|
|
host:
|
|
path: /var/run/docker.sock
|