{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5839","repository_url":"https://api.github.com/repos/travis-ci/travis-ci","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5839/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5839/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5839/events","html_url":"https://github.com/travis-ci/travis-ci/issues/5839","id":144734412,"number":5839,"title":"Anchors in env key for .travis.yml configs display the wrong values","user":{"login":"Snaipe","id":977973,"avatar_url":"https://avatars.githubusercontent.com/u/977973?v=3","gravatar_id":"","url":"https://api.github.com/users/Snaipe","html_url":"https://github.com/Snaipe","followers_url":"https://api.github.com/users/Snaipe/followers","following_url":"https://api.github.com/users/Snaipe/following{/other_user}","gists_url":"https://api.github.com/users/Snaipe/gists{/gist_id}","starred_url":"https://api.github.com/users/Snaipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snaipe/subscriptions","organizations_url":"https://api.github.com/users/Snaipe/orgs","repos_url":"https://api.github.com/users/Snaipe/repos","events_url":"https://api.github.com/users/Snaipe/events{/privacy}","received_events_url":"https://api.github.com/users/Snaipe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-30T22:07:41Z","updated_at":"2016-04-05T04:59:02Z","closed_at":null,"body":"~~Currently, YAML anchors cannot be used for `env` lists as the final list does not get flattened.~~\r\n\r\n~~Flattening it would allow us to make configurations like [this](https://github.com/Snaipe/Mimick/blob/e03ab50f348c5df7e4d9866dd988112f0e46ee05/.travis.yml#L48), which would greatly ease the pain of maintaining complex build matrices.~~\r\n\r\nEdit: Actually, nevermind, it does -- it just displays that there are invalid secure variables.\r\n\r\nIncidentally, the configuration as it is gets accepted, but expanded values are considered to be secure variables of an invalid format (see [relevant build](https://travis-ci.org/Snaipe/Mimick/builds/119662760))."},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/205644361","html_url":"https://github.com/travis-ci/travis-ci/issues/5839#issuecomment-205644361","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5839","id":205644361,"user":{"login":"BanzaiMan","id":25666,"avatar_url":"https://avatars.githubusercontent.com/u/25666?v=3","gravatar_id":"","url":"https://api.github.com/users/BanzaiMan","html_url":"https://github.com/BanzaiMan","followers_url":"https://api.github.com/users/BanzaiMan/followers","following_url":"https://api.github.com/users/BanzaiMan/following{/other_user}","gists_url":"https://api.github.com/users/BanzaiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/BanzaiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BanzaiMan/subscriptions","organizations_url":"https://api.github.com/users/BanzaiMan/orgs","repos_url":"https://api.github.com/users/BanzaiMan/repos","events_url":"https://api.github.com/users/BanzaiMan/events{/privacy}","received_events_url":"https://api.github.com/users/BanzaiMan/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T04:59:02Z","updated_at":"2016-04-05T04:59:02Z","body":"I see that now. Thanks. The problem lies with the `.travis.yml`.\r\n\r\nIn https://github.com/Snaipe/Mimick/blob/e03ab50f348c5df7e4d9866dd988112f0e46ee05/.travis.yml#L38-L40, you see\r\n\r\n```yaml\r\n    - env: [CONFIGURATION=Debug, *i386-env]\r\n      addons: *i386-packages\r\n      compiler: gcc\r\n```\r\n\r\nThis leads to\r\n\r\n```json\r\n      {\r\n        \"addons\": {\r\n          \"apt\": {\r\n            \"packages\": [\r\n              \"qemu-user\", \r\n              \"gcc-arm-linux-gnueabihf\"\r\n            ]\r\n          }\r\n        }, \r\n        \"env\": [\r\n          \"CONFIGURATION=Debug\", \r\n          [\r\n            \"ARCH=arm\", \r\n            \"TARGET=linux-gnueabihf\", \r\n            \"TOOLCHAIN=gcc-generic\", \r\n            \"CMAKE_OPTS=-DUSE_QEMU=ON\"\r\n          ]\r\n        ], \r\n        \"compiler\": \"gcc\"\r\n      }\r\n```\r\n\r\nThe `env` is an sequence consisting of a scalar and a sequence. This is invalid, and you get what you see. I believe that you can't merge sequences in YAML, though you can merge maps (http://yaml.org/type/merge.html)."}}