forked from tinkerbell/tink
-
Notifications
You must be signed in to change notification settings - Fork 0
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 tinkerbell#35 from tinkerbell/update-drone-push-se…
…ttings Update push settings
- Loading branch information
Showing
5 changed files
with
104 additions
and
43 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,44 +1,107 @@ | ||
--- | ||
|
||
publish_pr_tmpl: &publish_pr_tmpl | ||
group: publish | ||
image: plugins/docker | ||
registry: quay.io | ||
tags: | ||
- ${DRONE_PULL_REQUEST} | ||
- ${DRONE_PULL_REQUEST}-${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA} | ||
when: | ||
event: pull_request | ||
secrets: | ||
- source: public_docker_password | ||
target: docker_password | ||
- source: public_docker_username | ||
target: docker_username | ||
|
||
publish_master_tmpl: &publish_master_tmpl | ||
<<: *publish_pr_tmpl | ||
tags: | ||
- latest | ||
- ${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA} | ||
when: | ||
branch: master | ||
event: push | ||
secrets: | ||
- docker_password | ||
- docker_username | ||
|
||
publish_tag_tmpl: &publish_tag_tmpl | ||
<<: *publish_master_tmpl | ||
tags: ${DRONE_TAG} | ||
when: | ||
event: tag | ||
|
||
workspace: | ||
base: /go | ||
path: src/github.com/tinkerbell/tink | ||
|
||
pipeline: | ||
test: | ||
group: ci | ||
image: golang:1.13-alpine | ||
image: golang:1.13-alpine3.11 | ||
commands: | ||
- CGO_ENABLED=0 go test -v ./... | ||
|
||
build: | ||
group: ci | ||
image: golang:1.13-alpine | ||
image: golang:1.13-alpine3.11 | ||
commands: | ||
- CGO_ENABLED=0 go build | ||
- apk add --update make | ||
- make | ||
|
||
publish_pr_tink-cli: | ||
<<: *publish_pr_tmpl | ||
context: cli/tink | ||
dockerfile: cli/tink/Dockerfile | ||
repo: quay.io/tinkerbell/tink-cli-pr | ||
|
||
publish: | ||
group: publish | ||
image: plugins/docker | ||
registry: quay.io | ||
publish_pr_tink-server: | ||
<<: *publish_pr_tmpl | ||
repo: quay.io/tinkerbell/tink-pr | ||
tags: | ||
- ${DRONE_BRANCH/\//-} | ||
- ${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA} | ||
when: | ||
event: [push] | ||
secrets: | ||
- source: public_docker_username | ||
target: docker_username | ||
- source: public_docker_password | ||
target: docker_password | ||
|
||
publish_tag: | ||
group: publish | ||
image: plugins/docker | ||
registry: quay.io | ||
context: . | ||
dockerfile: Dockerfile | ||
repo: quay.io/tinkerbell/tink-pr | ||
|
||
publish_pr_tink-worker: | ||
<<: *publish_pr_tmpl | ||
context: worker | ||
dockerfile: worker/Dockerfile | ||
repo: quay.io/tinkerbell/tink-worker-pr | ||
|
||
publish_master_tink-cli: | ||
<<: *publish_master_tmpl | ||
context: cli/tink | ||
dockerfile: cli/tink/Dockerfile | ||
repo: quay.io/tinkerbell/tink-cli | ||
|
||
publish_master_tink-server: | ||
<<: *publish_master_tmpl | ||
context: . | ||
dockerfile: Dockerfile | ||
repo: quay.io/tinkerbell/tink | ||
|
||
publish_master_tink-worker: | ||
<<: *publish_master_tmpl | ||
context: worker | ||
dockerfile: worker/Dockerfile | ||
repo: quay.io/tinkerbell/tink-worker | ||
|
||
publish_tag_tink-cli: | ||
<<: *publish_tag_tmpl | ||
context: cli/tink | ||
dockerfile: cli/tink/Dockerfile | ||
repo: quay.io/tinkerbell/tink-cli | ||
|
||
publish_tag_tink-server: | ||
<<: *publish_tag_tmpl | ||
context: . | ||
dockerfile: Dockerfile | ||
repo: quay.io/tinkerbell/tink | ||
tags: ${DRONE_TAG} | ||
when: | ||
event: [tag] | ||
secrets: [docker_username, docker_password] | ||
|
||
publish_tag_tink-worker: | ||
<<: *publish_tag_tmpl | ||
context: worker | ||
dockerfile: worker/Dockerfile | ||
repo: quay.io/tinkerbell/tink-worker |
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,18 +1,12 @@ | ||
FROM golang:1.13-alpine | ||
FROM alpine:3.11 | ||
|
||
ENTRYPOINT ["tink-server"] | ||
EXPOSE 42113 | ||
EXPOSE 42114 | ||
|
||
WORKDIR /go/src/app | ||
|
||
COPY . . | ||
|
||
RUN apk update && \ | ||
apk add ca-certificates postgresql-client && \ | ||
apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing cfssl && \ | ||
go build -o /go/bin/tink-server . | ||
RUN apk add --update ca-certificates && \ | ||
apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing cfssl | ||
|
||
COPY deploy/migrate /migrate | ||
COPY deploy/docker-entrypoint-initdb.d/tinkerbell-init.sql /init.sql | ||
|
||
ENTRYPOINT ["tink-server"] | ||
COPY tink-server /bin/ |
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,7 +1,8 @@ | ||
FROM alpine:3.7 | ||
FROM alpine:3.11 | ||
|
||
CMD sleep 60d | ||
CMD sleep infinity | ||
|
||
RUN apk add --no-cache --update --upgrade ca-certificates | ||
|
||
COPY tink-cli /bin/tink | ||
COPY sample.tmpl /tmp |
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,6 +1,7 @@ | ||
FROM alpine:3.7 | ||
FROM alpine:3.11 | ||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
COPY . . | ||
|
||
RUN apk add --no-cache --update --upgrade ca-certificates postgresql-client | ||
RUN apk add --no-cache --update --upgrade --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing cfssl | ||
|
||
COPY . . |
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,5 +1,7 @@ | ||
FROM alpine:3.10 | ||
FROM alpine:3.11 | ||
|
||
ENTRYPOINT [ "/tink-worker" ] | ||
|
||
RUN apk add --no-cache --update --upgrade ca-certificates | ||
|
||
COPY tink-worker /tink-worker | ||
ENTRYPOINT [ "/tink-worker" ] |