mirror of
https://github.com/rancher/rke.git
synced 2025-10-18 17:38:43 +00:00
208 lines
3.6 KiB
YAML
208 lines
3.6 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: skipfiles
|
|
image: plugins/git
|
|
commands:
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH} || echo ${DRONE_COMMIT_SHA}~)
|
|
- export DIFF=$(git --no-pager diff --name-only $NAME | grep -v -f .droneignore);
|
|
- if [ -z "$DIFF" ]; then
|
|
echo "All files in PR are on ignore list";
|
|
exit 78;
|
|
else
|
|
echo "Some files in PR are not ignored, $DIFF";
|
|
fi;
|
|
when:
|
|
ref:
|
|
include:
|
|
- refs/heads/master
|
|
- refs/heads/release/v*
|
|
- refs/pull/**
|
|
|
|
- name: ci
|
|
pull: default
|
|
image: rancher/dapper:v0.6.0
|
|
commands:
|
|
- dapper ci
|
|
- ls -lR build/bin
|
|
environment:
|
|
CROSS: 1
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- pull_request
|
|
- tag
|
|
|
|
- name: integration-ci
|
|
pull: default
|
|
image: rancher/dapper:v0.6.0
|
|
commands:
|
|
- dapper integration-ci
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: github_binary_prerelease
|
|
pull: default
|
|
image: plugins/github-release
|
|
settings:
|
|
api_key:
|
|
from_secret: github_token
|
|
checksum:
|
|
- sha256
|
|
files:
|
|
- "build/bin/rke*"
|
|
prerelease: true
|
|
title: "Pre-release ${DRONE_TAG}"
|
|
note: ./build/bin/rke-k8sversions.txt
|
|
overwrite: true
|
|
when:
|
|
instance:
|
|
include:
|
|
- drone-publish.rancher.io
|
|
event:
|
|
- tag
|
|
ref:
|
|
include:
|
|
- "refs/tags/*rc*"
|
|
- "refs/tags/*alpha*"
|
|
|
|
- name: github_binary_release
|
|
pull: default
|
|
image: plugins/github-release
|
|
settings:
|
|
checksum:
|
|
- sha256
|
|
files:
|
|
- "build/bin/rke*"
|
|
api_key:
|
|
from_secret: github_token
|
|
title: "Release ${DRONE_TAG}"
|
|
when:
|
|
instance:
|
|
include:
|
|
- drone-publish.rancher.io
|
|
event:
|
|
- tag
|
|
ref:
|
|
exclude:
|
|
- "refs/tags/*rc*"
|
|
- "refs/tags/*alpha*"
|
|
|
|
- name: dispatch
|
|
image: curlimages/curl:7.81.0
|
|
user: root
|
|
environment:
|
|
PAT_USERNAME:
|
|
from_secret: pat_username
|
|
PAT_TOKEN:
|
|
from_secret: github_token
|
|
commands:
|
|
- apk -U --no-cache add bash
|
|
- scripts/dispatch
|
|
when:
|
|
instance:
|
|
include:
|
|
- drone-publish.rancher.io
|
|
event:
|
|
- tag
|
|
|
|
volumes:
|
|
- name: socket
|
|
host:
|
|
path: /var/run/docker.sock
|
|
|
|
---
|
|
kind: pipeline
|
|
name: test-cni
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: build
|
|
pull: default
|
|
image: rancher/dapper:v0.6.0
|
|
commands:
|
|
- dapper build
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: integration-flannel
|
|
pull: default
|
|
image: rancher/dapper:v0.6.0
|
|
commands:
|
|
- dapper integration flannel
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: integration-calico
|
|
pull: default
|
|
image: rancher/dapper:v0.6.0
|
|
commands:
|
|
- dapper integration calico
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: integration-weave
|
|
pull: default
|
|
image: rancher/dapper:v0.6.0
|
|
commands:
|
|
- dapper integration weave
|
|
privileged: true
|
|
volumes:
|
|
- name: socket
|
|
path: /var/run/docker.sock
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
volumes:
|
|
- name: socket
|
|
host:
|
|
path: /var/run/docker.sock
|
|
|
|
---
|
|
kind: pipeline
|
|
name: fossa
|
|
|
|
steps:
|
|
- name: fossa
|
|
image: rancher/drone-fossa:latest
|
|
failure: ignore
|
|
settings:
|
|
api_key:
|
|
from_secret: FOSSA_API_KEY
|
|
when:
|
|
instance:
|
|
- drone-publish.rancher.io
|