diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-02-13 19:59:57 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-02-15 14:12:35 +0300 |
commit | a084437b5c1b7226ce64e74bab1972bb1dbd49e0 (patch) | |
tree | fde3f621dd78dad5b3ac932d5bd24179b0a739f1 /doc/user | |
parent | 6038355f9e802f5078e19d31166e2c05b7b21af1 (diff) |
Rename builds to jobs in docs
[ci skip]
Diffstat (limited to 'doc/user')
22 files changed, 196 insertions, 213 deletions
diff --git a/doc/user/admin_area/settings/continuous_integration.md b/doc/user/admin_area/settings/continuous_integration.md index 34e2e557f89..b8d24cb2d3b 100644 --- a/doc/user/admin_area/settings/continuous_integration.md +++ b/doc/user/admin_area/settings/continuous_integration.md @@ -2,9 +2,9 @@ ## Maximum artifacts size -The maximum size of the [build artifacts][art-yml] can be set in the Admin area +The maximum size of the [job artifacts][art-yml] can be set in the Admin area of your GitLab instance. The value is in MB and the default is 100MB. Note that -this setting is set for each build. +this setting is set for each job. 1. Go to **Admin area > Settings** (`/admin/application_settings`). @@ -17,4 +17,4 @@ this setting is set for each build. 1. Hit **Save** for the changes to take effect. -[art-yml]: ../../../administration/build_artifacts.md +[art-yml]: ../../../administration/job_artifacts.md diff --git a/doc/user/permissions.md b/doc/user/permissions.md index e87cae092a5..b49a244160a 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -22,9 +22,9 @@ The following table depicts the various user permission levels in a project. | Create confidential issue | ✓ | ✓ | ✓ | ✓ | ✓ | | View confidential issues | (✓) [^1] | ✓ | ✓ | ✓ | ✓ | | Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ | -| See a list of builds | ✓ [^2] | ✓ | ✓ | ✓ | ✓ | -| See a build log | ✓ [^2] | ✓ | ✓ | ✓ | ✓ | -| Download and browse build artifacts | ✓ [^2] | ✓ | ✓ | ✓ | ✓ | +| See a list of jobs | ✓ [^2] | ✓ | ✓ | ✓ | ✓ | +| See a job log | ✓ [^2] | ✓ | ✓ | ✓ | ✓ | +| Download and browse job artifacts | ✓ [^2] | ✓ | ✓ | ✓ | ✓ | | View wiki pages | ✓ | ✓ | ✓ | ✓ | ✓ | | Pull project code | | ✓ | ✓ | ✓ | ✓ | | Download project | | ✓ | ✓ | ✓ | ✓ | @@ -46,7 +46,7 @@ The following table depicts the various user permission levels in a project. | Remove non-protected branches | | | ✓ | ✓ | ✓ | | Add tags | | | ✓ | ✓ | ✓ | | Write a wiki | | | ✓ | ✓ | ✓ | -| Cancel and retry builds | | | ✓ | ✓ | ✓ | +| Cancel and retry jobs | | | ✓ | ✓ | ✓ | | Create or update commit status | | | ✓ | ✓ | ✓ | | Update a container registry | | | ✓ | ✓ | ✓ | | Remove a container registry image | | | ✓ | ✓ | ✓ | @@ -60,7 +60,7 @@ The following table depicts the various user permission levels in a project. | Add deploy keys to project | | | | ✓ | ✓ | | Configure project hooks | | | | ✓ | ✓ | | Manage runners | | | | ✓ | ✓ | -| Manage build triggers | | | | ✓ | ✓ | +| Manage job triggers | | | | ✓ | ✓ | | Manage variables | | | | ✓ | ✓ | | Manage pages | | | | ✓ | ✓ | | Manage pages domains and certificates | | | | ✓ | ✓ | @@ -134,8 +134,8 @@ instance and project. In addition, all admins can use the admin interface under | Action | Guest, Reporter | Developer | Master | Admin | |---------------------------------------|-----------------|-------------|----------|--------| -| See commits and builds | ✓ | ✓ | ✓ | ✓ | -| Retry or cancel build | | ✓ | ✓ | ✓ | +| See commits and jobs | ✓ | ✓ | ✓ | ✓ | +| Retry or cancel job | | ✓ | ✓ | ✓ | | Remove project | | | ✓ | ✓ | | Create project | | | ✓ | ✓ | | Change project configuration | | | ✓ | ✓ | @@ -144,18 +144,18 @@ instance and project. In addition, all admins can use the admin interface under | See events in the system | | | | ✓ | | Admin interface | | | | ✓ | -### Builds permissions +### Jobs permissions >**Note:** -GitLab 8.12 has a completely redesigned build permissions system. +GitLab 8.12 has a completely redesigned job permissions system. Read all about the [new model and its implications][new-mod]. -This table shows granted privileges for builds triggered by specific types of +This table shows granted privileges for jobs triggered by specific types of users: | Action | Guest, Reporter | Developer | Master | Admin | |---------------------------------------------|-----------------|-------------|----------|--------| -| Run CI build | | ✓ | ✓ | ✓ | +| Run CI job | | ✓ | ✓ | ✓ | | Clone source and LFS from current project | | ✓ | ✓ | ✓ | | Clone source and LFS from public projects | | ✓ | ✓ | ✓ | | Clone source and LFS from internal projects | | ✓ [^4] | ✓ [^4] | ✓ | diff --git a/doc/user/project/builds/artifacts.md b/doc/user/project/builds/artifacts.md index 88f1863dddb..514c729b37d 100644 --- a/doc/user/project/builds/artifacts.md +++ b/doc/user/project/builds/artifacts.md @@ -1,136 +1 @@ -# Introduction to build artifacts - ->**Notes:** ->- Since GitLab 8.2 and GitLab Runner 0.7.0, build artifacts that are created by - GitLab Runner are uploaded to GitLab and are downloadable as a single archive - (`tar.gz`) using the GitLab UI. ->- Starting from GitLab 8.4 and GitLab Runner 1.0, the artifacts archive format - changed to `ZIP`, and it is now possible to browse its contents, with the added - ability of downloading the files separately. ->- The artifacts browser will be available only for new artifacts that are sent - to GitLab using GitLab Runner version 1.0 and up. It will not be possible to - browse old artifacts already uploaded to GitLab. ->- This is the user documentation. For the administration guide see - [administration/build_artifacts.md](../../../administration/build_artifacts.md). - -Artifacts is a list of files and directories which are attached to a build -after it completes successfully. This feature is enabled by default in all GitLab installations. - -## Defining artifacts in `.gitlab-ci.yml` - -A simple example of using the artifacts definition in `.gitlab-ci.yml` would be -the following: - -```yaml -pdf: - script: xelatex mycv.tex - artifacts: - paths: - - mycv.pdf -``` - -A job named `pdf` calls the `xelatex` command in order to build a pdf file from -the latex source file `mycv.tex`. We then define the `artifacts` paths which in -turn are defined with the `paths` keyword. All paths to files and directories -are relative to the repository that was cloned during the build. - -For more examples on artifacts, follow the artifacts reference in -[`.gitlab-ci.yml` documentation](../../../ci/yaml/README.md#artifacts). - -## Browsing build artifacts - -When GitLab receives an artifacts archive, an archive metadata file is also -generated. This metadata file describes all the entries that are located in the -artifacts archive itself. The metadata file is in a binary format, with -additional GZIP compression. - -GitLab does not extract the artifacts archive in order to save space, memory -and disk I/O. It instead inspects the metadata file which contains all the -relevant information. This is especially important when there is a lot of -artifacts, or an archive is a very large file. - ---- - -After a build finishes, if you visit the build's specific page, you can see -that there are two buttons. One is for downloading the artifacts archive and -the other for browsing its contents. - -![Build artifacts browser button](img/build_artifacts_browser_button.png) - ---- - -The archive browser shows the name and the actual file size of each file in the -archive. If your artifacts contained directories, then you are also able to -browse inside them. - -Below you can see how browsing looks like. In this case we have browsed inside -the archive and at this point there is one directory and one HTML file. - -![Build artifacts browser](img/build_artifacts_browser.png) - ---- - -## Downloading build artifacts - ->**Note:** -GitLab does not extract the entire artifacts archive to send just a single file -to the user. When clicking on a specific file, [GitLab Workhorse] extracts it -from the archive and the download begins. This implementation saves space, -memory and disk I/O. - -If you need to download the whole archive, there are buttons in various places -inside GitLab that make that possible. - -1. While on the pipelines page, you can see the download icon for each build's - artifacts archive in the right corner: - - ![Build artifacts in Pipelines page](img/build_artifacts_pipelines_page.png) - -1. While on the builds page, you can see the download icon for each build's - artifacts archive in the right corner: - - ![Build artifacts in Builds page](img/build_artifacts_builds_page.png) - -1. While inside a specific build, you are presented with a download button - along with the one that browses the archive: - - ![Build artifacts browser button](img/build_artifacts_browser_button.png) - -1. And finally, when browsing an archive you can see the download button at - the top right corner: - - ![Build artifacts browser](img/build_artifacts_browser.png) - -## Downloading the latest build artifacts - -It is possible to download the latest artifacts of a build via a well known URL -so you can use it for scripting purposes. - -The structure of the URL is the following: - -``` -https://example.com/<namespace>/<project>/builds/artifacts/<ref>/download?job=<job_name> -``` - -For example, to download the latest artifacts of the job named `rspec 6 20` of -the `master` branch of the `gitlab-ce` project that belongs to the `gitlab-org` -namespace, the URL would be: - -``` -https://gitlab.com/gitlab-org/gitlab-ce/builds/artifacts/master/download?job=rspec+6+20 -``` - -The latest builds are also exposed in the UI in various places. Specifically, -look for the download button in: - -- the main project's page -- the branches page -- the tags page - -If the latest build has failed to upload the artifacts, you can see that -information in the UI. - -![Latest artifacts button](img/build_latest_artifacts_browser.png) - - -[gitlab workhorse]: https://gitlab.com/gitlab-org/gitlab-workhorse "GitLab Workhorse repository" +This document was moved to [pipelines/job_artifacts](../pipelines/job_artifacts.md). diff --git a/doc/user/project/builds/img/build_artifacts_browser.png b/doc/user/project/builds/img/build_artifacts_browser.png Binary files differdeleted file mode 100644 index 686273948d6..00000000000 --- a/doc/user/project/builds/img/build_artifacts_browser.png +++ /dev/null diff --git a/doc/user/project/builds/img/build_artifacts_browser_button.png b/doc/user/project/builds/img/build_artifacts_browser_button.png Binary files differdeleted file mode 100644 index 33ef7de0415..00000000000 --- a/doc/user/project/builds/img/build_artifacts_browser_button.png +++ /dev/null diff --git a/doc/user/project/builds/img/build_artifacts_builds_page.png b/doc/user/project/builds/img/build_artifacts_builds_page.png Binary files differdeleted file mode 100644 index 8f75602d592..00000000000 --- a/doc/user/project/builds/img/build_artifacts_builds_page.png +++ /dev/null diff --git a/doc/user/project/builds/img/build_artifacts_pipelines_page.png b/doc/user/project/builds/img/build_artifacts_pipelines_page.png Binary files differdeleted file mode 100644 index 4bbd00ddaa0..00000000000 --- a/doc/user/project/builds/img/build_artifacts_pipelines_page.png +++ /dev/null diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md index 55d480bfb72..ed1e867f5fb 100644 --- a/doc/user/project/integrations/webhooks.md +++ b/doc/user/project/integrations/webhooks.md @@ -11,7 +11,7 @@ a new issue is created. You can configure webhooks to listen for specific events like pushes, issues or merge requests. GitLab will send a POST request with data to the webhook URL. -Webhooks can be used to update an external issue tracker, trigger CI builds, +Webhooks can be used to update an external issue tracker, trigger CI jobs, update a backup mirror, or even deploy to your production server. Navigate to the webhooks page by going to the **Integrations** page from your diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index a27e683143d..abd3740ef20 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -22,7 +22,7 @@ in a merged merge requests or a commit. ## Merge when pipeline succeeds When reviewing a merge request that looks ready to merge but still has one or -more CI builds running, you can set it to be merged automatically when CI +more CI jobs running, you can set it to be merged automatically when CI pipeline succeeds. This way, you don't have to wait for the pipeline to finish and remember to merge the request manually. diff --git a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md index 75ad18b28cf..c63a408505f 100644 --- a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md +++ b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md @@ -1,8 +1,8 @@ # Merge When Pipeline Succeeds When reviewing a merge request that looks ready to merge but still has one or -more CI builds running, you can set it to be merged automatically when the -builds pipeline succeeds. This way, you don't have to wait for the builds to +more CI jobs running, you can set it to be merged automatically when the +jobs pipeline succeeds. This way, you don't have to wait for the jobs to finish and remember to merge the request manually. ![Enable](img/merge_when_build_succeeds_enable.png) @@ -19,10 +19,10 @@ after all. ![Status](img/merge_when_build_succeeds_status.png) When the pipeline succeeds, the merge request will automatically be merged. -When the pipeline fails, the author gets a chance to retry any failed builds, +When the pipeline fails, the author gets a chance to retry any failed jobs, or to push new commits to fix the failure. -When the builds are retried and succeed on the second try, the merge request +When the jobs are retried and succeed on the second try, the merge request will automatically be merged after all. When the merge request is updated with new commits, the automatic merge is automatically canceled to allow the new changes to be reviewed. @@ -30,7 +30,7 @@ changes to be reviewed. ## Only allow merge requests to be merged if the pipeline succeeds > **Note:** -You need to have builds configured to enable this feature. +You need to have jobs configured to enable this feature. You can prevent merge requests from being merged if their pipeline did not succeed. @@ -41,6 +41,6 @@ hit **Save** for the changes to take effect. ![Only allow merge if pipeline succeeds settings](img/merge_when_build_succeeds_only_if_succeeds_settings.png) From now on, every time the pipeline fails you will not be able to merge the -merge request from the UI, until you make all relevant builds pass. +merge request from the UI, until you make all relevant jobs pass. ![Only allow merge if pipeline succeeds message](img/merge_when_build_succeeds_only_if_succeeds_msg.png) diff --git a/doc/user/project/new_ci_build_permissions_model.md b/doc/user/project/new_ci_build_permissions_model.md index 320faff65c5..5f631f63050 100644 --- a/doc/user/project/new_ci_build_permissions_model.md +++ b/doc/user/project/new_ci_build_permissions_model.md @@ -1,55 +1,55 @@ -# New CI build permissions model +# New CI job permissions model > Introduced in GitLab 8.12. -GitLab 8.12 has a completely redesigned [build permissions] system. You can find +GitLab 8.12 has a completely redesigned [job permissions] system. You can find all discussion and all our concerns when choosing the current approach in issue [#18994](https://gitlab.com/gitlab-org/gitlab-ce/issues/18994). --- -Builds permissions should be tightly integrated with the permissions of a user -who is triggering a build. +Jobs permissions should be tightly integrated with the permissions of a user +who is triggering a job. The reasons to do it like that are: - We already have a permissions system in place: group and project membership of users. -- We already fully know who is triggering a build (using `git push`, using the +- We already fully know who is triggering a job (using `git push`, using the web UI, executing triggers). - We already know what user is allowed to do. -- We use the user permissions for builds that are triggered by the user. +- We use the user permissions for jobs that are triggered by the user. - It opens a lot of possibilities to further enforce user permissions, like allowing only specific users to access runners or use secure variables and environments. -- It is simple and convenient that your build can access everything that you +- It is simple and convenient that your job can access everything that you as a user have access to. -- Short living unique tokens are now used, granting access for time of the build +- Short living unique tokens are now used, granting access for time of the job and maximizing security. -With the new behavior, any build that is triggered by the user, is also marked +With the new behavior, any job that is triggered by the user, is also marked with their permissions. When a user does a `git push` or changes files through the web UI, a new pipeline will be usually created. This pipeline will be marked -as created be the pusher (local push or via the UI) and any build created in this +as created be the pusher (local push or via the UI) and any job created in this pipeline will have the permissions of the pusher. This allows us to make it really easy to evaluate the access for all projects that have [Git submodules][gitsub] or are using container images that the pusher -would have access too. **The permission is granted only for time that build is -running. The access is revoked after the build is finished.** +would have access too. **The permission is granted only for time that job is +running. The access is revoked after the job is finished.** ## Types of users It is important to note that we have a few types of users: -- **Administrators**: CI builds created by Administrators will not have access +- **Administrators**: CI jobs created by Administrators will not have access to all GitLab projects, but only to projects and container images of projects that the administrator is a member of.That means that if a project is either public or internal users have access anyway, but if a project is private, the Administrator will have to be a member of it in order to have access to it - via another project's build. + via another project's job. -- **External users**: CI builds created by [external users][ext] will have +- **External users**: CI jobs created by [external users][ext] will have access only to projects to which user has at least reporter access. This rules out accessing all internal projects by default, @@ -57,46 +57,46 @@ This allows us to make the CI and permission system more trustworthy. Let's consider the following scenario: 1. You are an employee of a company. Your company has a number of internal tools - hosted in private repositories and you have multiple CI builds that make use + hosted in private repositories and you have multiple CI jobs that make use of these repositories. -2. You invite a new [external user][ext]. CI builds created by that user do not +2. You invite a new [external user][ext]. CI jobs created by that user do not have access to internal repositories, because the user also doesn't have the access from within GitLab. You as an employee have to grant explicit access for this user. This allows us to prevent from accidental data leakage. -## Build token +## Job token -A unique build token is generated for each build and it allows the user to +A unique job token is generated for each job and it allows the user to access all projects that would be normally accessible to the user creating that -build. +job. We try to make sure that this token doesn't leak by: -1. Securing all API endpoints to not expose the build token. -1. Masking the build token from build logs. -1. Allowing to use the build token **only** when build is running. +1. Securing all API endpoints to not expose the job token. +1. Masking the job token from job logs. +1. Allowing to use the job token **only** when job is running. However, this brings a question about the Runners security. To make sure that this token doesn't leak, you should also make sure that you configure your Runners in the most possible secure way, by avoiding the following: 1. Any usage of Docker's `privileged` mode is risky if the machines are re-used. -1. Using the `shell` executor since builds run on the same machine. +1. Using the `shell` executor since jobs run on the same machine. By using an insecure GitLab Runner configuration, you allow the rogue developers -to steal the tokens of other builds. +to steal the tokens of other jobs. -## Build triggers +## job triggers -[Build triggers][triggers] do not support the new permission model. -They continue to use the old authentication mechanism where the CI build +[job triggers][triggers] do not support the new permission model. +They continue to use the old authentication mechanism where the CI job can access only its own sources. We plan to remove that limitation in one of the upcoming releases. ## Before GitLab 8.12 -In versions before GitLab 8.12, all CI builds would use the CI Runner's token +In versions before GitLab 8.12, all CI jobs would use the CI Runner's token to checkout project sources. The project's Runner's token was a token that you could find under the @@ -105,7 +105,7 @@ project. It could be used for registering new specific Runners assigned to the project and to checkout project sources. It could also be used with the GitLab Container Registry for that project, -allowing pulling and pushing Docker images from within the CI build. +allowing pulling and pushing Docker images from within the CI job. --- @@ -115,7 +115,7 @@ GitLab would create a special checkout URL like: https://gitlab-ci-token:<project-runners-token>/gitlab.com/gitlab-org/gitlab-ce.git ``` -And then the users could also use it in their CI builds all Docker related +And then the users could also use it in their CI jobs all Docker related commands to interact with GitLab Container Registry. For example: ``` @@ -125,7 +125,7 @@ docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com Using single token had multiple security implications: - The token would be readable to anyone who had developer access to a project - that could run CI builds, allowing the developer to register any specific + that could run CI jobs, allowing the developer to register any specific Runner for that project. - The token would allow to access only the project's sources, forbidding from accessing any other projects. @@ -133,12 +133,12 @@ Using single token had multiple security implications: for registering specific runners and for accessing a project's container registry with read-write permissions. -All the above led to a new permission model for builds that was introduced +All the above led to a new permission model for jobs that was introduced with GitLab 8.12. -## Making use of the new CI build permissions model +## Making use of the new CI job permissions model -With the new build permissions model, there is now an easy way to access all +With the new job permissions model, there is now an easy way to access all dependent source code in a project. That way, we can: 1. Access a project's [Git submodules][gitsub] @@ -151,9 +151,9 @@ the container registry. ### Prerequisites to use the new permissions model -With the new permissions model in place, there may be times that your build will +With the new permissions model in place, there may be times that your job will fail. This is most likely because your project tries to access other project's -sources, and you don't have the appropriate permissions. In the build log look +sources, and you don't have the appropriate permissions. In the job log look for information about 403 or forbidden access messages. In short here's what you need to do should you encounter any issues. @@ -175,7 +175,7 @@ As a user: - Make sure you are a member of the group or project you're trying to have access to. As an Administrator, you can verify that by impersonating the user - and retry the failing build in order to verify that everything is correct. + and retry the failing job in order to verify that everything is correct. ### Git submodules @@ -199,9 +199,9 @@ Container Registries for private projects. to pass a personal access token instead of your password in order to login to GitLab's Container Registry. -Your builds can access all container images that you would normally have access +Your jobs can access all container images that you would normally have access to. The only implication is that you can push to the Container Registry of the -project for which the build is triggered. +project for which the job is triggered. This is how an example usage can look like: @@ -213,7 +213,7 @@ test: - docker run $CI_REGISTRY/group/other-project:latest ``` -[build permissions]: ../permissions.md#builds-permissions +[job permissions]: ../permissions.md#jobs-permissions [comment]: https://gitlab.com/gitlab-org/gitlab-ce/issues/22484#note_16648302 [ext]: ../permissions.md#external-users [gitsub]: ../../ci/git_submodules.md diff --git a/doc/user/project/pages/index.md b/doc/user/project/pages/index.md index b814e3fccb2..044c89a03c0 100644 --- a/doc/user/project/pages/index.md +++ b/doc/user/project/pages/index.md @@ -100,7 +100,7 @@ whereas a group's project under `http(s)://groupname.example.io/projectname`. The key thing about GitLab Pages is the `.gitlab-ci.yml` file, something that gives you absolute control over the build process. You can actually watch your -website being built live by following the CI build traces. +website being built live by following the CI job traces. > **Note:** > Before reading this section, make sure you familiarize yourself with GitLab CI @@ -127,7 +127,7 @@ pages: ``` When the Runner reaches to build the `pages` job, it executes whatever is -defined in the `script` parameter and if the build completes with a non-zero +defined in the `script` parameter and if the job completes with a non-zero exit status, it then uploads the `public/` directory to GitLab Pages. The `public/` directory should contain all the static content of your website. @@ -211,11 +211,11 @@ pages: # the build job must be named pages ``` Here, we used the Docker executor and in the first line we specified the base -image against which our builds will run. +image against which our jobs will run. You have to make sure that the generated static files are ultimately placed under the `public` directory, that's why in the `script` section we run the -`jekyll` command that builds the website and puts all content in the `public/` +`jekyll` command that jobs the website and puts all content in the `public/` directory. Depending on the static generator of your choice, this command will differ. Search in the documentation of the static generator you will use if there is an option to explicitly set the output directory. If there is not @@ -403,7 +403,7 @@ don't have to create and edit HTML files manually. For example, Jekyll has the ### Can I download my generated pages? -Sure. All you need to do is download the artifacts archive from the build page. +Sure. All you need to do is download the artifacts archive from the job page. ### Can I use GitLab Pages if my project is private? diff --git a/doc/user/project/pipelines/img/job_artifacts_browser.png b/doc/user/project/pipelines/img/job_artifacts_browser.png Binary files differnew file mode 100644 index 00000000000..145fe156bbb --- /dev/null +++ b/doc/user/project/pipelines/img/job_artifacts_browser.png diff --git a/doc/user/project/pipelines/img/job_artifacts_browser_button.png b/doc/user/project/pipelines/img/job_artifacts_browser_button.png Binary files differnew file mode 100644 index 00000000000..21072ce1248 --- /dev/null +++ b/doc/user/project/pipelines/img/job_artifacts_browser_button.png diff --git a/doc/user/project/pipelines/img/job_artifacts_builds_page.png b/doc/user/project/pipelines/img/job_artifacts_builds_page.png Binary files differnew file mode 100644 index 00000000000..13e039ba934 --- /dev/null +++ b/doc/user/project/pipelines/img/job_artifacts_builds_page.png diff --git a/doc/user/project/pipelines/img/job_artifacts_pipelines_page.png b/doc/user/project/pipelines/img/job_artifacts_pipelines_page.png Binary files differnew file mode 100644 index 00000000000..3ccce4f9bb4 --- /dev/null +++ b/doc/user/project/pipelines/img/job_artifacts_pipelines_page.png diff --git a/doc/user/project/builds/img/build_latest_artifacts_browser.png b/doc/user/project/pipelines/img/job_latest_artifacts_browser.png Binary files differindex c6d8856078b..c6d8856078b 100644 --- a/doc/user/project/builds/img/build_latest_artifacts_browser.png +++ b/doc/user/project/pipelines/img/job_latest_artifacts_browser.png diff --git a/doc/user/project/pipelines/img/pipelines_settings_test_coverage.png b/doc/user/project/pipelines/img/pipelines_settings_test_coverage.png Binary files differindex 2a99201e014..13ed69be810 100644 --- a/doc/user/project/pipelines/img/pipelines_settings_test_coverage.png +++ b/doc/user/project/pipelines/img/pipelines_settings_test_coverage.png diff --git a/doc/user/project/pipelines/img/pipelines_test_coverage_mr_widget.png b/doc/user/project/pipelines/img/pipelines_test_coverage_mr_widget.png Binary files differindex c166bb8bec8..fbcd612f3f2 100644 --- a/doc/user/project/pipelines/img/pipelines_test_coverage_mr_widget.png +++ b/doc/user/project/pipelines/img/pipelines_test_coverage_mr_widget.png diff --git a/doc/user/project/pipelines/job_artifacts.md b/doc/user/project/pipelines/job_artifacts.md new file mode 100644 index 00000000000..f85f4bf8e1e --- /dev/null +++ b/doc/user/project/pipelines/job_artifacts.md @@ -0,0 +1,118 @@ +# Introduction to job artifacts + +>**Notes:** +>- Since GitLab 8.2 and GitLab Runner 0.7.0, job artifacts that are created by + GitLab Runner are uploaded to GitLab and are downloadable as a single archive + (`tar.gz`) using the GitLab UI. +>- Starting with GitLab 8.4 and GitLab Runner 1.0, the artifacts archive format + changed to `ZIP`, and it is now possible to browse its contents, with the added + ability of downloading the files separately. +>- Starting with GitLab 8.17, builds are renamed to jobs. +>- The artifacts browser will be available only for new artifacts that are sent + to GitLab using GitLab Runner version 1.0 and up. It will not be possible to + browse old artifacts already uploaded to GitLab. +>- This is the user documentation. For the administration guide see + [administration/job_artifacts.md](../../../administration/job_artifacts.md). + +Artifacts is a list of files and directories which are attached to a job +after it completes successfully. This feature is enabled by default in all +GitLab installations. + +## Defining artifacts in `.gitlab-ci.yml` + +A simple example of using the artifacts definition in `.gitlab-ci.yml` would be +the following: + +```yaml +pdf: + script: xelatex mycv.tex + artifacts: + paths: + - mycv.pdf +``` + +A job named `pdf` calls the `xelatex` command in order to build a pdf file from +the latex source file `mycv.tex`. We then define the `artifacts` paths which in +turn are defined with the `paths` keyword. All paths to files and directories +are relative to the repository that was cloned during the build. + +For more examples on artifacts, follow the artifacts reference in +[`.gitlab-ci.yml` documentation](../../../ci/yaml/README.md#artifacts). + +## Browsing job artifacts + +After a job finishes, if you visit the job's specific page, you can see +that there are two buttons. One is for downloading the artifacts archive and +the other for browsing its contents. + +![Job artifacts browser button](img/job_artifacts_browser_button.png) + +--- + +The archive browser shows the name and the actual file size of each file in the +archive. If your artifacts contained directories, then you are also able to +browse inside them. + +Below you can see how browsing looks like. In this case we have browsed inside +the archive and at this point there is one directory and one HTML file. + +![Job artifacts browser](img/job_artifacts_browser.png) + +--- + +## Downloading job artifacts + +If you need to download the whole archive, there are buttons in various places +inside GitLab that make that possible. + +1. While on the pipelines page, you can see the download icon for each job's + artifacts archive in the right corner: + + ![Job artifacts in Pipelines page](img/job_artifacts_pipelines_page.png) + +1. While on the **Jobs** page, you can see the download icon for each job's + artifacts archive in the right corner: + + ![Job artifacts in Builds page](img/job_artifacts_builds_page.png) + +1. While inside a specific job, you are presented with a download button + along with the one that browses the archive: + + ![Job artifacts browser button](img/job_artifacts_browser_button.png) + +1. And finally, when browsing an archive you can see the download button at + the top right corner: + + ![Job artifacts browser](img/job_artifacts_browser.png) + +## Downloading the latest job artifacts + +It is possible to download the latest artifacts of a job via a well known URL +so you can use it for scripting purposes. + +The structure of the URL is the following: + +``` +https://example.com/<namespace>/<project>/builds/artifacts/<ref>/download?job=<job_name> +``` + +For example, to download the latest artifacts of the job named `rspec 6 20` of +the `master` branch of the `gitlab-ce` project that belongs to the `gitlab-org` +namespace, the URL would be: + +``` +https://gitlab.com/gitlab-org/gitlab-ce/builds/artifacts/master/download?job=rspec+6+20 +``` + +The latest builds are also exposed in the UI in various places. Specifically, +look for the download button in: + +- the main project's page +- the branches page +- the tags page + +If the latest job has failed to upload the artifacts, you can see that +information in the UI. + +![Latest artifacts button](img/job_latest_artifacts_browser.png) + diff --git a/doc/user/project/pipelines/settings.md b/doc/user/project/pipelines/settings.md index 6cbcf3c400f..80cdb49a1d3 100644 --- a/doc/user/project/pipelines/settings.md +++ b/doc/user/project/pipelines/settings.md @@ -35,7 +35,7 @@ if the job surpasses the threshold, it is marked as failed. ## Test coverage parsing If you use test coverage in your code, GitLab can capture its output in the -build log using a regular expression. In the pipelines settings, search for the +job log using a regular expression. In the pipelines settings, search for the "Test coverage parsing" section. ![Pipelines settings test coverage](img/pipelines_settings_test_coverage.png) @@ -44,7 +44,7 @@ Leave blank if you want to disable it or enter a ruby regular expression. You can use http://rubular.com to test your regex. If the pipeline succeeds, the coverage is shown in the merge request widget and -in the builds table. +in the jobs table. ![MR widget coverage](img/pipelines_test_coverage_mr_widget.png) @@ -62,9 +62,9 @@ pipelines** checkbox and save the changes. ## Badges -In the pipelines settings page you can find build status and test coverage +In the pipelines settings page you can find job status and test coverage badges for your project. The latest successful pipeline will be used to read -the build status and test coverage values. +the job status and test coverage values. Visit the pipelines settings page in your project to see the exact link to your badges, as well as ways to embed the badge image in your HTML or Markdown @@ -72,9 +72,9 @@ pages. ![Pipelines badges](img/pipelines_settings_badges.png) -### Build status badge +### Job status badge -Depending on the status of your build, a badge can have the following values: +Depending on the status of your job, a badge can have the following values: - running - success @@ -82,7 +82,7 @@ Depending on the status of your build, a badge can have the following values: - skipped - unknown -You can access a build status badge image using the following link: +You can access a job status badge image using the following link: ``` https://example.gitlab.com/<namespace>/<project>/badges/<branch>/build.svg @@ -91,7 +91,7 @@ https://example.gitlab.com/<namespace>/<project>/badges/<branch>/build.svg ### Test coverage report badge GitLab makes it possible to define the regular expression for [coverage report], -that each build log will be matched against. This means that each build in the +that each job log will be matched against. This means that each job in the pipeline can have the test coverage percentage value defined. The test coverage badge can be accessed using following link: diff --git a/doc/user/project/slash_commands.md b/doc/user/project/slash_commands.md index 2fddd7c6503..ad5d51d34f2 100644 --- a/doc/user/project/slash_commands.md +++ b/doc/user/project/slash_commands.md @@ -14,7 +14,7 @@ do. |:---------------------------|:-------------| | `/close` | Close the issue or merge request | | `/reopen` | Reopen the issue or merge request | -| `/merge` | Merge (when build succeeds) | +| `/merge` | Merge (when pipeline succeeds) | | `/title <New title>` | Change title | | `/assign @username` | Assign | | `/unassign` | Remove assignee | |