-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8662412
Showing
34 changed files
with
1,800 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
./.dapper | ||
./.cache | ||
./dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
--- | ||
kind: pipeline | ||
name: amd64 | ||
|
||
platform: | ||
os: linux | ||
arch: amd64 | ||
|
||
steps: | ||
- name: build | ||
image: rancher/dapper:v0.4.1 | ||
commands: | ||
- dapper ci | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
|
||
- name: github_binary_release | ||
image: plugins/github-release | ||
settings: | ||
api_key: | ||
from_secret: github_token | ||
prerelease: true | ||
checksum: | ||
- sha256 | ||
checksum_file: CHECKSUMsum-amd64.txt | ||
checksum_flatten: true | ||
files: | ||
- "dist/artifacts/*" | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
- name: docker-publish | ||
image: plugins/docker | ||
settings: | ||
dockerfile: package/Dockerfile | ||
password: | ||
from_secret: docker_password | ||
repo: "rancher/webhook" | ||
tag: "${DRONE_TAG}-amd64" | ||
username: | ||
from_secret: docker_username | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
volumes: | ||
- name: docker | ||
host: | ||
path: /var/run/docker.sock | ||
|
||
--- | ||
kind: pipeline | ||
name: arm64 | ||
|
||
platform: | ||
os: linux | ||
arch: arm64 | ||
|
||
steps: | ||
- name: build | ||
image: rancher/dapper:v0.4.1 | ||
commands: | ||
- dapper ci | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
|
||
- name: github_binary_release | ||
image: plugins/github-release | ||
settings: | ||
api_key: | ||
from_secret: github_token | ||
prerelease: true | ||
checksum: | ||
- sha256 | ||
checksum_file: CHECKSUMsum-arm64.txt | ||
checksum_flatten: true | ||
files: | ||
- "dist/artifacts/*" | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
- name: docker-publish | ||
image: plugins/docker | ||
settings: | ||
dockerfile: package/Dockerfile | ||
password: | ||
from_secret: docker_password | ||
repo: "rancher/webhook" | ||
tag: "${DRONE_TAG}-arm64" | ||
username: | ||
from_secret: docker_username | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
volumes: | ||
- name: docker | ||
host: | ||
path: /var/run/docker.sock | ||
|
||
--- | ||
kind: pipeline | ||
name: arm | ||
|
||
platform: | ||
os: linux | ||
arch: arm | ||
|
||
steps: | ||
- name: build | ||
image: rancher/dapper:v0.4.1 | ||
commands: | ||
- dapper ci | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
|
||
- name: github_binary_release | ||
image: plugins/github-release | ||
settings: | ||
api_key: | ||
from_secret: github_token | ||
prerelease: true | ||
checksum: | ||
- sha256 | ||
checksum_file: CHECKSUMsum-arm.txt | ||
checksum_flatten: true | ||
files: | ||
- "dist/artifacts/*" | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
- name: docker-publish | ||
image: plugins/docker | ||
settings: | ||
dockerfile: package/Dockerfile | ||
password: | ||
from_secret: docker_password | ||
repo: "rancher/webhook" | ||
tag: "${DRONE_TAG}-arm" | ||
username: | ||
from_secret: docker_username | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
volumes: | ||
- name: docker | ||
host: | ||
path: /var/run/docker.sock | ||
|
||
--- | ||
kind: pipeline | ||
name: manifest | ||
|
||
platform: | ||
os: linux | ||
arch: amd64 | ||
|
||
steps: | ||
- name: manifest | ||
image: plugins/manifest:1.0.2 | ||
settings: | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
platforms: | ||
- linux/amd64 | ||
- linux/arm64 | ||
- linux/arm | ||
target: "rancher/webhook:${DRONE_TAG}" | ||
template: "rancher/webhook:${DRONE_TAG}-ARCH" | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
depends_on: | ||
- amd64 | ||
- arm64 | ||
- arm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.dapper | ||
/.cache | ||
/bin | ||
/build | ||
/dist | ||
*.swp | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"linters": { | ||
"disable-all": true, | ||
"enable": [ | ||
"govet", | ||
"golint", | ||
"goimports", | ||
"misspell", | ||
"ineffassign", | ||
"gofmt" | ||
] | ||
}, | ||
"run": { | ||
"skip-files": [ | ||
"/zz_generated_" | ||
], | ||
"deadline": "5m" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM golang:1.14.7 | ||
|
||
ARG DAPPER_HOST_ARCH | ||
ENV ARCH $DAPPER_HOST_ARCH | ||
|
||
RUN apt update && \ | ||
apt install -y bash git gcc docker.io vim less file curl wget ca-certificates | ||
RUN if [ "${ARCH}" = "amd64" ]; then \ | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; \ | ||
fi | ||
RUN curl -sL https://get.helm.sh/helm-v3.3.0-linux-${ARCH}.tar.gz | tar xvzf - -C /usr/local/bin --strip-components=1 | ||
|
||
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS | ||
ENV DAPPER_SOURCE /go/src/github.com/rancher/webhook/ | ||
ENV DAPPER_OUTPUT ./bin ./dist | ||
ENV DAPPER_DOCKER_SOCKET true | ||
ENV DAPPER_RUN_ARGS "-v webhook-pkg:/go/pkg -v webhook-cache:/root/.cache" | ||
WORKDIR ${DAPPER_SOURCE} | ||
|
||
ENTRYPOINT ["./scripts/entry"] | ||
CMD ["ci"] |
Oops, something went wrong.