go.mondoo.com/cnquery@v0.0.0-20231005093811-59568235f6ea/cli/execruntime/env_jenkins.go (about)

     1  // Copyright (c) Mondoo, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  package execruntime
     5  
     6  const JENKINS = "jenkins"
     7  
     8  var jenkinsEnv = &RuntimeEnv{
     9  	Id:        JENKINS,
    10  	Name:      "Jenkins CI",
    11  	Namespace: "jenkins.io",
    12  	Identify: []Variable{
    13  		{
    14  			Name: "JENKINS_URL",
    15  		},
    16  	},
    17  	Variables: []Variable{
    18  		{
    19  			Name: "GIT_COMMIT",
    20  			Desc: "Git hash of the commit checked out for the build",
    21  		},
    22  		{
    23  			Name: "JENKINS_URL",
    24  			Desc: "Set to the URL of the Jenkins master that's running the build.",
    25  		},
    26  		{
    27  			Name: "JOB_NAME",
    28  			Desc: "Name of the project of this build.",
    29  		},
    30  		{
    31  			Name: "BUILD_URL",
    32  			Desc: "The URL where the results of this build can be found (e.g. http://buildserver/jenkins/job/MyJobName/666/)",
    33  		},
    34  		{
    35  			Name: "BUILD_NUMBER",
    36  			Desc: "The current build number, such as '153'",
    37  		},
    38  		{
    39  			Name: "BUILD_ID",
    40  			Desc: "The current build id, such as '2005-08-22_23-59-59' (YYYY-MM-DD_hh-mm-ss)",
    41  		},
    42  		{
    43  			Name: "CHANGE_AUTHOR",
    44  			Desc: "For a multibranch project corresponding to some kind of change request, this will be set to the username of the author of the proposed change.",
    45  		},
    46  		{
    47  			Name: "CHANGE_AUTHOR_DISPLAY_NAME",
    48  			Desc: "For a multibranch project corresponding to some kind of change request, this will be set to the human name of the author.",
    49  		},
    50  		{
    51  			Name: "CHANGE_AUTHOR_EMAIL",
    52  			Desc: "For a multibranch project corresponding to some kind of change request, this will be set to the email address of the author.",
    53  		},
    54  		{
    55  			Name: "GIT_URL",
    56  			Desc: "The remote URL. If there are multiple, will be GIT_URL_1, GIT_URL_2, etc.",
    57  		},
    58  		{
    59  			Name: "GIT_BRANCH",
    60  			Desc: "For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to production from master but not from feature branches; if corresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).",
    61  		},
    62  		{
    63  			Name: "BRANCH_NAME",
    64  			Desc: "For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to production from master but not from feature branches; if corresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).",
    65  		},
    66  		{
    67  			Name: "CHANGE_BRANCH",
    68  			Desc: "For a multibranch project corresponding to some kind of change request, this will be set to the name of the actual head on the source control system which may or may not be different from BRANCH_NAME. For example in GitHub or Bitbucket this would have the name of the origin branch whereas BRANCH_NAME would be something like PR-24.",
    69  		},
    70  		{
    71  			Name: "CHANGE_TARGET",
    72  			Desc: "For a multibranch project corresponding to some kind of change request, this will be set to the target or base branch to which the change could be merged, if supported; else unset.",
    73  		},
    74  		{
    75  			Name: "BRANCH_IS_PRIMARY",
    76  			Desc: "For a multibranch project, if the SCM source reports that the branch being built is a primary branch, this will be set to true; else unset. Some SCM sources may report more than one branch as a primary branch while others may not supply this information.",
    77  		},
    78  		{
    79  			Name: "CHANGE_TITLE",
    80  			Desc: "For a multibranch project corresponding to some kind of change request, this will be set to the change, if supported; else unset.",
    81  		},
    82  		{
    83  			Name: "TAG_NAME",
    84  			Desc: "For a multibranch project corresponding to some kind of tag, this will be set to the name of the tag being built, if supported; else unset.",
    85  		},
    86  	},
    87  }