ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
23.04k stars 5.7k forks source link

circleci: Use pipeline parameters to reference docker image tags #7736

Closed bshastry closed 4 years ago

bshastry commented 4 years ago

Currently, we reference docker images via their full name. Example

https://github.com/ethereum/solidity/blob/cf13339ad892f875db004577bae60115ef6e391d/.circleci/config.yml#L109

This makes it somewhat annoying when docker images are updated, and new tags need to be referenced. One must replace each and every reference manually, a practice that is prone to error.

This issue tracks support for the use of pipeline parameters in the circleci config file. One proposal would be to define such parameters for all the tags we use--- ubuntu1904-<rev>, ubuntu1804-<rev> and ubuntu1904-clang-<rev> where rev is another parameter that equals the currently used revision tag. This way, the only change required post a docker image update is to update the rev pipeline parameter. This is less prone to error and significantly reduces changes in the config file.

Note that the use of pipeline parameters requires us to update circle ci configuration version from 2 (current value) to 2.1 (see https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md#pipeline-parameters)

chriseth commented 4 years ago

Is it not possible to use a yaml feature for that?

bshastry commented 4 years ago

It should be possible to use yaml aliases as well as we already do. I'll open a PR for this shortly