clean
This commit is contained in:
parent
3c29763762
commit
0d1723b95c
|
@ -7,8 +7,7 @@ when:
|
|||
|
||||
variables:
|
||||
- &golang "golang:1.21"
|
||||
- &build_plugin "woodpeckerci/plugin-docker-buildx:pull_130"
|
||||
# - &build_plugin "woodpeckerci/plugin-docker-buildx:3.0.0"
|
||||
- &build_plugin "woodpeckerci/plugin-docker-buildx:3.0.0"
|
||||
- base_settings: &base_buildx_settings
|
||||
platforms: "linux/amd64,linux/arm64"
|
||||
dockerfile: Dockerfile.multiarch
|
||||
|
@ -67,7 +66,6 @@ steps:
|
|||
|
||||
publish:
|
||||
image: *build_plugin
|
||||
pull: true
|
||||
depends_on: test
|
||||
settings:
|
||||
<<: *base_buildx_settings
|
||||
|
@ -78,11 +76,9 @@ steps:
|
|||
|
||||
publish_pr_image:
|
||||
image: *build_plugin
|
||||
pull: true
|
||||
depends_on: test
|
||||
settings:
|
||||
<<: *base_buildx_settings
|
||||
dry-run: true
|
||||
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
||||
logins: *login_setting
|
||||
when:
|
||||
|
|
|
@ -69,7 +69,6 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
|
|||
iter, _ := r.Log(&git.LogOptions{From: ref.Hash()})
|
||||
commit, _ := iter.Next()
|
||||
build.Epoch = commit.Author.When.Unix()
|
||||
// os.Setenv("SOURCE_DATE_EPOCH", strconv.FormatInt(build.Epoch, 10))
|
||||
|
||||
defaultBuildArgs := []string{
|
||||
fmt.Sprintf("DOCKER_IMAGE_CREATED=%s", time.Now().Format(time.RFC3339)),
|
||||
|
@ -105,7 +104,7 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
|
|||
args = append(args, "--target", build.Target)
|
||||
}
|
||||
if build.Output != "" && dryrun {
|
||||
args = append(args, "--output", "type=image,rewrite-timestamp=true,"+build.Output)
|
||||
args = append(args, "--output", "type=rewrite-timestamp=true,"+build.Output)
|
||||
} else if build.Output != "" && !dryrun {
|
||||
args = append(args, "--output", "type=image,push=true,rewrite-timestamp=true"+build.Output)
|
||||
} else if dryrun {
|
||||
|
|
|
@ -385,8 +385,6 @@ func (p *Plugin) Execute() error {
|
|||
cmds = append(cmds, commandBuildx())
|
||||
cmds = append(cmds, commandBuild(p.settings.Build, p.settings.Dryrun)) // docker build
|
||||
|
||||
fmt.Println(os.LookupEnv("SOURCE_DATE_EPOCH"))
|
||||
|
||||
// execute all commands in batch mode.
|
||||
for _, cmd := range cmds {
|
||||
cmd.Stdout = os.Stdout
|
||||
|
|
Loading…
Reference in a new issue