Fix bug with resolving values and feature flag
What does this MR do and why?
Fixes the feature flag check for dynamic pipeline input rules to properly receive project context. Also fixes a bug for resolving values, and in consequence - adds an integration spec to provide higher degree of confidence
How to set up and validate locally
spec:
inputs:
cloud_provider:
options: ["aws", "gcp", "azure"]
default: "aws"
type: "string"
environment:
options: ["dev", "staging", "prod"]
default: "dev"
type: "string"
instance_type:
rules:
- if: '$[[ inputs.cloud_provider ]] == "aws" && $[[ inputs.environment ]] == "dev"'
options: ["t3.micro", "t3.small"]
default: "t3.micro"
- if: '$[[ inputs.cloud_provider ]] == "aws" && $[[ inputs.environment ]] == "prod"'
options: ["m5.large", "m5.xlarge"]
default: "m5.large"
- if: '$[[ inputs.cloud_provider ]] == "gcp"'
options: ["e2-standard-2", "e2-standard-4"]
default: "e2-standard-2"
- options: ["standard"]
default: "standard"
---
provision:
script: echo "Provisioning $[[ inputs.instance_type ]] on $[[ inputs.cloud_provider ]] 1"
Edited by Laura Montemayor