Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -6,12 +6,20 @@ ...@@ -6,12 +6,20 @@
workflow: workflow:
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" # Creation of Merge Request (generation of CR) # Creation of Merge Request (generation of CR). Option 2) compare MR title $CI_MERGE_REQUEST_NAME =~ /^\w{3}(\-\d{4}){2}\-.*/
- if: $CI_COMMIT_TAG # Creation of tag (publish spec) - if: $CI_PIPELINE_SOURCE == "merge_request_event" #&& $CI_MERGE_REQUEST_TITLE =~ /^\w{3}(\-\d{4}){2}\-.*/
- if: $CI_PIPELINE_SOURCE == "web" # Removal of a specific entry # 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 - 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 when: never
- if: $CI_PIPELINE_SOURCE == "trigger" # Upgrade of the index.html page # Upgrade of the index.html page
- if: $CI_PIPELINE_SOURCE == "trigger"
variables: variables:
...@@ -38,6 +46,7 @@ Word CR: ...@@ -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 curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/Spec-template%2Edocx/raw?ref=master" >> onem2m_spec_template.docx
script: script:
- echo 'CR contribution' - echo 'CR contribution'
- env
- mkdir docs - 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 - ./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: artifacts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment