mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-24 12:50:41 +00:00
refactor: rename parameter dockerfile to containerfile
This commit is contained in:
parent
829d5cc6e9
commit
fdf9b22e08
@ -6,7 +6,7 @@ ipv6
|
||||
buildkit
|
||||
json
|
||||
config
|
||||
dockerfile
|
||||
containerfile
|
||||
og
|
||||
gzip
|
||||
toml
|
||||
|
26
.github/settings.yml
vendored
26
.github/settings.yml
vendored
@ -43,3 +43,29 @@ labels:
|
||||
- name: wontfix
|
||||
color: ffffff
|
||||
description: This will not be worked on
|
||||
|
||||
branches:
|
||||
- name: main
|
||||
protection:
|
||||
required_pull_request_reviews: null
|
||||
required_status_checks:
|
||||
strict: false
|
||||
contexts:
|
||||
- ci/woodpecker/pr/test
|
||||
- ci/woodpecker/pr/build-binary
|
||||
- ci/woodpecker/pr/build-container
|
||||
- ci/woodpecker/pr/docs
|
||||
enforce_admins: false
|
||||
required_linear_history: true
|
||||
restrictions: null
|
||||
- name: docs
|
||||
protection:
|
||||
required_pull_request_reviews: null
|
||||
required_status_checks: null
|
||||
enforce_admins: true
|
||||
required_linear_history: true
|
||||
restrictions:
|
||||
apps: []
|
||||
users: []
|
||||
teams:
|
||||
- bot
|
||||
|
@ -9,7 +9,7 @@ steps:
|
||||
dryrun:
|
||||
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
||||
settings:
|
||||
dockerfile: Dockerfile.multiarch
|
||||
containerfile: Containerfile.multiarch
|
||||
dry_run: true
|
||||
platforms:
|
||||
- linux/amd64
|
||||
@ -24,7 +24,7 @@ steps:
|
||||
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
||||
settings:
|
||||
auto_tag: true
|
||||
dockerfile: Dockerfile.multiarch
|
||||
containerfile: Containerfile.multiarch
|
||||
password:
|
||||
from_secret: docker_password
|
||||
platforms:
|
||||
@ -45,7 +45,7 @@ steps:
|
||||
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
||||
settings:
|
||||
auto_tag: true
|
||||
dockerfile: Dockerfile.multiarch
|
||||
containerfile: Containerfile.multiarch
|
||||
password:
|
||||
from_secret: quay_password
|
||||
platforms:
|
||||
|
@ -100,18 +100,13 @@ steps:
|
||||
Build the binary with the following command:
|
||||
|
||||
```shell
|
||||
export GOOS=linux
|
||||
export GOARCH=amd64
|
||||
export CGO_ENABLED=0
|
||||
export GO111MODULE=on
|
||||
|
||||
make build
|
||||
```
|
||||
|
||||
Build the Docker image with the following command:
|
||||
|
||||
```shell
|
||||
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/wp-docker-buildx .
|
||||
docker build --file docker/Containerfile.multiarch --tag thegeeklab/wp-docker-buildx .
|
||||
```
|
||||
|
||||
## Test
|
||||
@ -121,8 +116,8 @@ docker run --rm \
|
||||
-e PLUGIN_TAG=latest \
|
||||
-e PLUGIN_REPO=octocat/hello-world \
|
||||
-e CI_COMMIT_SHA=00000000 \
|
||||
-v $(pwd):$(pwd) \
|
||||
-w $(pwd) \
|
||||
-v $(pwd):/build:z \
|
||||
-w /build \
|
||||
--privileged \
|
||||
thegeeklab/wp-docker-buildx --dry-run
|
||||
```
|
||||
|
@ -90,9 +90,9 @@ properties:
|
||||
defaultValue: false
|
||||
required: false
|
||||
|
||||
- name: dockerfile
|
||||
description: Set dockerfile to use for the image build.
|
||||
defaultValue: Dockerfile
|
||||
- name: containerfile
|
||||
description: Set the containerfile to use for the image build.
|
||||
defaultValue: Containerfile
|
||||
type: string
|
||||
required: false
|
||||
|
||||
|
@ -116,11 +116,11 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "dockerfile",
|
||||
EnvVars: []string{"PLUGIN_DOCKERFILE"},
|
||||
Usage: "dockerfile to use for the image build",
|
||||
Value: "Dockerfile",
|
||||
Destination: &settings.Build.Dockerfile,
|
||||
Name: "containerfile",
|
||||
EnvVars: []string{"PLUGIN_CONTAINERFILE"},
|
||||
Usage: "containerfile to use for the image build",
|
||||
Value: "Containerfile",
|
||||
Destination: &settings.Build.Containerfile,
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
|
@ -76,7 +76,7 @@ func commandBuild(build Build, dryrun bool) *execabs.Cmd {
|
||||
"buildx",
|
||||
"build",
|
||||
"--rm=true",
|
||||
"-f", build.Dockerfile,
|
||||
"-f", build.Containerfile,
|
||||
}
|
||||
|
||||
defaultBuildArgs := []string{
|
||||
|
@ -50,7 +50,7 @@ type Login struct {
|
||||
type Build struct {
|
||||
Ref string // Git commit ref
|
||||
Branch string // Git repository branch
|
||||
Dockerfile string // Docker build Dockerfile
|
||||
Containerfile string // Docker build Containerfile
|
||||
Context string // Docker build context
|
||||
TagsAuto bool // Docker build auto tag
|
||||
TagsSuffix string // Docker build tags with suffix
|
||||
|
Loading…
Reference in New Issue
Block a user