diff --git a/pipelines/pipelines.go b/pipelines/pipelines.go index 1abe624..25b5148 100644 --- a/pipelines/pipelines.go +++ b/pipelines/pipelines.go @@ -44,8 +44,9 @@ func Pipelines() *cli.Command { }, Flags: []cli.Flag{ &cli.StringFlag{ - Name: constant.BaseUrl, - Usage: "实例地址,例如:https://gitlab.xuxiaowei.com.cn/api/v4", + Name: constant.BaseUrl, + EnvVars: []string{"CI_API_V4_URL"}, + Usage: "实例地址,例如:https://gitlab.xuxiaowei.com.cn/api/v4", }, &cli.StringFlag{ Name: constant.Token, diff --git a/projects/projects.go b/projects/projects.go index 1c4fcb1..1ae86a2 100644 --- a/projects/projects.go +++ b/projects/projects.go @@ -43,8 +43,9 @@ func Projects() *cli.Command { }, Flags: []cli.Flag{ &cli.StringFlag{ - Name: constant.BaseUrl, - Usage: "实例地址,例如:https://gitlab.xuxiaowei.com.cn/api/v4", + Name: constant.BaseUrl, + EnvVars: []string{"CI_API_V4_URL"}, + Usage: "实例地址,例如:https://gitlab.xuxiaowei.com.cn/api/v4", }, &cli.StringFlag{ Name: constant.Token,