Skip to content
Snippets Groups Projects
Unverified Commit 273ee0e4 authored by pityonline's avatar pityonline
Browse files

Fix indentation in CI yaml

parent 434efdac
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -88,18 +88,18 @@ The example below simply moves all files from the root of the project to the
`public/` directory. The `.public` workaround is so `cp` doesn't also copy
`public/` to itself in an infinite loop:
 
```
```yaml
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
- public
only:
- master
- master
```
 
Read more on [GitLab Pages user documentation](../../user/project/pages/index.md).
Loading
Loading
@@ -131,15 +131,15 @@ if you set it per-job:
 
```yaml
before_script:
- global before script
- global before script
 
job:
before_script:
- execute this instead of global before script
- execute this instead of global before script
script:
- my command
- my command
after_script:
- execute this after my script
- execute this after my script
```
 
## `stages`
Loading
Loading
@@ -409,18 +409,18 @@ fails, it will not stop the next stage from running, since it's marked with
job1:
stage: test
script:
- execute_script_that_will_fail
- execute_script_that_will_fail
allow_failure: true
 
job2:
stage: test
script:
- execute_script_that_will_succeed
- execute_script_that_will_succeed
 
job3:
stage: deploy
script:
- deploy_to_staging
- deploy_to_staging
```
 
## `when`
Loading
Loading
@@ -442,38 +442,38 @@ For example:
 
```yaml
stages:
- build
- cleanup_build
- test
- deploy
- cleanup
- build
- cleanup_build
- test
- deploy
- cleanup
 
build_job:
stage: build
script:
- make build
- make build
 
cleanup_build_job:
stage: cleanup_build
script:
- cleanup build when failed
- cleanup build when failed
when: on_failure
 
test_job:
stage: test
script:
- make test
- make test
 
deploy_job:
stage: deploy
script:
- make deploy
- make deploy
when: manual
 
cleanup_job:
stage: cleanup
script:
- cleanup after jobs
- cleanup after jobs
when: always
```
 
Loading
Loading
@@ -734,8 +734,8 @@ rspec:
script: test
cache:
paths:
- binaries/*.apk
- .config
- binaries/*.apk
- .config
```
 
Locally defined cache overrides globally defined options. The following `rspec`
Loading
Loading
@@ -744,14 +744,14 @@ job will cache only `binaries/`:
```yaml
cache:
paths:
- my/files
- my/files
 
rspec:
script: test
cache:
key: rspec
paths:
- binaries/
- binaries/
```
 
Note that since cache is shared between jobs, if you're using different
Loading
Loading
@@ -786,7 +786,7 @@ For example, to enable per-branch caching:
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- binaries/
- binaries/
```
 
If you use **Windows Batch** to run your shell scripts you need to replace
Loading
Loading
@@ -796,7 +796,7 @@ If you use **Windows Batch** to run your shell scripts you need to replace
cache:
key: "%CI_COMMIT_REF_SLUG%"
paths:
- binaries/
- binaries/
```
 
### `cache:untracked`
Loading
Loading
@@ -819,7 +819,7 @@ rspec:
cache:
untracked: true
paths:
- binaries/
- binaries/
```
 
### `cache:policy`
Loading
Loading
@@ -897,8 +897,8 @@ Send all files in `binaries` and `.config`:
```yaml
artifacts:
paths:
- binaries/
- .config
- binaries/
- .config
```
 
To disable artifact passing, define the job with empty [dependencies](#dependencies):
Loading
Loading
@@ -927,7 +927,7 @@ release-job:
- mvn package -U
artifacts:
paths:
- target/*.war
- target/*.war
only:
- tags
```
Loading
Loading
@@ -949,7 +949,7 @@ job:
artifacts:
name: "$CI_JOB_NAME"
paths:
- binaries/
- binaries/
```
 
To create an archive with a name of the current branch or tag including only
Loading
Loading
@@ -960,7 +960,7 @@ job:
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- binaries/
- binaries/
```
 
To create an archive with a name of the current job and the current branch or
Loading
Loading
@@ -971,7 +971,7 @@ job:
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- binaries/
- binaries/
```
 
To create an archive with a name of the current [stage](#stages) and branch name:
Loading
Loading
@@ -981,7 +981,7 @@ job:
artifacts:
name: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- binaries/
- binaries/
```
 
---
Loading
Loading
@@ -994,7 +994,7 @@ job:
artifacts:
name: "%CI_JOB_STAGE%-%CI_COMMIT_REF_NAME%"
paths:
- binaries/
- binaries/
```
 
If you use **Windows PowerShell** to run your shell scripts you need to replace
Loading
Loading
@@ -1005,7 +1005,7 @@ job:
artifacts:
name: "$env:CI_JOB_STAGE-$env:CI_COMMIT_REF_NAME"
paths:
- binaries/
- binaries/
```
 
### `artifacts:untracked`
Loading
Loading
@@ -1030,7 +1030,7 @@ Send all Git untracked files and files in `binaries`:
artifacts:
untracked: true
paths:
- binaries/
- binaries/
```
 
### `artifacts:when`
Loading
Loading
@@ -1120,26 +1120,26 @@ build:osx:
script: make build:osx
artifacts:
paths:
- binaries/
- binaries/
 
build:linux:
stage: build
script: make build:linux
artifacts:
paths:
- binaries/
- binaries/
 
test:osx:
stage: test
script: make test:osx
dependencies:
- build:osx
- build:osx
 
test:linux:
stage: test
script: make test:linux
dependencies:
- build:linux
- build:linux
 
deploy:
stage: deploy
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment