Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-prod automation stage #14

Merged
merged 1 commit into from Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 22 additions & 1 deletion blueprints/__101__/azure-pipeline-__101__-cd.yml
Expand Up @@ -98,6 +98,26 @@ stages:
- SecurityAutomation
- SecurityReview

# -----------------------------------------------------------------------------------------------------
# PRE-PROD AUTOMATION SCANS STAGE
# -----------------------------------------------------------------------------------------------------
- ${{ if and(eq(parameters.stage.production.name, 'Production'), or(eq(variables['Build.SourceBranch'], 'refs/heads/release'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))) }}:
- template: /templates/pre-prod/azure-pipeline-pre-prod-automation.yml@CeBlueprints
parameters:
applicationBlueprint: ${{parameters.stage.preProdAutomation.applicationBlueprint}}
modeElite: ${{parameters.stage.preProdAutomation.modeElite}}
dependsOn:
- ContinuousIntegration
- ${{ if eq(parameters.stage.development.name, 'Development') }}:
- Development
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest
- QAScans
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging

# -----------------------------------------------------------------------------------------------------
# PRODUCTION STAGE
# -----------------------------------------------------------------------------------------------------
Expand All @@ -118,4 +138,5 @@ stages:
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging
- Staging
- PreProdAutomation
5 changes: 4 additions & 1 deletion blueprints/__101__/azure-pipeline-__101__-control.yml
Expand Up @@ -19,7 +19,7 @@ parameters:
# CI Blueprint optionals
- name: versionSpec
type: string
default: '5.11.x' # change default from 5.6.3 to 5.11.x
default: '5.11.x' # switch from 5.6.3 to 5.11.x as default
# CD Blueprint optionals
- name: suppressCD
type: boolean
Expand Down Expand Up @@ -90,6 +90,9 @@ stages:
qaScans:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}
preProdAutomation:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}

# --------------------------------------------------------------------------
# END OF PIPELINE
Expand Down
23 changes: 22 additions & 1 deletion blueprints/azure-function/azure-pipeline-azure-function-cd.yml
Expand Up @@ -104,6 +104,26 @@ stages:
- SecurityAutomation
- SecurityReview

# -----------------------------------------------------------------------------------------------------
# PRE-PROD AUTOMATION SCANS STAGE
# -----------------------------------------------------------------------------------------------------
- ${{ if and(eq(parameters.stage.production.name, 'Production'), or(eq(variables['Build.SourceBranch'], 'refs/heads/release'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))) }}:
- template: /templates/pre-prod/azure-pipeline-pre-prod-automation.yml@CeBlueprints
parameters:
applicationBlueprint: ${{parameters.stage.preProdAutomation.applicationBlueprint}}
modeElite: ${{parameters.stage.preProdAutomation.modeElite}}
dependsOn:
- ContinuousIntegration
- ${{ if eq(parameters.stage.development.name, 'Development') }}:
- Development
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest
- QAScans
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging

# -----------------------------------------------------------------------------------------------------
# PRODUCTION STAGE
# -----------------------------------------------------------------------------------------------------
Expand All @@ -127,4 +147,5 @@ stages:
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging
- Staging
- PreProdAutomation
Expand Up @@ -21,7 +21,7 @@ parameters:
# CI Blueprint optionals
- name: versionSpec
type: string
default: '5.11.x' # change default from 5.6.3 to 5.11.x
default: '5.11.x' # switch from 5.6.3 to 5.11.x as default
# CD Blueprint optionals
- name: suppressCD
type: boolean
Expand Down Expand Up @@ -99,6 +99,9 @@ stages:
qaScans:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}
preProdAutomation:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}

# --------------------------------------------------------------------------
# END OF PIPELINE
Expand Down
23 changes: 22 additions & 1 deletion blueprints/nuget-package/azure-pipeline-nuget-package-cd.yml
Expand Up @@ -99,6 +99,26 @@ stages:
- SecurityAutomation
- SecurityReview

# -----------------------------------------------------------------------------------------------------
# PRE-PROD AUTOMATION SCANS STAGE
# -----------------------------------------------------------------------------------------------------
- ${{ if and(eq(parameters.stage.production.name, 'Production'), or(eq(variables['Build.SourceBranch'], 'refs/heads/release'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))) }}:
- template: /templates/pre-prod/azure-pipeline-pre-prod-automation.yml@CeBlueprints
parameters:
applicationBlueprint: ${{parameters.stage.preProdAutomation.applicationBlueprint}}
modeElite: ${{parameters.stage.preProdAutomation.modeElite}}
dependsOn:
- ContinuousIntegration
- ${{ if eq(parameters.stage.development.name, 'Development') }}:
- Development
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest
- QAScans
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging

