Skip to content
Snippets Groups Projects
Select Git revision
  • main default
  • y3
  • y1
3 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 2.57 KiB
    include:
      - project: piacere/private/t23-ci-setup
        ref: main
        file:
          - gitlab-ci-scripts/utils.gitlab-ci.yml
    
          # Image tag variables generation job -------------
          # Stage: variable-generation ---------------------
          - gitlab-ci-scripts/generate-variables.gitlab-ci.yml
          
          # Downstream t23-ci-setup pipeline trigger job ---
          # Stage: integration-tests-publish-deploy --------
          - gitlab-ci-scripts/trigger-downstream.gitlab-ci.yml
    
    variables:
      # ------------------------
      # Component image tag data
      # ------------------------
      COMPONENT_WP: wp4
      DMC_IMAGE_NAME: dmc
    
      # ------------------------------------------
      # Space-separated component image abbreviation list
      # used to generate image tags and related variables.
      # It is also passed to the downstream integration tests,
      # publication and deployment pipeline
      # ------------------------------------------
      IMAGE_NAMES: "$DMC_IMAGE_NAME"
    
    stages:
      - variable-generation
      - build
      - security
      - functional-tests
      - integration-tests-publish-deploy
    
    # Build jobs ----------------------
    
    build-temp-dmc:
      stage: build
      variables:
        TMP_IMAGE: "$TMP_IMAGE_DMC"
        DOCKERFILE_PATH: "."
      trigger: !reference [.trigger-build]
      rules:
        - if: $CI_COMMIT_BRANCH =~ /^y3/
    
    # Security job ------------------------
    
    security-trivy-dmc:
      stage: security
      variables:
        TMP_IMAGE: "$TMP_IMAGE_DMC"
      trigger: !reference [.trigger-security-trivy]
      needs:
        - job: build-temp-dmc
        - job: generate-variables
          artifacts: true
      rules:
        - if: $CI_COMMIT_BRANCH =~ /^y3/
    
    # functional tests job ------------------------
    
    run-functional-tests:
      image: $DOCKER_IMAGE
      stage: functional-tests
      services:
        - $DOCKER_DIND_IMAGE
      variables:
        TESTS_CONTAINER_NAME: functional-tester