Skip to content
Snippets Groups Projects
Select Git revision
  • c129edaba57bf37f4f1c8b4b996b8e76cf8bef86
  • master default protected
  • 1
  • 1.5
  • 1.5.0
  • 1.4
  • 1.4.1
  • 1.4.0
  • 1.3
  • 1.3.0
  • 1.2
  • 1.2.2
  • 1.2.1
13 results

gitlab-ci-renovate.yml

Blame
  • gitlab-ci-renovate.yml 8.89 KiB
    # =========================================================================================
    # Copyright (C) 2021 Orange & contributors
    #
    # This program is free software; you can redistribute it and/or modify it under the terms
    # of the GNU Lesser General Public License as published by the Free Software Foundation;
    # either version 3 of the License, or (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    # See the GNU Lesser General Public License for more details.
    #
    # You should have received a copy of the GNU Lesser General Public License along with this
    # program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
    # Floor, Boston, MA  02110-1301, USA.
    # =========================================================================================
    # default workflow rules: Merge Request pipelines
    workflow:
      rules:
        # prevent branch pipeline when an MR is open (prefer MR pipeline)
        - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*tag(,[^],]*)*\]/" && $CI_COMMIT_TAG'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*branch(,[^],]*)*\]/" && $CI_COMMIT_BRANCH'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*mr(,[^],]*)*\]/" && $CI_MERGE_REQUEST_ID'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*default(,[^],]*)*\]/" && $CI_COMMIT_REF_NAME =~ $CI_DEFAULT_BRANCH'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*prod(,[^],]*)*\]/" && $CI_COMMIT_REF_NAME =~ $PROD_REF'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*integ(,[^],]*)*\]/" && $CI_COMMIT_REF_NAME =~ $INTEG_REF'
          when: never
        - if: '$CI_COMMIT_MESSAGE =~ "/\[(ci skip|skip ci) on ([^],]*,)*dev(,[^],]*)*\]/" && $CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF'
          when: never
        - when: always
    
    
    variables:
      # variabilized tracking image
      TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master"
    
      RENOVATE_IMAGE: "registry.hub.docker.com/renovate/renovate:latest"
      RENOVATE_ENDPOINT: $CI_API_V4_URL
      
      RENOVATE_LOG_FILE: renovate-log.ndjson
      RENOVATE_AUTODISCOVER_FILTER: '${CI_PROJECT_ROOT_NAMESPACE}/**'
      RENOVATE_BINARY_SOURCE: install
      RENOVATE_LOG_FILE_LEVEL: debug
      LOG_LEVEL: info
    
    .renovate-scripts: &renovate-scripts |
      # BEGSCRIPT
      set -e
    
      function log_info() {
          echo -e "[\\e[1;94mINFO\\e[0m] $*"
      }
    
      function log_warn() {
          echo -e "[\\e[1;93mWARN\\e[0m] $*"
      }
    
      function log_error() {
          echo -e "[\\e[1;91mERROR\\e[0m] $*"
      }
    
      function assert_defined() {
        if [[ -z "$1" ]]
        then