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
|
buildkit
|
||||||
json
|
json
|
||||||
config
|
config
|
||||||
dockerfile
|
containerfile
|
||||||
og
|
og
|
||||||
gzip
|
gzip
|
||||||
toml
|
toml
|
||||||
|
26
.github/settings.yml
vendored
26
.github/settings.yml
vendored
@ -43,3 +43,29 @@ labels:
|
|||||||
- name: wontfix
|
- name: wontfix
|
||||||
color: ffffff
|
color: ffffff
|
||||||
description: This will not be worked on
|
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:
|
dryrun:
|
||||||
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.multiarch
|
containerfile: Containerfile.multiarch
|
||||||
dry_run: true
|
dry_run: true
|
||||||
platforms:
|
platforms:
|
||||||
- linux/amd64
|
- linux/amd64
|
||||||
@ -24,7 +24,7 @@ steps:
|
|||||||
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
dockerfile: Dockerfile.multiarch
|
containerfile: Containerfile.multiarch
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
platforms:
|
platforms:
|
||||||
@ -45,7 +45,7 @@ steps:
|
|||||||
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
image: quay.io/thegeeklab/drone-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
dockerfile: Dockerfile.multiarch
|
containerfile: Containerfile.multiarch
|
||||||
password:
|
password:
|
||||||
from_secret: quay_password
|
from_secret: quay_password
|
||||||
platforms:
|
platforms:
|
||||||
|
@ -100,18 +100,13 @@ steps:
|
|||||||
Build the binary with the following command:
|
Build the binary with the following command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export GOOS=linux
|
|
||||||
export GOARCH=amd64
|
|
||||||
export CGO_ENABLED=0
|
|
||||||
export GO111MODULE=on
|
|
||||||
|
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
|
|
||||||
Build the Docker image with the following command:
|
Build the Docker image with the following command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/wp-docker-buildx .
|
docker build --file docker/Containerfile.multiarch --tag thegeeklab/wp-docker-buildx .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
@ -121,8 +116,8 @@ docker run --rm \
|
|||||||
-e PLUGIN_TAG=latest \
|
-e PLUGIN_TAG=latest \
|
||||||
-e PLUGIN_REPO=octocat/hello-world \
|
-e PLUGIN_REPO=octocat/hello-world \
|
||||||
-e CI_COMMIT_SHA=00000000 \
|
-e CI_COMMIT_SHA=00000000 \
|
||||||
-v $(pwd):$(pwd) \
|
-v $(pwd):/build:z \
|
||||||
-w $(pwd) \
|
-w /build \
|
||||||
--privileged \
|
--privileged \
|
||||||
thegeeklab/wp-docker-buildx --dry-run
|
thegeeklab/wp-docker-buildx --dry-run
|
||||||
```
|
```
|
||||||
|
@ -90,9 +90,9 @@ properties:
|
|||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
- name: dockerfile
|
- name: containerfile
|
||||||
description: Set dockerfile to use for the image build.
|
description: Set the containerfile to use for the image build.
|
||||||
defaultValue: Dockerfile
|
defaultValue: Containerfile
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
@ -116,11 +116,11 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
|||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "dockerfile",
|
Name: "containerfile",
|
||||||
EnvVars: []string{"PLUGIN_DOCKERFILE"},
|
EnvVars: []string{"PLUGIN_CONTAINERFILE"},
|
||||||
Usage: "dockerfile to use for the image build",
|
Usage: "containerfile to use for the image build",
|
||||||
Value: "Dockerfile",
|
Value: "Containerfile",
|
||||||
Destination: &settings.Build.Dockerfile,
|
Destination: &settings.Build.Containerfile,
|
||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
|
@ -76,7 +76,7 @@ func commandBuild(build Build, dryrun bool) *execabs.Cmd {
|
|||||||
"buildx",
|
"buildx",
|
||||||
"build",
|
"build",
|
||||||
"--rm=true",
|
"--rm=true",
|
||||||
"-f", build.Dockerfile,
|
"-f", build.Containerfile,
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultBuildArgs := []string{
|
defaultBuildArgs := []string{
|
||||||
|
@ -50,7 +50,7 @@ type Login struct {
|
|||||||
type Build struct {
|
type Build struct {
|
||||||
Ref string // Git commit ref
|
Ref string // Git commit ref
|
||||||
Branch string // Git repository branch
|
Branch string // Git repository branch
|
||||||
Dockerfile string // Docker build Dockerfile
|
Containerfile string // Docker build Containerfile
|
||||||
Context string // Docker build context
|
Context string // Docker build context
|
||||||
TagsAuto bool // Docker build auto tag
|
TagsAuto bool // Docker build auto tag
|
||||||
TagsSuffix string // Docker build tags with suffix
|
TagsSuffix string // Docker build tags with suffix
|
||||||
|
Loading…
Reference in New Issue
Block a user