# -----------------------------------------------------------------------------------------------------
# PRODUCTION STAGE
# -----------------------------------------------------------------------------------------------------
Expand All @@ -120,4 +140,5 @@ stages:
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging
- Staging
- PreProdAutomation
Expand Up @@ -30,7 +30,7 @@ parameters:
# CI Blueprint optionals
- name: versionSpec
type: string
default: '5.11.x' # change default from 5.6.3 to 5.11.x
default: '5.11.x' # switch from 5.6.3 to 5.11.x as default
- name: useDefaultConfig
type: boolean
default: false
Expand Down Expand Up @@ -113,6 +113,9 @@ stages:
qaScans:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}
preProdAutomation:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}

# --------------------------------------------------------------------------
# END OF PIPELINE
Expand Down
Expand Up @@ -49,7 +49,6 @@ stages:
- Development
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest
- SecurityAutomation

# -----------------------------------------------------------------------------------------------------
# QA SCANS STAGE
Expand All @@ -65,6 +64,7 @@ stages:
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest


# -----------------------------------------------------------------------------------------------------
# SECURITY REVIEW STAGE
# -----------------------------------------------------------------------------------------------------
Expand All @@ -79,6 +79,7 @@ stages:
- Development
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest
- SecurityAutomation

# -----------------------------------------------------------------------------------------------------
# STAGING STAGE
Expand All @@ -102,6 +103,26 @@ stages:
- SecurityAutomation
- SecurityReview

# -----------------------------------------------------------------------------------------------------
# PRE-PROD AUTOMATION SCANS STAGE
# -----------------------------------------------------------------------------------------------------
- ${{ if and(eq(parameters.stage.production.name, 'Production'), or(eq(variables['Build.SourceBranch'], 'refs/heads/release'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))) }}:
- template: /templates/pre-prod/azure-pipeline-pre-prod-automation.yml@CeBlueprints
parameters:
applicationBlueprint: ${{parameters.stage.preProdAutomation.applicationBlueprint}}
modeElite: ${{parameters.stage.preProdAutomation.modeElite}}
dependsOn:
- ContinuousIntegration
- ${{ if eq(parameters.stage.development.name, 'Development') }}:
- Development
- ${{ if eq(parameters.stage.systemTest.name, 'SystemTest') }}:
- SystemTest
- QAScans
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging

# -----------------------------------------------------------------------------------------------------
# PRODUCTION STAGE
# -----------------------------------------------------------------------------------------------------
Expand All @@ -124,4 +145,5 @@ stages:
- SecurityAutomation
- SecurityReview
- ${{ if eq(parameters.stage.staging.name, 'Staging') }}:
- Staging
- Staging
- PreProdAutomation
Expand Up @@ -18,7 +18,7 @@ parameters:
# CI Blueprint optionals
- name: versionSpec
type: string
default: '5.11.x' # change default from 5.6.3 to 5.11.x
default: '5.11.x' # switch from 5.6.3 to 5.11.x as default
# CD Blueprint optionals
- name: suppressCD
type: boolean
Expand Down Expand Up @@ -94,6 +94,9 @@ stages:
qaScans:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}
preProdAutomation:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}

# --------------------------------------------------------------------------
# END OF PIPELINE
Expand Down
33 changes: 33 additions & 0 deletions templates/pre-prod/azure-pipeline-pre-prod-automation.yml
@@ -0,0 +1,33 @@
parameters:
- name: dependsOn
type: object
default: []
- name: applicationBlueprint
type: string
- name: modeElite
type: boolean
default: false

stages:
# -----------------------------------------------------------------------------------------------------
# QUALITY ASSURANCE SCANS STAGE
# -----------------------------------------------------------------------------------------------------
- stage: 'PreProdAutomation'
displayName: 'Pre-Prod Automation (PPA)'
dependsOn:
- ${{ each stage in parameters.dependsOn }}:
- ${{stage}}
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: 'PreProdAutomation'
steps:
# List all environment variables within this agent
- bash: 'env | sort'
displayName: Bootstrap Dump env variables

# Inject the QA scans template into the pipeline
- template: /templates/pre-prod/pre-prod-automation.yml@CeBlueprints
parameters:
applicationBlueprint: ${{parameters.applicationBlueprint}}
modeElite: ${{parameters.modeElite}}
13 changes: 13 additions & 0 deletions templates/pre-prod/pre-prod-automation.yml
@@ -0,0 +1,13 @@
parameters:
- name: applicationBlueprint
type: string
- name: modeElite
type: boolean
default: false

steps:

# -----------------------------------------------------------------------------------------------------
# PRE-PRODUCTION AUTOMATION STAGE
# -----------------------------------------------------------------------------------------------------
- script: echo 'Pre-Production Automation Placeholder ***********************************'