Created
November 30, 2015 16:34
-
-
Save scari/d8ee241dda331664555b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Excerpts from https://enterprise.travis-ci.com/install/worker | |
# | |
populate_images() { | |
DOCKER_CMD="docker -H tcp://0.0.0.0:2375" | |
# pick the languages you are interested in | |
langs='android erlang go haskell jvm node-js perl php python ruby' | |
declare -a lang_mappings=('clojure:jvm' 'scala:jvm' 'groovy:jvm' 'java:jvm' 'elixir:erlang' 'node_js:node-js') | |
tag=latest | |
for lang in $langs; do | |
$DOCKER_CMD pull quay.io/travisci/travis-$lang:$tag | |
$DOCKER_CMD tag -f quay.io/travisci/travis-$lang:$tag travis:$lang | |
done | |
# tag travis:ruby as travis:default | |
$DOCKER_CMD tag -f travis:ruby travis:default | |
for lang_map in "${lang_mappings[@]}"; do | |
map=$(echo $lang_map|cut -d':' -f 1) | |
lang=$(echo $lang_map|cut -d':' -f 2) | |
$DOCKER_CMD tag -f quay.io/travisci/travis-$lang:$tag travis:$map | |
done | |
} | |
populate_images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment