Skip to content
Snippets Groups Projects
Commit 1e506507 authored by Tim Sharpe's avatar Tim Sharpe
Browse files

(#290) Do not manually generate YAML in .gitlab-ci.yml

Use `YAML.dump` to generate the custom job YAML rather than trying to
manually walk the hash and render it.

Given the `.sync.yml` in #290:
```
---
.gitlab-ci.yml:
  override: true
  custom:
    custom_stages:
      - 'unit'
    custom_jobs:
      testjob:
        stage: unit
        image: ruby:2.5.3
        script:
          - 'echo 1'
        artifacts:
          reports:
            junit: 'tmp/*.xml'
```

The rendered `.gitlab-ci.yml` is now:
```
---
stages:
  - unit

before_script:
  - bundle -v
  - rm Gemfile.lock || true
  - gem update --system $RUBYGEMS_VERSION
  - gem --version
  - bundle -v
  - bundle install

testjob:
  stage: unit
  image: ruby:2.5.3
  script:
  - echo 1
  artifacts:
    reports:
      junit: tmp/*.xml
```
parent 643529aa
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment