Intern
Mis on tööd?
sobes.tech AI
Vastus AI-lt
In the context of CI/CD, a job is a sequence of steps or tasks executed on one or multiple agents (runners) to achieve a specific goal within the pipeline. Jobs can be run in parallel or sequentially, depending on the pipeline configuration.
Examples of tasks within a job:
- Code compilation
- Running tests (unit, integration, E2E)
- Collecting artifacts (Docker images, packages)
- Deployment to an environment
Example of a job definition in GitLab CI:
# Example of a job for building an application
build_job:
stage: build # Stage of the pipeline to which the job belongs
image: docker:latest # Image used to execute the job
script: # List of commands executed in the job
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
tags: # Optional: tags that determine on which runners the job will be executed
- docker-builder