diff --git a/.drone.yml b/.drone.yml index edc0e204..406e1258 100644 --- a/.drone.yml +++ b/.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 diff --git a/.droneignore b/.droneignore new file mode 100644 index 00000000..5e8e806f --- /dev/null +++ b/.droneignore @@ -0,0 +1,6 @@ +^.*\.md$ +^\.droneignore$ +^\.github\/.*$ +^CODEOWNERS$ +^LICENSE$ +^docs/.*$ diff --git a/scripts/ci b/scripts/ci index 8f2fc184..b35955a7 100755 --- a/scripts/ci +++ b/scripts/ci @@ -6,5 +6,4 @@ cd $(dirname $0) ./validate ./build ./test -./integration ./package diff --git a/scripts/integration-ci b/scripts/integration-ci new file mode 100755 index 00000000..42255c2e --- /dev/null +++ b/scripts/integration-ci @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +cd $(dirname $0) + +./build +./integration