Pedro Flores
Developer, happy husband and now a happy father!
Terraform + AKS
Hands-On Lab
Is done via .gitlab-ci.yml file:
Example for NodeJS project:
nodejs_run:
stage: test
script:
- npm install
- npm test
This is an application that processes builds. It receives commands from GitLab CI.
It's possible to tag runners so jobs run on runners which can process them (e.g. different OS)
Used to group your jobs in stages to create multiple pipelines
Builds of next stage are run after success
By default, GitLab CI cleans build dir between builds for the sake of concurrency
But we can preserve builds between builds (Hello, npm and node_modules !)
Jobs of the same stage run in parallel
A simple Ubuntu Server VDS can play this role.
# Gitlab CI multi runner
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | bash
apt-get install -y gitlab-ci-multi-runner
echo 'run "gitlab-ci-multi-runner register"'
Run gitlab-ci-multi-runner register
and answer questions.
You can find your unique registration token under Settings ---> Runners section.
Ejemplo para nodejs:
nodejs_run:
stage: test
script:
- npm install
- npm test
Eso es todo!
Esta linea cachea todos los directorios y archivos en node_modules
cache:
untracked: true
paths:
- node_modules/
El build se ignora si en el mensaje de commit se encuentra el texto [ci skip]
Hands-On Lab
By Pedro Flores