Config import, addons.apt.sources, 'sourceline' key missing

Hello,

It’s not the same issue as Config import, deep_merge_append, apt packages

I’m using config import.

In my root .travis.yml file:


addons:
  apt:
    sources:
      - docker-xenial
    packages:
      - docker-ce
      - pcregrep

However it seems interpreted as

  "addons": {
    "apt": {
      "sources": [
        {
          "name": "docker-xenial"
        }
      ],
      "packages": [
        "docker-ce",
        "pcregrep"
      ]
    }
  },

It causes a warning message

'sourceline' key missing:
\{:name\=\>"docker-xenial"\}

In a different project that doesn’t use config import, it’s correctly interpreted as

  "addons": {
    "apt": {
      "sources": [
        "docker-xenial"
      ],
      "packages": [
        "docker-ce",
        "pcregrep"
      ]
    }
  },

I’ve temporarily fixed it by using

addons:
  apt:
    sources:
      - sourceline: 'deb [arch=amd64] "https://download.docker.com/linux/ubuntu" xenial stable edge'
        key_url: 'https://%{app_host}/files/gpg/docker-xenial.asc'
    packages:
      - docker-ce
      - pcregrep

It’s from https://github.com/travis-ci/apt-source-safelist/blob/master/ubuntu.json

Imprint