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

     1  // Copyright (c) Mondoo, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  package execruntime
     5  
     6  const GITLAB = "gitlab"
     7  
     8  var gitlabEnv = &RuntimeEnv{
     9  	Id:        GITLAB,
    10  	Name:      "GitLab CI",
    11  	Namespace: "gitlab.com",
    12  	Prefix:    "GITLAB",
    13  	Identify: []Variable{
    14  		{
    15  			Name: "GITLAB_CI",
    16  			Desc: "Mark that job is executed in GitLab CI environment",
    17  		},
    18  	},
    19  	Variables: []Variable{
    20  		{
    21  			Name: "CI_PROJECT_URL",
    22  			Desc: "The HTTP(S) address to access project",
    23  		},
    24  		{
    25  			Name: "CI_PROJECT_TITLE",
    26  			Desc: "The human-readable project name as displayed in the GitLab web interface",
    27  		},
    28  		{
    29  			Name: "CI_PROJECT_ID",
    30  			Desc: "The unique id of the current project that GitLab CI uses internally",
    31  		},
    32  		{
    33  			Name: "CI_PROJECT_NAME",
    34  			Desc: "The project name that is currently being built",
    35  		},
    36  		{
    37  			Name: "CI_PROJECT_PATH",
    38  			Desc: "The project namespace with the project name included",
    39  		},
    40  		{
    41  			Name: "CI_PIPELINE_URL",
    42  			Desc: "Pipeline details URL",
    43  		},
    44  		{
    45  			Name: "CI_DEFAULT_BRANCH",
    46  			Desc: "The name of the project's default branch.",
    47  		},
    48  		{
    49  			Name: "CI_JOB_ID",
    50  			Desc: "The unique id of the current job that GitLab CI uses internally",
    51  		},
    52  		{
    53  			Name: "CI_JOB_URL",
    54  			Desc: "Job details URL",
    55  		},
    56  		{
    57  			Name: "CI_JOB_NAME",
    58  			Desc: "The name of the job as defined in .gitlab-ci.yml",
    59  		},
    60  		{
    61  			Name: "CI_JOB_STAGE",
    62  			Desc: "The name of the job's stage",
    63  		},
    64  		{
    65  			Name: "CI_COMMIT_SHA",
    66  			Desc: "The commit revision for which project is built",
    67  		},
    68  		{
    69  			Name: "CI_COMMIT_DESCRIPTION",
    70  			Desc: "The description of the commit",
    71  		},
    72  		{
    73  			Name: "CI_COMMIT_REF_NAME",
    74  			Desc: "The branch or tag name for which project is built",
    75  		},
    76  		{
    77  			Name: "CI_COMMIT_TAG",
    78  			Desc: "The commit tag name",
    79  		},
    80  		{
    81  			Name: "CI_COMMIT_BRANCH",
    82  			Desc: "The commit branch name",
    83  		},
    84  		{
    85  			Name: "CI_MERGE_REQUEST_ID",
    86  			Desc: "The ID of the merge request if it's pipelines for merge requests",
    87  		},
    88  		{
    89  			Name: "CI_MERGE_REQUEST_IID",
    90  			Desc: "The project-level IID (internal ID) of the merge request. This ID is unique for the current project.",
    91  		},
    92  		{
    93  			Name: "CI_MERGE_REQUEST_PROJECT_URL",
    94  			Desc: "The URL of the project of the merge request if it's pipelines for merge requests",
    95  		},
    96  		{
    97  			Name: "CI_MERGE_REQUEST_TITLE",
    98  			Desc: "The title of the merge request",
    99  		},
   100  		{
   101  			Name: "GITLAB_USER_NAME",
   102  			Desc: "The real name of the user who started the job",
   103  		},
   104  		{
   105  			Name: "GITLAB_USER_ID",
   106  			Desc: "The id of the user who started the job",
   107  		},
   108  		{
   109  			Name: "GITLAB_USER_EMAIL",
   110  			Desc: "The email of the user who started the job",
   111  		},
   112  	},
   113  }