Commit 605cf865 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Changing rules to execute pipeline only during creation (not update) of merge request

parent d2f882b3
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -6,12 +6,20 @@

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" # Creation of Merge Request (generation of CR)
    - if: $CI_COMMIT_TAG # Creation of tag (publish spec)
    - if: $CI_PIPELINE_SOURCE == "web" # Removal of a specific entry
    # Creation of Merge Request (generation of CR). Option 2) compare MR title $CI_MERGE_REQUEST_NAME =~ /^\w{3}(\-\d{4}){2}\-.*/
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" #&& $CI_MERGE_REQUEST_TITLE =~ /^\w{3}(\-\d{4}){2}\-.*/
    # Update of Merge Request
    #- if: $CI_PIPELINE_SOURCE == "merge_request_event" # && $CI_COMMIT_BRANCH != ""
    #  when: never
    # Creation of tag (publish spec)
    - if: $CI_COMMIT_TAG
    # Removal of a specific entry
    - if: $CI_PIPELINE_SOURCE == "web"
    # Pipeline to be run manually as defined in the contribution procedure as it is not known when the CR is ready
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
      when: never # Pipeline to be run manually as defined in the contribution procedure as it is not known when the CR is ready
    - if: $CI_PIPELINE_SOURCE == "trigger" # Upgrade of the index.html page
      when: never
    # Upgrade of the index.html page
    - if: $CI_PIPELINE_SOURCE == "trigger"

variables:

@@ -38,6 +46,7 @@ Word CR:
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/Spec-template%2Edocx/raw?ref=master" >> onem2m_spec_template.docx
  script:
    - echo 'CR contribution'
    - env
    - mkdir docs
    - ./generate_changemarks.sh ${CI_PROJECT_URL} ${CI_MERGE_REQUEST_PROJECT_ID} ${CI_MERGE_REQUEST_IID} onem2m_delimiter_start.docx onem2m_delimiter_end.docx onem2m_coversheet_template.docx onem2m_spec_template.docx
  artifacts: