I have started using Circle CI for testing and deploying projects to Rancher environments. After writing the third circle.yml file, I noticed a pattern. This is the deployment section of one of my project’s circle.yml files, with the common bits replaced by variables:
deployment: hub: branch: master commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker push $DOCKER_USER/$DOMAIN-$SITE - git clone $CONFIG_REPO_URL - wget https://github.com/rancher/rancher-compose/releases/download/$RC_VERSION/rancher-compose-linu x-amd64-$RC_VERSION.tar.gz - tar zxf rancher-compose-linux-amd64-$RC_VERSION.tar.gz - (cd $CONFIG_REPO/$DOMAIN && ../../rancher-compose-$RC_VERSION/rancher-compose up -d -u -c $SITE)
Is there an elegant way that I can somehow build a personal module with these commands so I can reference it with one word? It would be nice to not have to cut and paste this into each circle.yml file.