小编sai*_*enz的帖子

如何在git推送上将自定义参数传递给jenkins作业(多分支管道)?

我创建了多分支管道并使用 jenkinsfile,jenkins 为每个分支创建了一组管道。

有没有办法通过 bitbucket webhook 传递自定义作业参数并触发 jenkins 作业?

我的詹金斯文件具有自定义参数,如下例所示:

    parameters {
         string(name: "FOO", defaultValue: "bar", description: "FOO bar")
    }
Run Code Online (Sandbox Code Playgroud)

我想在代码推送事件期间使用自定义参数触发作业。

先感谢您!

干杯!

git branch jenkins jenkins-pipeline

5
推荐指数
1
解决办法
3616
查看次数

即使配置了 ssh,为什么“go get”也要使用 https?

我已经正确配置了 ssh,我可以通过 ssh 用我们的私人仓库做 git 东西。但是当我使用go getor go test(对于 go 模块)进行测试时,cli 没有使用 ssh,而是使用 https。

.gitconfig

[url "ssh://git@bitbucket.company.com:7999"]
    insteadOf = https://bitbucket.company.com/scm
Run Code Online (Sandbox Code Playgroud)

~/.ssh/config

Host bitbucket.company.com
 User git
 Port 7999
 IdentityFile ~/.ssh/id_rsa
Run Code Online (Sandbox Code Playgroud)

测试 ssh 是否有效

$ git ls-remote ssh://git@bitbucket.company.com:7999/project/repo.git
ab86e12ab20775a308b7d0b003ba562263fbfa23        HEAD
ab86e12ab20775a308b7d0b003ba562263fbfa23        refs/heads/master
ab86e12ab20775a308b7d0b003ba562263fbfa23        refs/tags/v0.0.1
Run Code Online (Sandbox Code Playgroud)

测试去得到

$ go get -v bitbucket.company.com/project/repo
go get bitbucket.company.com/project/repo: unrecognized import path "bitbucket.company.com/project/repo": https fetch: Get "https://bitbucket.company.com/project/repo?go-get=1": dial tcp 10.68.204.3:443: connectex: A connection attempt failed because the connected party did not properly respond after a …
Run Code Online (Sandbox Code Playgroud)

git ssh bitbucket go go-modules

5
推荐指数
1
解决办法
1734
查看次数

标签 统计

git ×2

bitbucket ×1

branch ×1

go ×1

go-modules ×1

jenkins ×1

jenkins-pipeline ×1

ssh ×1