mirror of
https://github.com/rancher/rke.git
synced 2025-08-02 07:43:04 +00:00
Clean/speed up Drone
This commit is contained in:
parent
bf7f30c64d
commit
7383d9e5e5
35
.drone.yml
35
.drone.yml
@ -7,6 +7,24 @@ platform:
|
||||
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
|
||||
@ -24,6 +42,19 @@ steps:
|
||||
- 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
|
||||
@ -115,7 +146,6 @@ steps:
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
- tag
|
||||
|
||||
- name: integration-flannel
|
||||
pull: default
|
||||
@ -129,7 +159,6 @@ steps:
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
- tag
|
||||
|
||||
- name: integration-calico
|
||||
pull: default
|
||||
@ -143,7 +172,6 @@ steps:
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
- tag
|
||||
|
||||
- name: integration-weave
|
||||
pull: default
|
||||
@ -157,7 +185,6 @@ steps:
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
- tag
|
||||
|
||||
volumes:
|
||||
- name: socket
|
||||
|
6
.droneignore
Normal file
6
.droneignore
Normal file
@ -0,0 +1,6 @@
|
||||
^.*\.md$
|
||||
^\.droneignore$
|
||||
^\.github\/.*$
|
||||
^CODEOWNERS$
|
||||
^LICENSE$
|
||||
^docs/.*$
|
@ -6,5 +6,4 @@ cd $(dirname $0)
|
||||
./validate
|
||||
./build
|
||||
./test
|
||||
./integration
|
||||
./package
|
||||
|
7
scripts/integration-ci
Executable file
7
scripts/integration-ci
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
./build
|
||||
./integration
|
Loading…
Reference in New Issue
Block a user