mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-06-02 13:39:55 +00:00
parent
4669c1bc2a
commit
cc01c5b064
|
@ -100,7 +100,7 @@ var flags = []cli.Flag{
|
|||
EnvVars: []string{"WOODPECKER_DEFAULT_CLONE_IMAGE"},
|
||||
Name: "default-clone-image",
|
||||
Usage: "The default docker image to be used when cloning the repo",
|
||||
Value: "woodpeckerci/plugin-git:latest",
|
||||
Value: constant.DefaultCloneImage,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_DOCS"},
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
backend "github.com/woodpecker-ci/woodpecker/pipeline/backend/types"
|
||||
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||
"github.com/woodpecker-ci/woodpecker/shared/constant"
|
||||
)
|
||||
|
||||
// TODO(bradrydzewski) compiler should handle user-defined volumes from YAML
|
||||
|
@ -15,8 +16,7 @@ import (
|
|||
const (
|
||||
windowsPrefix = "windows/"
|
||||
|
||||
defaultCloneImage = "woodpeckerci/plugin-git:latest"
|
||||
defaultCloneName = "clone"
|
||||
defaultCloneName = "clone"
|
||||
|
||||
networkDriverNAT = "nat"
|
||||
networkDriverBridge = "bridge"
|
||||
|
@ -121,7 +121,7 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
|
|||
|
||||
// add default clone step
|
||||
if !c.local && len(conf.Clone.Containers) == 0 && !conf.SkipClone {
|
||||
cloneImage := defaultCloneImage
|
||||
cloneImage := constant.DefaultCloneImage
|
||||
if len(c.defaultCloneImage) > 0 {
|
||||
cloneImage = c.defaultCloneImage
|
||||
}
|
||||
|
|
19
shared/constant/constant.go
Normal file
19
shared/constant/constant.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2022 Woodpecker Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package constant
|
||||
|
||||
const (
|
||||
DefaultCloneImage = "docker.io/woodpeckerci/plugin-git:v1.6.0"
|
||||
)
|
Loading…
Reference in a new issue