diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b868d7541bd6ab435edd46ce20a3cbff7ad33284..5160129e3cdb5fefefeaa816c6f3e5e2d76612d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,7 +63,17 @@ include: ### BEFORE MREGE REQUEST - local: ci-cd/templates/all-roles-b4-merge.yml rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master" + #### + # rules: + # ### WORKS + # # - if: $CI_COMMIT_REF_NAME == "main" + # ### + # # - if: $CI_PIPELINE_SOURCE == "merge_request_event" + # ### + # # - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event"' + # #### + # - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_APPROVED == true ### ### TEST PARSED VARS FROM UPSTREAM diff --git a/ci-cd/playbooks/02_dependencies.yml b/ci-cd/playbooks/02_dependencies.yml index f527b2b4b90fe550095e979a10016f82ce2833cd..6c1cc56c31ffc8ea4db4258671c678302e5a7384 100644 --- a/ci-cd/playbooks/02_dependencies.yml +++ b/ci-cd/playbooks/02_dependencies.yml @@ -5,4 +5,5 @@ hosts: - example_servers_group roles: - - roles/dependencies + # - roles/dependencies + - roles/c3infodesk-deployment-role-dependencies diff --git a/ci-cd/templates/all-roles-b4-merge.yml b/ci-cd/templates/all-roles-b4-merge.yml index 461127e638503270b35bfb73076fa29a8773a606..33b426310fec27a48caf911d665672af30507b38 100644 --- a/ci-cd/templates/all-roles-b4-merge.yml +++ b/ci-cd/templates/all-roles-b4-merge.yml @@ -5,38 +5,20 @@ ### variables: AUTHOR: fejao - # RUN_UPSTREAM_FOR_ROLE_TEST: true - # RUN_UPSTREAM_FOR_ROLE_DEPENDENCIES: true - # RUN_UPSTREAM_FOR_ROLE_CLONE_REPOSITORIES: true - # RUN_UPSTREAM_FOR_ROLE_DOCKER_IMAGES: true - # RUN_UPSTREAM_FOR_ROLE_DOCKER_CONTAINERS: true - # RUN_UPSTREAM_FOR_ROLE_OH_MY_BASH: true + +# workflow: +# rules: +# - if: $CI_MERGE_REQUEST_ID +# when: always +# - when: never ### ### INCLUDE ### include: - ### ROLE TEST - local: ci-cd/templates/role-test.yml - # rules: - # - if: '$RUN_UPSTREAM_FOR_ROLE_TEST == "true"' - ### ROLE DEPENDENCIES - local: ci-cd/templates/role-dependencies.yml - # rules: - # - if: '$RUN_UPSTREAM_FOR_ROLE_DEPENDENCIES == "true"' - ### ROLE CLONE-REPOSITORIES - - local: ci-cd/templates/role-clone-repositories.yml - # rules: - # - if: '$RUN_UPSTREAM_FOR_ROLE_CLONE_REPOSITORIES == "true"' - ### ROLE DOCKER-IMAGES - - local: ci-cd/templates/role-docker-images.yml - # rules: - # - if: '$RUN_UPSTREAM_FOR_ROLE_DOCKER_IMAGES == "true"' - ### ROLE DOCKER-CONTAINERS - - local: ci-cd/templates/role-docker-containers.yml - # rules: - # - if: '$RUN_UPSTREAM_FOR_ROLE_DOCKER_CONTAINERS == "true"' - ### ROLE OH-MY-BASH - - local: ci-cd/templates/role-oh-my-bash.yml - # rules: - # - if: '$RUN_UPSTREAM_FOR_ROLE_OH_MY_BASH == "true"' + # - local: ci-cd/templates/role-clone-repositories.yml + # - local: ci-cd/templates/role-docker-images.yml + # - local: ci-cd/templates/role-docker-containers.yml + # - local: ci-cd/templates/role-oh-my-bash.yml