forked from kontena/kubelet-rubber-stamp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from digitalocean/merge-in-upstream
Merge in upstream
- Loading branch information
Showing
16 changed files
with
529 additions
and
915 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 |
---|---|---|
@@ -1,36 +1,79 @@ | ||
--- | ||
kind: pipeline | ||
name: default | ||
|
||
platform: | ||
os: linux | ||
arch: amd64 | ||
|
||
workspace: | ||
base: /go | ||
path: src/github.com/kontena/kubelet-rubber-stamp | ||
base: /src | ||
path: kubelet-rubber-stamp | ||
|
||
pipeline: | ||
test: | ||
steps: | ||
- name: test | ||
image: golang:1.11 | ||
commands: | ||
- mkdir -p /go/bin | ||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
- dep ensure -v -vendor-only | ||
- go mod download | ||
- ./test.sh | ||
|
||
docker: | ||
group: image | ||
registry: quay.io | ||
- name: docker | ||
image: plugins/docker | ||
settings: | ||
registry: quay.io | ||
repo: quay.io/kontena/kubelet-rubber-stamp-amd64 | ||
dockerfile: Dockerfile | ||
auto_tag: true | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
|
||
- name: docker-arm | ||
image: plugins/docker | ||
secrets: [ docker_username, docker_password ] | ||
repo: quay.io/kontena/kubelet-rubber-stamp-amd64 | ||
dockerfile: Dockerfile | ||
auto_tag: true | ||
when: | ||
branches: ['master', 'refs/tags/*'] | ||
|
||
docker-arm: | ||
group: image | ||
registry: quay.io | ||
settings: | ||
registry: quay.io | ||
repo: quay.io/kontena/kubelet-rubber-stamp-arm64 | ||
dockerfile: Dockerfile | ||
build_args: | ||
- ARCH=arm64 | ||
auto_tag: true | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
|
||
- name: docker-hub | ||
image: plugins/docker | ||
settings: | ||
repo: kontenapharos/kubelet-rubber-stamp-amd64 | ||
dockerfile: Dockerfile | ||
auto_tag: true | ||
username: | ||
from_secret: docker_hub_username | ||
password: | ||
from_secret: docker_hub_password | ||
|
||
- name: docker-hub-arm | ||
image: plugins/docker | ||
secrets: [ docker_username, docker_password ] | ||
repo: quay.io/kontena/kubelet-rubber-stamp-arm64 | ||
dockerfile: Dockerfile | ||
build_args: | ||
- ARCH=arm64 | ||
auto_tag: true | ||
when: | ||
branches: ['master', 'refs/tags/*'] | ||
settings: | ||
repo: kontenapharos/kubelet-rubber-stamp-arm64 | ||
dockerfile: Dockerfile | ||
build_args: | ||
- ARCH=arm64 | ||
auto_tag: true | ||
username: | ||
from_secret: docker_hub_username | ||
password: | ||
from_secret: docker_hub_password | ||
|
||
- name: manifest | ||
image: plugins/manifest | ||
settings: | ||
username: | ||
from_secret: docker_hub_username | ||
password: | ||
from_secret: docker_hub_password | ||
spec: .manifest.tpl | ||
auto_tag: true |
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,18 @@ | ||
image: docker.io/kontenapharos/kubelet-rubber-stamp:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} | ||
{{#if build.tags}} | ||
tags: | ||
{{#each build.tags}} | ||
- {{this}} | ||
{{/each}} | ||
{{/if}} | ||
manifests: | ||
- | ||
image: docker.io/kontenapharos/kubelet-rubber-stamp-amd64:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} | ||
platform: | ||
architecture: amd64 | ||
os: linux | ||
- | ||
image: docker.io/kontenapharos/kubelet-rubber-stamp-arm64:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} | ||
platform: | ||
architecture: arm64 | ||
os: linux |
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
FROM golang:1.11 as builder | ||
|
||
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
WORKDIR /src | ||
|
||
WORKDIR /go/src/github.com/kontena/kubelet-rubber-stamp | ||
|
||
# Add dependency graph and vendor it in | ||
ADD Gopkg.* /go/src/github.com/kontena/kubelet-rubber-stamp/ | ||
RUN dep ensure -v -vendor-only | ||
# Add dependency and download it | ||
ADD go.mod . | ||
ADD go.sum . | ||
RUN go mod download | ||
|
||
# Add source and compile | ||
ADD . /go/src/github.com/kontena/kubelet-rubber-stamp/ | ||
ADD . /src/ | ||
|
||
ARG ARCH=amd64 | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -installsuffix cgo -o kubelet-rubber-stamp cmd/manager/main.go | ||
|
||
|
||
FROM scratch | ||
|
||
COPY --from=builder /go/src/github.com/kontena/kubelet-rubber-stamp/kubelet-rubber-stamp /kubelet-rubber-stamp | ||
COPY --from=builder /src/kubelet-rubber-stamp /kubelet-rubber-stamp | ||
|
||
ENTRYPOINT ["/kubelet-rubber-stamp", "-logtostderr"] |
Oops, something went wrong.