2019-01-01 08:23:01 +00:00
|
|
|
---
|
2019-01-26 05:10:04 +00:00
|
|
|
kind: pipeline
|
2019-02-05 04:42:35 +00:00
|
|
|
name: amd64
|
2019-01-26 05:10:04 +00:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2023-03-31 16:06:16 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- cron
|
|
|
|
|
2019-01-26 05:10:04 +00:00
|
|
|
steps:
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: build
|
2020-12-04 21:07:04 +00:00
|
|
|
image: rancher/dapper:v0.5.0
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader, unprivileged_github_token ]
|
2019-12-23 19:07:34 +00:00
|
|
|
environment:
|
2020-11-06 19:37:02 +00:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: unprivileged_github_token
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2019-02-05 04:42:35 +00:00
|
|
|
commands:
|
|
|
|
- dapper ci
|
2020-01-06 23:18:15 +00:00
|
|
|
- echo "${DRONE_TAG}-amd64" | sed -e 's/+/-/g' >.tags
|
2019-02-05 04:42:35 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2022-03-16 16:16:50 +00:00
|
|
|
- name: validate-cross-compilation
|
|
|
|
image: rancher/dapper:v0.5.0
|
|
|
|
commands:
|
|
|
|
- dapper validate-cross-compilation
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2021-09-18 01:08:11 +00:00
|
|
|
- name: fossa
|
2022-03-02 22:27:22 +00:00
|
|
|
image: rancher/drone-fossa:latest
|
2021-09-18 01:08:11 +00:00
|
|
|
failure: ignore
|
2022-03-03 20:23:04 +00:00
|
|
|
settings:
|
|
|
|
api_key:
|
2021-09-18 01:08:11 +00:00
|
|
|
from_secret: FOSSA_API_KEY
|
|
|
|
when:
|
|
|
|
instance:
|
|
|
|
- drone-publish.k3s.io
|
|
|
|
ref:
|
|
|
|
include:
|
|
|
|
- "refs/heads/master"
|
|
|
|
- "refs/heads/release-*"
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: github_binary_release
|
|
|
|
image: ibuildthecloud/github-release:v0.0.1
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
prerelease: true
|
|
|
|
checksum:
|
|
|
|
- sha256
|
|
|
|
checksum_file: CHECKSUMsum-amd64.txt
|
|
|
|
checksum_flatten: true
|
|
|
|
files:
|
|
|
|
- "dist/artifacts/*"
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-02-05 04:42:35 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: docker-publish
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dockerfile: package/Dockerfile
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2019-02-23 03:02:06 +00:00
|
|
|
repo: "rancher/k3s"
|
2019-02-05 04:42:35 +00:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-02-05 04:42:35 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
2019-01-26 05:10:04 +00:00
|
|
|
|
2019-11-01 16:48:28 +00:00
|
|
|
- name: test
|
2020-12-04 21:07:04 +00:00
|
|
|
image: rancher/dapper:v0.5.0
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2019-11-11 22:18:16 +00:00
|
|
|
environment:
|
2020-12-15 00:26:14 +00:00
|
|
|
ENABLE_REGISTRY: 'true'
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2019-05-02 20:32:42 +00:00
|
|
|
commands:
|
2022-07-08 20:01:12 +00:00
|
|
|
- docker build --target test-k3s -t k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT} -f Dockerfile.test .
|
|
|
|
- >
|
2022-11-28 17:27:43 +00:00
|
|
|
docker run -i -e REPO -e TAG -e DRONE_TAG -e DRONE_BUILD_EVENT -e IMAGE_NAME -e AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID -e SONOBUOY_VERSION -e ENABLE_REGISTRY
|
2022-07-08 20:01:12 +00:00
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock --privileged --network host -v /tmp:/tmp k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT}
|
2019-05-02 20:32:42 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2019-05-03 23:47:25 +00:00
|
|
|
- name: github_e2e_logs_release
|
|
|
|
image: ibuildthecloud/github-release:v0.0.1
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
prerelease: true
|
|
|
|
files:
|
|
|
|
- "dist/artifacts/e2e-*.log"
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-05-03 23:47:25 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
2019-01-26 05:10:04 +00:00
|
|
|
volumes:
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
2019-01-26 05:10:04 +00:00
|
|
|
|
2023-03-11 03:53:41 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: conformance
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- cron
|
|
|
|
cron:
|
|
|
|
- nightly
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: rancher/dapper:v0.5.0
|
|
|
|
commands:
|
|
|
|
- dapper ci
|
|
|
|
- echo "${DRONE_TAG}-amd64" | sed -e 's/+/-/g' >.tags
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: rancher/dapper:v0.5.0
|
|
|
|
environment:
|
|
|
|
ENABLE_REGISTRY: 'true'
|
|
|
|
commands:
|
|
|
|
- docker build --target test-k3s -t k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT} -f Dockerfile.test .
|
|
|
|
- >
|
|
|
|
docker run -i -e REPO -e TAG -e DRONE_TAG -e DRONE_BUILD_EVENT -e IMAGE_NAME -e SONOBUOY_VERSION -e ENABLE_REGISTRY
|
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock --privileged --network host -v /tmp:/tmp k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT}
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2019-01-26 05:10:04 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2019-02-05 04:42:35 +00:00
|
|
|
name: arm64
|
2019-01-26 05:10:04 +00:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
|
2023-03-31 16:06:16 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- cron
|
|
|
|
|
2019-01-26 05:10:04 +00:00
|
|
|
steps:
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: build
|
2020-12-04 21:07:04 +00:00
|
|
|
image: rancher/dapper:v0.5.0
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2019-12-23 19:07:34 +00:00
|
|
|
environment:
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2019-02-05 04:42:35 +00:00
|
|
|
commands:
|
|
|
|
- dapper ci
|
2020-01-06 23:18:15 +00:00
|
|
|
- echo "${DRONE_TAG}-arm64" | sed -e 's/+/-/g' >.tags
|
2019-02-05 04:42:35 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
- name: github_binary_release
|
|
|
|
image: ibuildthecloud/github-release:v0.0.1
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
prerelease: true
|
|
|
|
checksum:
|
|
|
|
- sha256
|
|
|
|
checksum_file: CHECKSUMsum-arm64.txt
|
|
|
|
checksum_flatten: true
|
|
|
|
files:
|
|
|
|
- "dist/artifacts/*"
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-02-05 04:42:35 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: docker-publish
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dockerfile: package/Dockerfile
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2019-02-23 03:02:06 +00:00
|
|
|
repo: "rancher/k3s"
|
2019-02-05 04:42:35 +00:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-02-05 04:42:35 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
2019-01-01 08:23:01 +00:00
|
|
|
|
2019-11-01 16:48:28 +00:00
|
|
|
- name: test
|
2020-12-04 21:07:04 +00:00
|
|
|
image: rancher/dapper:v0.5.0
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2019-11-11 22:18:16 +00:00
|
|
|
environment:
|
2020-12-15 00:26:14 +00:00
|
|
|
ENABLE_REGISTRY: 'true'
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2019-09-23 17:57:51 +00:00
|
|
|
commands:
|
2022-07-08 20:01:12 +00:00
|
|
|
- docker build --target test-k3s -t k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT} -f Dockerfile.test .
|
|
|
|
- >
|
2022-11-28 17:27:43 +00:00
|
|
|
docker run -i -e REPO -e TAG -e DRONE_TAG -e DRONE_BUILD_EVENT -e IMAGE_NAME -e AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID -e SONOBUOY_VERSION -e ENABLE_REGISTRY
|
2022-07-08 20:01:12 +00:00
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock --privileged --network host -v /tmp:/tmp k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT}
|
2019-09-23 17:57:51 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2019-01-26 05:10:04 +00:00
|
|
|
volumes:
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: arm
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm
|
|
|
|
|
2023-03-31 16:06:16 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- cron
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
steps:
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: build
|
2020-12-04 21:07:04 +00:00
|
|
|
image: rancher/dapper:v0.5.0
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2019-12-23 19:07:34 +00:00
|
|
|
environment:
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2019-02-05 04:42:35 +00:00
|
|
|
commands:
|
|
|
|
- dapper ci
|
2020-01-06 23:18:15 +00:00
|
|
|
- echo "${DRONE_TAG}-arm" | sed -e 's/+/-/g' >.tags
|
2019-02-05 04:42:35 +00:00
|
|
|
volumes:
|
2019-01-26 05:10:04 +00:00
|
|
|
- name: docker
|
2019-02-05 04:42:35 +00:00
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
- name: github_binary_release
|
|
|
|
image: ibuildthecloud/github-release:v0.0.1
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
prerelease: true
|
|
|
|
checksum:
|
|
|
|
- sha256
|
|
|
|
checksum_file: CHECKSUMsum-arm.txt
|
|
|
|
checksum_flatten: true
|
|
|
|
files:
|
|
|
|
- "dist/artifacts/*"
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-02-05 04:42:35 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
2019-01-26 05:10:04 +00:00
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: docker-publish
|
2023-01-18 20:38:51 +00:00
|
|
|
image: plugins/docker:linux-arm
|
2019-02-05 04:42:35 +00:00
|
|
|
settings:
|
|
|
|
dockerfile: package/Dockerfile
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2019-02-23 03:02:06 +00:00
|
|
|
repo: "rancher/k3s"
|
2019-02-05 04:42:35 +00:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
when:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2019-02-05 04:42:35 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
2019-11-01 16:48:28 +00:00
|
|
|
- name: test
|
2020-12-04 21:07:04 +00:00
|
|
|
image: rancher/dapper:v0.5.0
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2019-11-11 22:18:16 +00:00
|
|
|
environment:
|
2020-12-15 00:26:14 +00:00
|
|
|
ENABLE_REGISTRY: 'true'
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2019-10-25 09:29:32 +00:00
|
|
|
commands:
|
2022-07-08 20:01:12 +00:00
|
|
|
- docker build --target test-k3s -t k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT} -f Dockerfile.test .
|
|
|
|
- >
|
2022-11-28 17:27:43 +00:00
|
|
|
docker run -i -e REPO -e TAG -e DRONE_TAG -e DRONE_BUILD_EVENT -e IMAGE_NAME -e AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID -e SONOBUOY_VERSION -e ENABLE_REGISTRY
|
2022-07-08 20:01:12 +00:00
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock --privileged --network host -v /tmp:/tmp k3s:test-${DRONE_STAGE_ARCH}-${DRONE_COMMIT}
|
2019-10-25 09:29:32 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
2019-01-26 05:10:04 +00:00
|
|
|
|
2022-04-15 16:41:40 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: s390x
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
# Hack needed for s390x: https://gist.github.com/colstrom/c2f359f72658aaabb44150ac20b16d7c#gistcomment-3858388
|
|
|
|
node:
|
|
|
|
arch: s390x
|
|
|
|
|
2023-03-31 16:06:16 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- cron
|
|
|
|
|
2022-04-15 16:41:40 +00:00
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: clone
|
|
|
|
image: alpine/git:v2.30.2-s390x
|
|
|
|
commands:
|
|
|
|
- git clone $DRONE_GIT_HTTP_URL .
|
|
|
|
- git fetch origin $DRONE_COMMIT_REF
|
|
|
|
- git checkout $DRONE_COMMIT -b origin/$DRONE_TARGET_BRANCH
|
|
|
|
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: alpine/git:v2.30.2-s390x
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
2022-04-15 16:41:40 +00:00
|
|
|
- name: build
|
|
|
|
image: rancher/dapper:v0.5.8
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2022-04-15 16:41:40 +00:00
|
|
|
environment:
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2022-04-15 16:41:40 +00:00
|
|
|
commands:
|
|
|
|
- dapper ci
|
|
|
|
- echo "${DRONE_TAG}-s390x" | sed -e 's/+/-/g' >.tags
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
- name: github_binary_release
|
|
|
|
image: rancher/drone-images:github-release-s390x
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
prerelease: true
|
|
|
|
checksum:
|
|
|
|
- sha256
|
|
|
|
checksum_file: CHECKSUMsum-s390x.txt
|
|
|
|
checksum_flatten: true
|
|
|
|
files:
|
|
|
|
- "dist/artifacts/*"
|
|
|
|
when:
|
|
|
|
instance:
|
|
|
|
- drone-publish.k3s.io
|
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: docker-publish
|
|
|
|
image: rancher/drone-images:docker-s390x
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
settings:
|
|
|
|
dockerfile: package/Dockerfile
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
repo: "rancher/k3s"
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
when:
|
|
|
|
instance:
|
|
|
|
- drone-publish.k3s.io
|
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: rancher/dapper:v0.5.8
|
2022-11-28 19:13:37 +00:00
|
|
|
secrets: [ AWS_SECRET_ACCESS_KEY-k3s-ci-uploader, AWS_ACCESS_KEY_ID-k3s-ci-uploader ]
|
2022-04-15 16:41:40 +00:00
|
|
|
environment:
|
|
|
|
ENABLE_REGISTRY: 'true'
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_SECRET_ACCESS_KEY:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY-k3s-ci-uploader
|
2022-11-28 17:27:43 +00:00
|
|
|
AWS_ACCESS_KEY_ID:
|
2022-11-28 19:13:37 +00:00
|
|
|
from_secret: AWS_ACCESS_KEY_ID-k3s-ci-uploader
|
2022-04-15 16:41:40 +00:00
|
|
|
commands:
|
2022-07-08 20:01:12 +00:00
|
|
|
# we hardcode s390x as the arch because DRONE_STAGE_ARCH is set to amd64
|
|
|
|
- docker build --target test-k3s -t k3s:test-s390x-${DRONE_COMMIT} -f Dockerfile.test .
|
|
|
|
- >
|
2022-11-28 17:27:43 +00:00
|
|
|
docker run -i -e REPO -e TAG -e DRONE_TAG -e DRONE_BUILD_EVENT -e IMAGE_NAME -e AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID -e SONOBUOY_VERSION -e ENABLE_REGISTRY
|
2022-07-08 20:01:12 +00:00
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock --privileged --network host -v /tmp:/tmp k3s:test-s390x-${DRONE_COMMIT}
|
2022-04-15 16:41:40 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2019-01-26 05:10:04 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-05-04 21:20:21 +00:00
|
|
|
name: validate_go_mods
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2023-03-31 16:06:16 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- cron
|
|
|
|
|
2021-05-04 21:20:21 +00:00
|
|
|
steps:
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
- name: validate_go_mods
|
|
|
|
image: rancher/dapper:v0.5.0
|
|
|
|
commands:
|
|
|
|
- docker build --target test-mods -t k3s:mod -f Dockerfile.test .
|
|
|
|
- docker run -i k3s:mod
|
|
|
|
|
|
|
|
volumes:
|
2021-05-04 21:20:21 +00:00
|
|
|
- name: docker
|
2023-03-14 16:49:44 +00:00
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
2021-05-04 21:20:21 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
2019-02-05 04:42:35 +00:00
|
|
|
name: manifest
|
2019-01-26 05:10:04 +00:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
2019-02-05 04:42:35 +00:00
|
|
|
arch: amd64
|
2019-01-26 05:10:04 +00:00
|
|
|
|
|
|
|
steps:
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
- name: manifest
|
2020-01-20 20:29:48 +00:00
|
|
|
image: plugins/docker
|
2020-01-07 00:29:37 +00:00
|
|
|
environment:
|
2020-01-20 20:29:48 +00:00
|
|
|
DOCKER_USERNAME:
|
2019-02-05 04:42:35 +00:00
|
|
|
from_secret: docker_username
|
2020-01-20 20:29:48 +00:00
|
|
|
DOCKER_PASSWORD:
|
2019-02-05 04:42:35 +00:00
|
|
|
from_secret: docker_password
|
2020-01-20 20:29:48 +00:00
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
dockerfile: Dockerfile.manifest
|
|
|
|
repo: "rancher/k3s-manifest"
|
|
|
|
build_args_from_env:
|
|
|
|
- DOCKER_USERNAME
|
|
|
|
- DOCKER_PASSWORD
|
|
|
|
- DRONE_TAG
|
2020-03-02 17:28:26 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2020-03-02 17:28:26 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
2023-03-31 16:06:16 +00:00
|
|
|
include:
|
|
|
|
- tag
|
|
|
|
exclude:
|
|
|
|
- cron
|
2019-01-26 05:10:04 +00:00
|
|
|
|
2019-02-05 04:42:35 +00:00
|
|
|
depends_on:
|
|
|
|
- amd64
|
|
|
|
- arm64
|
2022-04-15 16:41:40 +00:00
|
|
|
- s390x
|
2019-02-05 04:42:35 +00:00
|
|
|
- arm
|
2020-02-14 22:48:28 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: dispatch
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2023-03-14 16:49:44 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
2020-03-02 17:28:26 +00:00
|
|
|
- name: dispatch
|
2020-12-16 19:29:00 +00:00
|
|
|
image: curlimages/curl:7.74.0
|
|
|
|
user: root
|
2020-03-02 17:28:26 +00:00
|
|
|
environment:
|
|
|
|
PAT_USERNAME:
|
|
|
|
from_secret: pat_username
|
|
|
|
PAT_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
commands:
|
2020-12-16 19:29:00 +00:00
|
|
|
- apk -U --no-cache add bash
|
2020-03-13 21:56:03 +00:00
|
|
|
- scripts/dispatch
|
2020-03-02 17:28:26 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
instance:
|
2020-12-04 21:07:04 +00:00
|
|
|
- drone-publish.k3s.io
|
2020-03-02 17:28:26 +00:00
|
|
|
ref:
|
|
|
|
- refs/head/master
|
|
|
|
- refs/tags/*
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
2020-02-27 00:55:32 +00:00
|
|
|
depends_on:
|
2020-10-28 18:27:08 +00:00
|
|
|
- manifest
|
2023-03-11 03:53:41 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: e2e
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2023-03-17 18:35:05 +00:00
|
|
|
- name: skipfiles
|
|
|
|
image: plugins/git
|
|
|
|
commands:
|
|
|
|
- export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || 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:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
2023-03-11 03:53:41 +00:00
|
|
|
- name: build-e2e-image
|
|
|
|
image: rancher/dapper:v0.5.0
|
|
|
|
commands:
|
|
|
|
- DOCKER_BUILDKIT=1 docker build --target test-e2e -t test-e2e -f Dockerfile.test .
|
|
|
|
- SKIP_VALIDATE=true SKIP_AIRGAP=true dapper ci
|
|
|
|
- cp dist/artifacts/* /tmp/artifacts/
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /tmp/artifacts
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
- name: test-e2e
|
|
|
|
image: test-e2e
|
|
|
|
pull: never
|
|
|
|
resources:
|
|
|
|
cpu: 6000
|
|
|
|
memory: 10Gi
|
|
|
|
environment:
|
|
|
|
E2E_REGISTRY: 'true'
|
|
|
|
commands:
|
|
|
|
- mkdir -p dist/artifacts
|
|
|
|
- cp /tmp/artifacts/* dist/artifacts/
|
|
|
|
- docker stop registry && docker rm registry
|
2023-03-22 16:32:37 +00:00
|
|
|
# Cleanup any VMs running, happens if a previous test panics
|
|
|
|
- |
|
|
|
|
VMS=$(virsh list --name | grep '_server-\|_agent-' || true)
|
|
|
|
if [ -n "$VMS" ]; then
|
|
|
|
for vm in $VMS
|
|
|
|
do
|
|
|
|
virsh destroy $vm
|
|
|
|
virsh undefine $vm --remove-all-storage
|
|
|
|
done
|
|
|
|
fi
|
2023-03-11 03:53:41 +00:00
|
|
|
- docker run -d -p 5000:5000 -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io --name registry registry:2
|
|
|
|
- cd tests/e2e/validatecluster
|
|
|
|
- vagrant destroy -f
|
2023-03-17 18:35:05 +00:00
|
|
|
- go test -v -timeout=45m ./validatecluster_test.go -ci -local
|
2023-03-11 03:53:41 +00:00
|
|
|
- cd ../secretsencryption
|
|
|
|
- vagrant destroy -f
|
|
|
|
- go test -v -timeout=30m ./secretsencryption_test.go -ci -local
|
2023-04-24 22:57:14 +00:00
|
|
|
- cd ../startup
|
|
|
|
- vagrant destroy -f
|
|
|
|
- go test -v -timeout=30m ./startup_test.go -ci -local
|
2023-04-19 04:48:36 +00:00
|
|
|
- |
|
|
|
|
if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then
|
|
|
|
cd ../upgradecluster
|
|
|
|
E2E_RELEASE_CHANNEL="latest" go test -v -timeout=45m ./upgradecluster_test.go -ci -local
|
|
|
|
fi
|
2023-03-11 03:53:41 +00:00
|
|
|
- docker stop registry && docker rm registry
|
2023-03-17 18:35:05 +00:00
|
|
|
|
2023-03-11 03:53:41 +00:00
|
|
|
volumes:
|
|
|
|
- name: libvirt
|
|
|
|
path: /var/run/libvirt/
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- name: cache
|
|
|
|
path: /tmp/artifacts
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- name: libvirt
|
|
|
|
host:
|
|
|
|
path: /var/run/libvirt/
|
|
|
|
- name: cache
|
|
|
|
temp: {}
|