mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Merge pull request #304 from fudanchii/recursive-scp
Add -r flag to enable recursive scp
This commit is contained in:
commit
7f50da9717
2 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ func (s *SSH) Write(f *buildfile.Buildfile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if artifact {
|
if artifact {
|
||||||
scpCmd := "scp -o StrictHostKeyChecking=no -P %s ${ARTIFACT} %s"
|
scpCmd := "scp -o StrictHostKeyChecking=no -P %s -r ${ARTIFACT} %s"
|
||||||
f.WriteCmd(fmt.Sprintf(scpCmd, host[1], host[0]))
|
f.WriteCmd(fmt.Sprintf(scpCmd, host[1], host[0]))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ func TestSSHOneArtifact(t *testing.T) {
|
||||||
t.Errorf("Expect script to contains artifact")
|
t.Errorf("Expect script to contains artifact")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.Contains(bscr, "scp -o StrictHostKeyChecking=no -P 2212 ${ARTIFACT} user@test.example.com:/srv/app/location") {
|
if !strings.Contains(bscr, "scp -o StrictHostKeyChecking=no -P 2212 -r ${ARTIFACT} user@test.example.com:/srv/app/location") {
|
||||||
t.Errorf("Expect script to contains scp command, got:\n%s", bscr)
|
t.Errorf("Expect script to contains scp command, got:\n%s", bscr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue