Release cli images (#404)

* release cli images

* update docs

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Anbraten 2021-10-04 23:47:21 +02:00 committed by GitHub
parent f98d17c3e4
commit d15c642f91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 2 deletions

View file

@ -109,6 +109,28 @@ pipeline:
branch: master
event: push
publish-cli:
group: docker
image: plugins/docker
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli
secrets: [docker_username, docker_password]
tag: [next]
when:
branch: master
event: push
publish-cli-alpine:
group: docker
image: plugins/docker
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.alpine
secrets: [ docker_username, docker_password ]
tag: [next-alpine]
when:
branch: master
event: push
release-server:
group: docker
image: plugins/docker
@ -149,6 +171,26 @@ pipeline:
when:
event: tag
release-cli:
group: docker
image: plugins/docker
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli
secrets: [docker_username, docker_password]
tag: [latest, "${DRONE_TAG}"]
when:
event: tag
release-cli-alpine:
group: docker
image: plugins/docker
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.alpine
secrets: [ docker_username, docker_password ]
tag: [latest-alpine, "${DRONE_TAG}-alpine"]
when:
event: tag
checksums:
image: golang:1.16
commands:

16
docker/Dockerfile.cli Normal file
View file

@ -0,0 +1,16 @@
# docker build --rm -f docker/Dockerfile.cli -t woodpeckerci/woodpecker-cli .
# use golang image to copy ssl certs later
FROM golang:1.16
FROM scratch
# copy certs from golang:1.16 image
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ENV GODEBUG=netdns=go
ADD dist/cli/linux_amd64/woodpecker-cli /bin/
HEALTHCHECK CMD ["/bin/woodpecker-cli", "ping"]
ENTRYPOINT ["/bin/woodpecker-cli"]

View file

@ -0,0 +1,11 @@
# docker build --rm -f docker/Dockerfile.cli.alpine -t woodpeckerci/woodpecker-cli .
FROM alpine:3.14
RUN apk add -U --no-cache ca-certificates
ENV GODEBUG=netdns=go
ADD dist/cli/linux_amd64/woodpecker-cli /bin/
HEALTHCHECK CMD ["/bin/woodpecker-cli", "ping"]
ENTRYPOINT ["/bin/woodpecker-cli"]

View file

@ -7,7 +7,7 @@
## Docker images
Image variants:
* The `next` version is based on the current master branch
* The `next` images are based on the current master branch
* The `latest` is same as next (will change after v0.15.0 release to be latest stable release)
* The `x.x.x` version images are stable releases
@ -20,7 +20,7 @@ docker pull woodpeckerci/woodpecker-server:latest-alpine
docker pull woodpeckerci/woodpecker-agent:latest
docker pull woodpeckerci/woodpecker-agent:latest-alpine
# TODO: cli
# cli
docker pull woodpeckerci/woodpecker-cli:latest
docker pull woodpeckerci/woodpecker-cli:latest-alpine
```