Skip to content

Commit

Permalink
Clean/speed up Drone
Browse files Browse the repository at this point in the history
  • Loading branch information
superseb authored and manuelbuil committed Jan 10, 2024
1 parent bf7f30c commit 7383d9e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
35 changes: 31 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -115,7 +146,6 @@ steps:
when:
event:
- pull_request
- tag

- name: integration-flannel
pull: default
Expand All @@ -129,7 +159,6 @@ steps:
when:
event:
- pull_request
- tag

- name: integration-calico
pull: default
Expand All @@ -143,7 +172,6 @@ steps:
when:
event:
- pull_request
- tag

- name: integration-weave
pull: default
Expand All @@ -157,7 +185,6 @@ steps:
when:
event:
- pull_request
- tag

volumes:
- name: socket
Expand Down
6 changes: 6 additions & 0 deletions .droneignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
^.*\.md$
^\.droneignore$
^\.github\/.*$
^CODEOWNERS$
^LICENSE$
^docs/.*$
1 change: 0 additions & 1 deletion scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ cd $(dirname $0)
./validate
./build
./test
./integration
./package
7 changes: 7 additions & 0 deletions scripts/integration-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

cd $(dirname $0)

./build
./integration

0 comments on commit 7383d9e

Please sign in to comment.