Skip to content

Fix condition for AUTO_DEVOPS_PLATFORM_TARGET

Kent Japhet Ballon requested to merge kballon-master-patch-25800 into master

What does this MR do and why?

One of the templates used in deploying applications to AWS using GitLab CI/CD uses the AWS/CF-Provision-and-Deploy-EC2.gitlab-ci.yml which also relies on Jobs/CF-Provision.gitlab-ci.yml. The current rule for the AUTO_DEVOPS_PLATFORM_TARGET suggests that the job will never run because of the OR condition.

  rules:
    - if: '($AUTO_DEVOPS_PLATFORM_TARGET != "EC2") || ($AUTO_DEVOPS_PLATFORM_TARGET != "ECS")'
      when: never

From the context of the job, this should be performed if the AUTO_DEVOPS_PLATFORM_TARGET is either EC2 or ECS so the rule should be something like this instead.

  rules:
    - if: '($AUTO_DEVOPS_PLATFORM_TARGET != "EC2") && ($AUTO_DEVOPS_PLATFORM_TARGET != "ECS")'
      when: never

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kent Japhet Ballon

Merge request reports