You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
######################
#DECLARE PARAMETERS:-
######################
parameters:
- name: SubscriptionID
displayName: Please Provide the Subscription ID:-
type: object
default: 210e66cb-55cf-424e-8daa-6cad804ab604
- name: ServiceConnection
displayName: Please Provide the Service Connection Name:-
default: amcloud-cicd-service-connection
values:
- amcloud-cicd-service-connection
- name: RGName
displayName: Please Provide the Name of the Resource Group:-
type: object
default: DemoRGSonarQube
- name: RGLocation
displayName: Please Provide Location of Resource Group:-
default: WestEurope
values:
- WestEurope
- name: validateIfRGExists
displayName: Does the provided Resource Group Exists or do we create ?
default: Existing
values:
- Existing
- New
- name: ACIName
displayName: Please Provide the Name of the Azure Container Instance:-
type: object
default: am-poc-sonarqube-aci
THIS IS HOW IT LOOKS WHEN YOU EXECUTE THE PIPELINE FROM AZURE DEVOPS:-
NOTE:-
Please feel free to change the name of the RESOURCE GROUP NAME and the NAME OF THE AZURE CONTAINER INSTANCE.
Please feel free to change the values of the variables.
The entire YAML pipeline is build using Parameters and variables. No Values are Hardcoded.
PART #3:-
PIPELINE STAGES:-
There are 2 Stages in the Pipeline 1) When User selects "EXISTING" Pipeline Runtime Environment 2) When User selects "NEW" Pipeline Runtime Environment
Pipeline Stage gets SKIPPED or EXECUTED based on the User Choice
When User selects "Existing" Pipeline Runtime Environment, it means that the mentioned RESOURCE GROUP (RG) Exists in the Subscription.
2.
Pipeline when executed first validates if RG Exists.
3.
If RG EXISTS, it will then validate if the mentioned Azure Container Instance (ACI), provided using Pipeline Runtime Variables exists. If ACI exists, No Action to be Taken. If ACI does not Exists, Deploy ACI with SonarQube Image
4.
If RG DOES NOT EXISTS, it will first deploy RG and then ACI with SonarQube Image
When User selects "New" Pipeline Runtime Environment, it means that the mentioned RESOURCE GROUP (RG) does not Exists in the Subscription.
2.
Pipeline when executed first validates if RG Exists.
3.
If RG EXISTS, it will then validate if the mentioned Azure Container Instance (ACI), provided using Pipeline Runtime Variables exists. If ACI exists, No Action to be Taken. If ACI does not Exists, Deploy ACI with SonarQube Image
4.
If RG DOES NOT EXISTS, it will first deploy RG and then ACI with SonarQube Image
PART #6:-
VALIDATE THE YAML DEPLOYMENT WITH BELOW TEST CASES.
TEST CASE #1: SELECT "NEW" (There is No RG and ACI with SonarQube Image):-
Desired Output: RG + ACI with SonarQube Image Gets Deployed.