Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/templates/gitlab_ci_ymls.md')
-rw-r--r--doc/api/templates/gitlab_ci_ymls.md30
1 files changed, 17 insertions, 13 deletions
diff --git a/doc/api/templates/gitlab_ci_ymls.md b/doc/api/templates/gitlab_ci_ymls.md
index 80f94b953e3..b8fdb9e233c 100644
--- a/doc/api/templates/gitlab_ci_ymls.md
+++ b/doc/api/templates/gitlab_ci_ymls.md
@@ -12,10 +12,12 @@ information on CI/CD pipeline configuration in GitLab, see the
Get all GitLab CI YML templates.
-```
+```plaintext
GET /templates/gitlab_ci_ymls
```
+Example request:
+
```bash
curl https://gitlab.example.com/api/v4/templates/gitlab_ci_ymls
```
@@ -29,6 +31,10 @@ Example response:
"name": "Android"
},
{
+ "key": "Android-Fastlane",
+ "name": "Android-Fastlane"
+ },
+ {
"key": "Auto-DevOps",
"name": "Auto-DevOps"
},
@@ -49,6 +55,10 @@ Example response:
"name": "Clojure"
},
{
+ "key": "Code-Quality",
+ "name": "Code-Quality"
+ },
+ {
"key": "Crystal",
"name": "Crystal"
},
@@ -95,14 +105,6 @@ Example response:
{
"key": "Mono",
"name": "Mono"
- },
- {
- "key": "Nodejs",
- "name": "Nodejs"
- },
- {
- "key": "OpenShift",
- "name": "OpenShift"
}
]
```
@@ -111,14 +113,16 @@ Example response:
Get a single GitLab CI YML template.
-```
+```plaintext
GET /templates/gitlab_ci_ymls/:key
```
-| Attribute | Type | Required | Description |
-| ---------- | ------ | -------- | ----------- |
+| Attribute | Type | Required | Description |
+| ---------- | ------ | -------- | ------------------------------------- |
| `key` | string | yes | The key of the GitLab CI YML template |
+Example request:
+
```bash
curl https://gitlab.example.com/api/v4/templates/gitlab_ci_ymls/Ruby
```
@@ -128,7 +132,7 @@ Example response:
```json
{
"name": "Ruby",
- "content": "# This file is a template, and might need editing before it works on your project.\n# Official language image. Look for the different tagged releases at:\n# https://hub.docker.com/r/library/ruby/tags/\nimage: \"ruby:2.5\"\n\n# Pick zero or more services to be used on all builds.\n# Only needed when using a docker container to run your tests in.\n# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service\nservices:\n - mysql:latest\n - redis:latest\n - postgres:latest\n\nvariables:\n POSTGRES_DB: database_name\n\n# Cache gems in between builds\ncache:\n paths:\n - vendor/ruby\n\n# This is a basic example for a gem or script which doesn't use\n# services such as redis or postgres\nbefore_script:\n - ruby -v # Print out ruby version for debugging\n # Uncomment next line if your rails app needs a JS runtime:\n # - apt-get update -q && apt-get install nodejs -yqq\n - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby\n\n# Optional - Delete if not using `rubocop`\nrubocop:\n script:\n - rubocop\n\nrspec:\n script:\n - rspec spec\n\nrails:\n variables:\n DATABASE_URL: \"postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB\"\n script:\n - rails db:migrate\n - rails db:seed\n - rails test\n\n# This deploy job uses a simple deploy flow to Heroku, other providers, e.g. AWS Elastic Beanstalk\n# are supported too: https://github.com/travis-ci/dpl\ndeploy:\n type: deploy\n environment: production\n script:\n - gem install dpl\n - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_KEY\n"
+ "content": "# This file is a template, and might need editing before it works on your project.\n# Official language image. Look for the different tagged releases at:\n# https://hub.docker.com/r/library/ruby/tags/\nimage: \"ruby:2.5\"\n\n# Pick zero or more services to be used on all builds.\n# Only needed when using a docker container to run your tests in.\n# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service\nservices:\n - mysql:latest\n - redis:latest\n - postgres:latest\n\nvariables:\n POSTGRES_DB: database_name\n\n# Cache gems in between builds\ncache:\n paths:\n - vendor/ruby\n\n# This is a basic example for a gem or script which doesn't use\n# services such as redis or postgres\nbefore_script:\n - ruby -v # Print out ruby version for debugging\n # Uncomment next line if your rails app needs a JS runtime:\n # - apt-get update -q && apt-get install nodejs -yqq\n - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby\n\n# Optional - Delete if not using `rubocop`\nrubocop:\n script:\n - rubocop\n\nrspec:\n script:\n - rspec spec\n\nrails:\n variables:\n DATABASE_URL: \"postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB\"\n script:\n - rails db:migrate\n - rails db:seed\n - rails test\n\n# This deploy job uses a simple deploy flow to Heroku, other providers, e.g. AWS Elastic Beanstalk\n# are supported too: https://github.com/travis-ci/dpl\ndeploy:\n type: deploy\n environment: production\n script:\n - gem install dpl\n - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_KEY\n"
}
```