diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-07 12:54:02 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-07 12:54:02 +0200 |
commit | ea48310579385c86cd6da9663e8150701707452d (patch) | |
tree | 4c4a676e9f51d65e405c7feaf06550203222ca27 | |
parent | dac4c5bb5389b123a046d0e861443e124dc0e059 (diff) | |
download | gitlab-ce-ea48310579385c86cd6da9663e8150701707452d.tar.gz |
Improve curl commend, remove blank lines
-rw-r--r-- | doc/api/ci/lint.md | 2 | ||||
-rw-r--r-- | lib/api/lint.rb | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/doc/api/ci/lint.md b/doc/api/ci/lint.md index 080bc2148f3..0c96b3ee335 100644 --- a/doc/api/ci/lint.md +++ b/doc/api/ci/lint.md @@ -13,7 +13,7 @@ POST ci/lint | `content` | string | yes | the .gitlab-ci.yaml content| ```bash -curl -H "Content-Type: application/json" --request POST https://gitlab.example.com/api/v3/ci/lint -d '{"content": "{ \"image\": \"ruby:2.1\", \"services\": [\"postgres\"], \"before_script\": [\"gem install bundler\", \"bundle install\", \"bundle exec rake db:create\"], \"variables\": {\"DB_NAME\": \"postgres\"}, \"types\": [\"test\", \"deploy\", \"notify\"], \"rspec\": { \"script\": \"rake spec\", \"tags\": [\"ruby\", \"postgres\"], \"only\": [\"branches\"]}}"}' +curl --header "Content-Type: application/json" https://gitlab.example.com/api/v3/ci/lint --data '{"content": "{ \"image\": \"ruby:2.1\", \"services\": [\"postgres\"], \"before_script\": [\"gem install bundler\", \"bundle install\", \"bundle exec rake db:create\"], \"variables\": {\"DB_NAME\": \"postgres\"}, \"types\": [\"test\", \"deploy\", \"notify\"], \"rspec\": { \"script\": \"rake spec\", \"tags\": [\"ruby\", \"postgres\"], \"only\": [\"branches\"]}}"}' ``` Be sure to copy paste the exact contents of `.gitlab-ci.yml` as YAML is very picky about indentation and spaces. diff --git a/lib/api/lint.rb b/lib/api/lint.rb index 8a7ced2d34d..ae43a4a3237 100644 --- a/lib/api/lint.rb +++ b/lib/api/lint.rb @@ -1,12 +1,10 @@ module API class Lint < Grape::API - namespace :ci do desc 'Validation of .gitlab-ci.yml content' params do requires :content, type: String, desc: 'Content of .gitlab-ci.yml' end - post '/lint' do error = Ci::GitlabCiYamlProcessor.validation_message(params[:content]) |