changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > demo / .gitlab-ci.yml

changeset 23: dc7e11694976
child: 8eb98e4ffe05
author: ellis <ellis@rwest.io>
date: Sun, 04 Jun 2023 02:50:19 +0000
permissions: -rw-r--r--
description: Update .gitlab-ci.yml file
1 # This file is a template, and might need editing before it works on your project.
2 # To contribute improvements to CI/CD templates, please follow the Development guide at:
3 # https://docs.gitlab.com/ee/development/cicd/templates.html
4 # This specific template is located at:
5 # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
6 
7 # This is a sample GitLab CI/CD configuration file that should run without any modifications.
8 # It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
9 # it uses echo commands to simulate the pipeline execution.
10 #
11 # A pipeline is composed of independent jobs that run scripts, grouped into stages.
12 # Stages run in sequential order, but jobs within stages run in parallel.
13 #
14 # For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
15 
16 stages: # List of stages for jobs, and their order of execution
17  - build
18  - test
19  - deploy
20 
21 build-job: # This job runs in the build stage, which runs first.
22  stage: build
23  script:
24  - echo "Compiling the code..."
25  - echo "Compile complete."
26 
27 unit-test-job: # This job runs in the test stage.
28  stage: test # It only starts when the job in the build stage completes successfully.
29  script:
30  - echo "Running unit tests... This will take about 60 seconds."
31  - sleep 60
32  - echo "Code coverage is 90%"
33 
34 lint-test-job: # This job also runs in the test stage.
35  stage: test # It can run at the same time as unit-test-job (in parallel).
36  script:
37  - echo "Linting code... This will take about 10 seconds."
38  - sleep 10
39  - echo "No lint issues found."
40 
41 deploy-job: # This job runs in the deploy stage.
42  stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
43  script:
44  - echo "Deploying application..."
45  - echo "Application successfully deployed."