mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-10 03:30:40 +00:00
Merge pull request #218 from drone-plugins/readme-fixes
Add proper instructions to readme
This commit is contained in:
commit
5bc9ff8d9b
@ -72,6 +72,14 @@ local PipelineBuild(binary="docker", os="linux", arch="amd64") = {
|
|||||||
event: [ "tag" ],
|
event: [ "tag" ],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
if binary == "docker" then {
|
||||||
|
name: "executable",
|
||||||
|
image: "golang:1.11",
|
||||||
|
pull: "always",
|
||||||
|
commands: [
|
||||||
|
"./release/" + os + "/" + arch + "/drone-" + binary + " --help",
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "dryrun",
|
name: "dryrun",
|
||||||
image: "plugins/docker:" + os + "-" + arch,
|
image: "plugins/docker:" + os + "-" + arch,
|
||||||
|
@ -32,6 +32,12 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
- name: executable
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- ./release/windows/amd64/drone-docker --help
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
pull: always
|
pull: always
|
||||||
image: plugins/docker:windows-amd64
|
image: plugins/docker:windows-amd64
|
||||||
|
18
.drone.yml
18
.drone.yml
@ -61,6 +61,12 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
- name: executable
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- ./release/linux/amd64/drone-docker --help
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
pull: always
|
pull: always
|
||||||
image: plugins/docker:linux-amd64
|
image: plugins/docker:linux-amd64
|
||||||
@ -135,6 +141,12 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
- name: executable
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- ./release/linux/arm64/drone-docker --help
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
pull: always
|
pull: always
|
||||||
image: plugins/docker:linux-arm64
|
image: plugins/docker:linux-arm64
|
||||||
@ -209,6 +221,12 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
- name: executable
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- ./release/linux/arm/drone-docker --help
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
pull: always
|
pull: always
|
||||||
image: plugins/docker:linux-arm
|
image: plugins/docker:linux-arm
|
||||||
|
4
.github/settings.yml
vendored
4
.github/settings.yml
vendored
@ -58,7 +58,6 @@ branches:
|
|||||||
dismissal_restrictions:
|
dismissal_restrictions:
|
||||||
teams:
|
teams:
|
||||||
- Admins
|
- Admins
|
||||||
- Captain
|
|
||||||
required_status_checks:
|
required_status_checks:
|
||||||
strict: true
|
strict: true
|
||||||
contexts:
|
contexts:
|
||||||
@ -66,4 +65,5 @@ branches:
|
|||||||
enforce_admins: false
|
enforce_admins: false
|
||||||
restrictions:
|
restrictions:
|
||||||
users: []
|
users: []
|
||||||
teams: []
|
teams:
|
||||||
|
- Admins
|
||||||
|
38
README.md
38
README.md
@ -8,22 +8,50 @@
|
|||||||
[![Go Doc](https://godoc.org/github.com/drone-plugins/drone-docker?status.svg)](http://godoc.org/github.com/drone-plugins/drone-docker)
|
[![Go Doc](https://godoc.org/github.com/drone-plugins/drone-docker?status.svg)](http://godoc.org/github.com/drone-plugins/drone-docker)
|
||||||
[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-docker)](https://goreportcard.com/report/github.com/drone-plugins/drone-docker)
|
[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-docker)](https://goreportcard.com/report/github.com/drone-plugins/drone-docker)
|
||||||
|
|
||||||
Drone plugin to build and publish Docker images to a container registry.
|
Drone plugin to build and publish Docker images to a container registry. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-docker/).
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Build the binary with the following commands:
|
Build the binaries with the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
sh .drone.sh
|
export GOOS=linux
|
||||||
|
export GOARCH=amd64
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
export GO111MODULE=on
|
||||||
|
|
||||||
|
go test -cover ./...
|
||||||
|
|
||||||
|
go build -v -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker
|
||||||
|
go build -v -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr
|
||||||
|
go build -v -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr
|
||||||
|
go build -v -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
Build the Docker image with the following commands:
|
Build the Docker images with the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build --rm=true -f docker/Dockerfile -t plugins/docker .
|
docker build \
|
||||||
|
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
||||||
|
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
|
||||||
|
--file docker/docker/Dockerfile.linux.amd64 --tag plugins/docker .
|
||||||
|
|
||||||
|
docker build \
|
||||||
|
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
||||||
|
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
|
||||||
|
--file docker/gcr/Dockerfile.linux.amd64 --tag plugins/gcr .
|
||||||
|
|
||||||
|
docker build \
|
||||||
|
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
||||||
|
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
|
||||||
|
--file docker/ecr/Dockerfile.linux.amd64 --tag plugins/ecr .
|
||||||
|
|
||||||
|
docker build \
|
||||||
|
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
||||||
|
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
|
||||||
|
--file docker/heroku/Dockerfile.linux.amd64 --tag plugins/heroku .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
Loading…
Reference in New Issue
Block a user