diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
commit | 84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch) | |
tree | f550fa965f507077e20dbb6d61a8269a99ef7107 /doc/ci/jobs | |
parent | 3a105e36e689f7b75482236712f1a47fd5a76814 (diff) |
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'doc/ci/jobs')
-rw-r--r-- | doc/ci/jobs/ci_job_token.md | 2 | ||||
-rw-r--r-- | doc/ci/jobs/index.md | 2 | ||||
-rw-r--r-- | doc/ci/jobs/job_artifacts.md | 14 | ||||
-rw-r--r-- | doc/ci/jobs/job_artifacts_troubleshooting.md | 23 | ||||
-rw-r--r-- | doc/ci/jobs/job_control.md | 46 |
5 files changed, 82 insertions, 5 deletions
diff --git a/doc/ci/jobs/ci_job_token.md b/doc/ci/jobs/ci_job_token.md index ba2d63c12e4..3a787189ac0 100644 --- a/doc/ci/jobs/ci_job_token.md +++ b/doc/ci/jobs/ci_job_token.md @@ -17,7 +17,7 @@ You can use a GitLab CI/CD job token to authenticate with specific API endpoints - [Container registry](../../user/packages/container_registry/build_and_push_images.md#use-gitlab-cicd) (the `$CI_REGISTRY_PASSWORD` is `$CI_JOB_TOKEN`). - [Container registry API](../../api/container_registry.md) - (scoped to the job's project, when the `ci_job_token_scope` feature flag is enabled). + (scoped to the job's project). - [Get job artifacts](../../api/job_artifacts.md#get-job-artifacts). - [Get job token's job](../../api/jobs.md#get-job-tokens-job). - [Pipeline triggers](../../api/pipeline_triggers.md), using the `token=` parameter diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md index f4836f93234..3cba8787821 100644 --- a/doc/ci/jobs/index.md +++ b/doc/ci/jobs/index.md @@ -134,7 +134,7 @@ jobs. Select to expand them. ![Grouped pipelines](img/pipeline_grouped_jobs_v14_2.png) -To create a group of jobs, in the [CI/CD pipeline configuration file](../yaml/index.md), +To create a group of jobs, in the [`.gitlab-ci.yml` file](../index.md#the-gitlab-ciyml-file), separate each job name with a number and one of the following: - A slash (`/`), for example, `slash-test 1/3`, `slash-test 2/3`, `slash-test 3/3`. diff --git a/doc/ci/jobs/job_artifacts.md b/doc/ci/jobs/job_artifacts.md index f93068faf01..34da3be9370 100644 --- a/doc/ci/jobs/job_artifacts.md +++ b/doc/ci/jobs/job_artifacts.md @@ -261,9 +261,17 @@ from: - The **Artifacts** page. On the right of the job, select **Browse** (**{folder-open}**). If [GitLab Pages](../../administration/pages/index.md) is enabled in the project, you can preview -HTML files in the artifacts directly in your browser. If the project is internal or private, you must -enable [GitLab Pages access control](../../administration/pages/index.md#access-control) to preview -HTML files. +some artifacts file extensions directly in your browser. If the project is internal or private, you must enable [GitLab Pages access control](../../administration/pages/index.md#access-control) to enable the preview. + +The following extensions are supported: + +| File extension | GitLab.com | Linux package with built-in NGINX | +|----------|---------------------|--------------| +| `.html` | **{check-circle}** Yes | **{check-circle}** Yes | +| `.json` | **{check-circle}** Yes | **{check-circle}** Yes | +| `.xml` | **{check-circle}** Yes | **{check-circle}** Yes | +| `.txt` | **{dotted-circle}** No | **{check-circle}** Yes | +| `.log` | **{dotted-circle}** No | **{check-circle}** Yes | ### From a URL diff --git a/doc/ci/jobs/job_artifacts_troubleshooting.md b/doc/ci/jobs/job_artifacts_troubleshooting.md index 0b7777d2d82..470c1bf4b55 100644 --- a/doc/ci/jobs/job_artifacts_troubleshooting.md +++ b/doc/ci/jobs/job_artifacts_troubleshooting.md @@ -155,3 +155,26 @@ To troubleshoot this error, verify that: parent-child pipeline hierarchy. - The `pipeline` and `job` combination exists and resolves to an existing pipeline. - `dependency-job` has run and finished successfully. + +## Jobs show `UnlockPipelinesInQueueWorker` after an upgrade + +Jobs might stall and show an error that states `UnlockPipelinesInQueueWorker`. + +This issue occurs after an upgrade. + +The workaround is to enable the `ci_unlock_pipelines_extra_low` feature flag. +To toggle feature flags, you must be an administrator. + +On GitLab SaaS: + +- Run the following [ChatOps](../chatops/index.md) command: + + ```ruby + /chatops run feature set ci_unlock_pipelines_extra_low true + ``` + +On GitLab self-managed: + +- [Enable the feature flag](../../administration/feature_flags.md) named `ci_unlock_pipelines_extra_low`. + +For more information see the comment in [merge request 140318](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140318#note_1718600424). diff --git a/doc/ci/jobs/job_control.md b/doc/ci/jobs/job_control.md index b432106a2d8..f7b3fed7d74 100644 --- a/doc/ci/jobs/job_control.md +++ b/doc/ci/jobs/job_control.md @@ -1218,3 +1218,49 @@ a branch that has an open merge request associated with it. To [prevent duplicate pipelines](#avoid-duplicate-pipelines), use [`workflow: rules`](../yaml/index.md#workflow) or rewrite your rules to control which pipelines can run. + +### `This GitLab CI configuration is invalid` for variable expressions + +You might receive one of several `This GitLab CI configuration is invalid` errors +when working with [CI/CD variable expressions](#cicd-variable-expressions). +These syntax errors can be caused by incorrect usage of quote characters. + +In variable expressions, strings should be quoted, while variables should not be quoted. +For example: + +```yaml +variables: + ENVIRONMENT: production + +job: + script: echo + rules: + - if: $ENVIRONMENT == "production" + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH +``` + +In this example, both `if:` clauses are valid because the `production` string is quoted, +and the CI/CD variables are unquoted. + +On the other hand, these `if:` clauses are all invalid: + +```yaml +variables: + ENVIRONMENT: production + +job: + script: echo + rules: # These rules all cause YAML syntax errors: + - if: ${ENVIRONMENT} == "production" + - if: "$ENVIRONMENT" == "production" + - if: $ENVIRONMENT == production + - if: "production" == "production" +``` + +In this example: + +- `if: ${ENVIRONMENT} == "production"` is invalid, because `${ENVIRONMENT}` is not valid + formatting for CI/CD variables in `if:`. +- `if: "$ENVIRONMENT" == "production"` is invalid, because the variable is quoted. +- `if: $ENVIRONMENT == production` is invalid, because the string is not quoted. +- `if: "production" == "production"` is invalid, because there is no CI/CD variable to compare. |