Adds sha argument to lint
What does this MR do?
Adds a sha
argument to the CiConfig
resolver.
Screenshots (strongly suggested)
example query:
{
ciConfig(projectPath:"root/lost-highway", sha: "439cea8ac5a9a0bd272c8d78f092ec72fbd488ec", content: "before_script:\n - bundle install\n - bundle exec rake db:create\n\nrspec 0 1:\n stage: build\n script: 'rake spec'\n needs: []\n tags:\n - ruby\n - postgres\n only:\n - branches\n - master\n\nrspec 0 2:\n stage: build\n allow_failure: true\n script: 'rake spec'\n when: on_failure\n needs: []\n\nspinach:\n stage: build\n script: 'rake spinach'\n needs: []\n except:\n - tags\n\ndeploy_job:\n stage: deploy\n script:\n - echo 'done'\n environment:\n name: production\ndocker:\n stage: test\n script: 'curl http://dockerhub/URL'\n needs: [spinach, rspec 0 1]\n when: manual\n except:\n - branches\n\nafter_script:\n - echo 'run this after'\n") {
mergedYaml
}
}
response:
{
"data": {
"ciConfig": {
"mergedYaml": "---\nbefore_script:\n- bundle install\n- bundle exec rake db:create\nrspec 0 1:\n stage: build\n script: rake spec\n needs: []\n tags:\n - ruby\n - postgres\n only:\n - branches\n - master\nrspec 0 2:\n stage: build\n allow_failure: true\n script: rake spec\n when: on_failure\n needs: []\nspinach:\n stage: build\n script: rake spinach\n needs: []\n except:\n - tags\ndeploy_job:\n stage: deploy\n script:\n - echo 'done'\n environment:\n name: production\ndocker:\n stage: test\n script: curl http://dockerhub/URL\n needs:\n - spinach\n - rspec 0 1\n when: manual\n except:\n - branches\nafter_script:\n- echo 'run this after'\n"
}
}
}
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. - [-] I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Edited by Laura Montemayor