I use Gitlab to store nearly all of my source code. One of the features that I love about Gitlab is Gitlab CI, the built-in, fully integrated CI/CD feature.
The CI/CD feature uses Docker to run your custom/arbitrary commands in. You can specify custom Docker image for Gitlab CI to use using the image: tag.
One very handy feature worth mentioning is that you specify different Docker image for each stage of the build.
For example, if your CI/CD process has three steps: build, test, deploy. You can specify different image for each stage:
- build: node:6-wheezy
- test: node:7-wheezy
- deploy: mikesir87/aws-cli
(Example above was arbitrarily written for illustration purposes only. You can pick any Docker image from either private or public registry. You can have as many steps as possible)
.gitlab-ci.yml example:
This way, you can run different sets of commands that require different sets of dependencies.
Of course, you can always build your own docker image.
Always be cautious when using community-built docker images – only use those that you TRUST.
Never miss new posts
Get the latest tech innovation news from Ryan delivered straight to your inbox!