Skip to content

Adds sha argument to lint

Laura Montemayor requested to merge lm-add-sha-to-ci-config-resolver into master

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

Availability and Testing

#333840 (closed)

Edited by Laura Montemayor

Merge request reports

Loading