changelog shortlog graph tags branches files raw help

Mercurial > demo / changeset: Update .gitlab-ci.yml file

changeset 23: dc7e11694976
parent 22: ba323d8c0f93
child 24: 8eb98e4ffe05
author: ellis <ellis@rwest.io>
date: Sun, 04 Jun 2023 02:50:19 +0000
files: .gitlab-ci.yml
description: Update .gitlab-ci.yml file
     1.1--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2+++ b/.gitlab-ci.yml	Sun Jun 04 02:50:19 2023 +0000
     1.3@@ -0,0 +1,45 @@
     1.4+# This file is a template, and might need editing before it works on your project.
     1.5+# To contribute improvements to CI/CD templates, please follow the Development guide at:
     1.6+# https://docs.gitlab.com/ee/development/cicd/templates.html
     1.7+# This specific template is located at:
     1.8+# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
     1.9+
    1.10+# This is a sample GitLab CI/CD configuration file that should run without any modifications.
    1.11+# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
    1.12+# it uses echo commands to simulate the pipeline execution.
    1.13+#
    1.14+# A pipeline is composed of independent jobs that run scripts, grouped into stages.
    1.15+# Stages run in sequential order, but jobs within stages run in parallel.
    1.16+#
    1.17+# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
    1.18+
    1.19+stages:          # List of stages for jobs, and their order of execution
    1.20+  - build
    1.21+  - test
    1.22+  - deploy
    1.23+
    1.24+build-job:       # This job runs in the build stage, which runs first.
    1.25+  stage: build
    1.26+  script:
    1.27+    - echo "Compiling the code..."
    1.28+    - echo "Compile complete."
    1.29+
    1.30+unit-test-job:   # This job runs in the test stage.
    1.31+  stage: test    # It only starts when the job in the build stage completes successfully.
    1.32+  script:
    1.33+    - echo "Running unit tests... This will take about 60 seconds."
    1.34+    - sleep 60
    1.35+    - echo "Code coverage is 90%"
    1.36+
    1.37+lint-test-job:   # This job also runs in the test stage.
    1.38+  stage: test    # It can run at the same time as unit-test-job (in parallel).
    1.39+  script:
    1.40+    - echo "Linting code... This will take about 10 seconds."
    1.41+    - sleep 10
    1.42+    - echo "No lint issues found."
    1.43+
    1.44+deploy-job:      # This job runs in the deploy stage.
    1.45+  stage: deploy  # It only runs when *both* jobs in the test stage complete successfully.
    1.46+  script:
    1.47+    - echo "Deploying application..."
    1.48+    - echo "Application successfully deployed."