mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 12:20:33 +00:00
Switch default git plugin (#449)
* update pipeline samples * update docs * use woodpeckerci/plugin-git:latest as default * code format nit
This commit is contained in:
parent
4cc8594b63
commit
6828057f66
18 changed files with 23 additions and 22 deletions
|
@ -505,7 +505,7 @@ Woodpecker automatically configures a default clone step if not explicitly defin
|
|||
```diff
|
||||
+clone:
|
||||
+ git:
|
||||
+ image: plugins/git
|
||||
+ image: woodpeckerci/plugin-git
|
||||
|
||||
pipeline:
|
||||
build:
|
||||
|
@ -520,7 +520,7 @@ Example configuration to override depth:
|
|||
```diff
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
+ depth: 50
|
||||
```
|
||||
|
||||
|
@ -557,7 +557,7 @@ To use the ssh git url in `.gitmodules` for users cloning with ssh, and also use
|
|||
```diff
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
recursive: true
|
||||
+ submodule_override:
|
||||
+ my-module: https://github.com/octocat/my-module.git
|
||||
|
|
|
@ -106,12 +106,13 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
|
|||
}
|
||||
|
||||
// add default clone step
|
||||
if c.local == false && len(conf.Clone.Containers) == 0 && !conf.SkipClone {
|
||||
if !c.local && len(conf.Clone.Containers) == 0 && !conf.SkipClone {
|
||||
container := &yaml.Container{
|
||||
Name: "clone",
|
||||
Image: "plugins/git:latest",
|
||||
Image: "woodpeckerci/plugin-git:latest",
|
||||
Vargs: map[string]interface{}{"depth": "0"},
|
||||
}
|
||||
// TODO: migrate to woodpeckerci/plugin-git:latest (multi arch)
|
||||
switch c.metadata.Sys.Arch {
|
||||
case "linux/arm":
|
||||
container.Image = "plugins/git:linux-arm"
|
||||
|
@ -127,7 +128,7 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
|
|||
stage.Steps = append(stage.Steps, step)
|
||||
|
||||
config.Stages = append(config.Stages, stage)
|
||||
} else if c.local == false && !conf.SkipClone {
|
||||
} else if !c.local && !conf.SkipClone {
|
||||
for i, container := range conf.Clone.Containers {
|
||||
if !container.Constraints.Match(c.metadata) {
|
||||
continue
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/drone/envsubst",
|
||||
"environment": {
|
||||
"CI": "pipec",
|
||||
|
|
|
@ -4,7 +4,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:windows",
|
||||
"image": "woodpeckerci/plugin-git:windows",
|
||||
"working_dir": "c:\\gopath/src\\github.com\\drone\\envsubst",
|
||||
"environment": {
|
||||
"CI": "drone",
|
||||
|
|
|
@ -6,7 +6,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git:windows
|
||||
image: woodpeckerci/plugin-git:windows
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"steps": [
|
||||
{
|
||||
"name": "pipeline_clone",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/go-sql-driver/mysql",
|
||||
"environment": {
|
||||
"CI": "pipec",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/drone/envsubst",
|
||||
"environment": {
|
||||
"CI": "pipec",
|
||||
|
|
|
@ -4,7 +4,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/drone/envsubst",
|
||||
"environment": {
|
||||
"CI": "pipec",
|
||||
|
|
|
@ -4,7 +4,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/drone/envsubst",
|
||||
"environment": {
|
||||
"CI": "pipec",
|
||||
|
|
|
@ -4,7 +4,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/drone/envsubst",
|
||||
"environment": {
|
||||
"CI": "drone",
|
||||
|
|
|
@ -4,7 +4,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone_0",
|
||||
"alias": "git",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/go/src/github.com/drone/envsubst",
|
||||
"environment": {
|
||||
"CI": "drone",
|
||||
|
|
|
@ -4,7 +4,7 @@ workspace:
|
|||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
image: woodpeckerci/plugin-git
|
||||
depth: 50
|
||||
|
||||
pipeline:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"name": "pipeline_clone",
|
||||
"alias": "clone",
|
||||
"image": "plugins/git:latest",
|
||||
"image": "woodpeckerci/plugin-git:latest",
|
||||
"working_dir": "/pipeline/src",
|
||||
"environment": {
|
||||
"CI": "drone",
|
||||
|
|
Loading…
Reference in a new issue