2021-10-03 13:07:39 +00:00
|
|
|
// Copyright 2021 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 exec
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2024-07-17 23:26:35 +00:00
|
|
|
"github.com/urfave/cli/v3"
|
2021-12-19 11:46:36 +00:00
|
|
|
|
2023-12-08 07:15:08 +00:00
|
|
|
"go.woodpecker-ci.org/woodpecker/v2/shared/constant"
|
2021-10-03 13:07:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var flags = []cli.Flag{
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.BoolFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_LOCAL"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "local",
|
2022-10-18 01:24:12 +00:00
|
|
|
Usage: "run from local directory",
|
2021-10-27 19:03:14 +00:00
|
|
|
Value: true,
|
|
|
|
},
|
2024-03-20 23:19:48 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_REPO_PATH"),
|
2024-03-20 23:19:48 +00:00
|
|
|
Name: "repo-path",
|
|
|
|
Usage: "path to local repository",
|
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.DurationFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_TIMEOUT"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "timeout",
|
2022-10-18 01:24:12 +00:00
|
|
|
Usage: "pipeline timeout",
|
2021-10-27 19:03:14 +00:00
|
|
|
Value: time.Hour,
|
|
|
|
},
|
|
|
|
&cli.StringSliceFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_VOLUMES"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "volumes",
|
2022-10-18 01:24:12 +00:00
|
|
|
Usage: "pipeline volumes",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
|
|
|
&cli.StringSliceFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_NETWORKS"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "network",
|
|
|
|
Usage: "external networks",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_PREFIX"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prefix",
|
|
|
|
Value: "woodpecker",
|
2022-02-26 02:02:42 +00:00
|
|
|
Usage: "prefix used for containers, volumes, networks, ... created by woodpecker",
|
2021-10-27 19:03:14 +00:00
|
|
|
Hidden: true,
|
|
|
|
},
|
|
|
|
&cli.StringSliceFlag{
|
2021-10-03 13:07:39 +00:00
|
|
|
Name: "privileged",
|
|
|
|
Usage: "privileged plugins",
|
2024-07-17 23:26:35 +00:00
|
|
|
Value: constant.PrivilegedPlugins,
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2022-02-26 02:02:42 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_BACKEND"),
|
2022-02-26 02:02:42 +00:00
|
|
|
Name: "backend-engine",
|
|
|
|
Usage: "backend engine to run pipelines on",
|
|
|
|
Value: "auto-detect",
|
|
|
|
},
|
2021-10-03 13:07:39 +00:00
|
|
|
|
2023-08-07 19:13:26 +00:00
|
|
|
//
|
|
|
|
// backend options for pipeline compiler
|
|
|
|
//
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_BACKEND_NO_PROXY", "NO_PROXY", "no_proxy"),
|
2023-08-07 19:13:26 +00:00
|
|
|
Usage: "if set, pass the environment variable down as \"NO_PROXY\" to steps",
|
|
|
|
Name: "backend-no-proxy",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_BACKEND_HTTP_PROXY", "HTTP_PROXY", "http_proxy"),
|
2023-08-19 14:27:21 +00:00
|
|
|
Usage: "if set, pass the environment variable down as \"HTTP_PROXY\" to steps",
|
2023-08-07 19:13:26 +00:00
|
|
|
Name: "backend-http-proxy",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("WOODPECKER_BACKEND_HTTPS_PROXY", "HTTPS_PROXY", "https_proxy"),
|
2023-08-07 19:13:26 +00:00
|
|
|
Usage: "if set, pass the environment variable down as \"HTTPS_PROXY\" to steps",
|
|
|
|
Name: "backend-https-proxy",
|
|
|
|
},
|
|
|
|
|
2021-10-03 13:07:39 +00:00
|
|
|
//
|
|
|
|
// Please note the below flags should match the flags from
|
|
|
|
// pipeline/frontend/metadata.go and should be kept synchronized.
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
// workspace default
|
|
|
|
//
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_WORKSPACE_BASE"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "workspace-base",
|
|
|
|
Value: "/woodpecker",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_WORKSPACE_PATH"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "workspace-path",
|
|
|
|
Value: "src",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
|
|
|
//
|
|
|
|
// netrc parameters
|
|
|
|
//
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_NETRC_USERNAME"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "netrc-username",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_NETRC_PASSWORD"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "netrc-password",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_NETRC_MACHINE"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "netrc-machine",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
|
|
|
//
|
|
|
|
// metadata parameters
|
|
|
|
//
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_SYSTEM_PLATFORM"),
|
2022-05-30 23:12:18 +00:00
|
|
|
Name: "system-platform",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_SYSTEM_NAME"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "system-name",
|
2022-09-27 20:19:39 +00:00
|
|
|
Value: "woodpecker",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_SYSTEM_URL"),
|
2023-11-14 16:12:12 +00:00
|
|
|
Name: "system-url",
|
2022-09-27 20:19:39 +00:00
|
|
|
Value: "https://github.com/woodpecker-ci/woodpecker",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO"),
|
2023-06-04 22:15:07 +00:00
|
|
|
Name: "repo",
|
|
|
|
Usage: "full repo name",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO_REMOTE_ID"),
|
2023-06-04 22:15:07 +00:00
|
|
|
Name: "repo-remote-id",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO_URL"),
|
2023-11-14 16:12:12 +00:00
|
|
|
Name: "repo-url",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO_CLONE_URL"),
|
2022-11-04 23:35:06 +00:00
|
|
|
Name: "repo-clone-url",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2023-08-12 15:39:13 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO_CLONE_SSH_URL"),
|
2023-08-12 15:39:13 +00:00
|
|
|
Name: "repo-clone-ssh-url",
|
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO_PRIVATE"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "repo-private",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2023-06-04 22:15:07 +00:00
|
|
|
&cli.BoolFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_REPO_TRUSTED"),
|
2023-06-04 22:15:07 +00:00
|
|
|
Name: "repo-trusted",
|
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.IntFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_NUMBER"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-number",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.IntFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_PARENT"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-parent",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2024-07-17 23:26:35 +00:00
|
|
|
&cli.IntFlag{
|
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_CREATED"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-created",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2024-07-17 23:26:35 +00:00
|
|
|
&cli.IntFlag{
|
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_STARTED"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-started",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2024-07-17 23:26:35 +00:00
|
|
|
&cli.IntFlag{
|
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_FINISHED"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-finished",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_STATUS"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-status",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_EVENT"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "pipeline-event",
|
2022-09-27 10:02:32 +00:00
|
|
|
Value: "manual",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_URL"),
|
2023-11-14 16:12:12 +00:00
|
|
|
Name: "pipeline-url",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_DEPLOY_TARGET", "CI_PIPELINE_TARGET"), // TODO: remove CI_PIPELINE_TARGET in 3.x
|
2024-07-07 11:43:07 +00:00
|
|
|
Name: "pipeline-deploy-to",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
2024-05-02 16:56:19 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PIPELINE_DEPLOY_TASK", "CI_PIPELINE_TASK"), // TODO: remove CI_PIPELINE_TASK in 3.x
|
2024-07-07 11:43:07 +00:00
|
|
|
Name: "pipeline-deploy-task",
|
2024-05-02 16:56:19 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_SHA"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-sha",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_REF"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-ref",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_REFSPEC"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-refspec",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_BRANCH"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-branch",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_MESSAGE"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-message",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_AUTHOR_NAME"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-author-name",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_AUTHOR_AVATAR"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-author-avatar",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_COMMIT_AUTHOR_EMAIL"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "commit-author-email",
|
|
|
|
},
|
|
|
|
&cli.IntFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_NUMBER"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "prev-pipeline-number",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
2024-07-17 23:26:35 +00:00
|
|
|
&cli.IntFlag{
|
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_CREATED"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "prev-pipeline-created",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
2024-07-17 23:26:35 +00:00
|
|
|
&cli.IntFlag{
|
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_STARTED"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "prev-pipeline-started",
|
2021-10-27 19:03:14 +00:00
|
|
|
},
|
2024-07-17 23:26:35 +00:00
|
|
|
&cli.IntFlag{
|
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_FINISHED"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "prev-pipeline-finished",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_STATUS"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "prev-pipeline-status",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_EVENT"),
|
2022-10-18 01:24:12 +00:00
|
|
|
Name: "prev-pipeline-event",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_PIPELINE_URL"),
|
2023-11-14 16:12:12 +00:00
|
|
|
Name: "prev-pipeline-url",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_SHA"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-sha",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_REF"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-ref",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_REFSPEC"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-refspec",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_BRANCH"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-branch",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_MESSAGE"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-message",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_AUTHOR_NAME"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-author-name",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_AUTHOR_AVATAR"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-author-avatar",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_PREV_COMMIT_AUTHOR_EMAIL"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "prev-commit-author-email",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.IntFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_WORKFLOW_NAME"),
|
2023-04-08 11:15:28 +00:00
|
|
|
Name: "workflow-name",
|
|
|
|
},
|
|
|
|
&cli.IntFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_WORKFLOW_NUMBER"),
|
2023-04-08 11:15:28 +00:00
|
|
|
Name: "workflow-number",
|
|
|
|
},
|
|
|
|
&cli.IntFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_STEP_NAME"),
|
2023-04-08 11:15:28 +00:00
|
|
|
Name: "step-name",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2021-10-27 19:03:14 +00:00
|
|
|
&cli.StringSliceFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_ENV"),
|
2021-10-27 19:03:14 +00:00
|
|
|
Name: "env",
|
2021-10-03 13:07:39 +00:00
|
|
|
},
|
2023-06-04 22:15:07 +00:00
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_FORGE_TYPE"),
|
2023-06-04 22:15:07 +00:00
|
|
|
Name: "forge-type",
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
2024-07-17 23:26:35 +00:00
|
|
|
Sources: cli.EnvVars("CI_FORGE_URL"),
|
2023-06-04 22:15:07 +00:00
|
|
|
Name: "forge-url",
|
|
|
|
},
|
2021-10-03 13:07:39 +00:00
|
|
|
}
|