Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions azure-pipelines-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
trigger:
- main

pool:
vmImage: 'ubuntu-latest'

stages:
- stage: Build
displayName: 'Build Stage'
jobs:
- job: BuildJob
displayName: 'Build Job'
steps:
- script: |
echo "Restoring project dependencies..."
displayName: 'Restore dependencies'
- script: |
echo "Running unit tests..."
displayName: 'Run unit tests'

- stage: Test
displayName: 'Test Stage'
dependsOn: Build
isSkippable: false
jobs:
- job: TestJob
displayName: 'Test Job'
steps:
- script: |
echo "Running unit tests..."
displayName: 'Run unit tests'
107 changes: 107 additions & 0 deletions azure-pipelines-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
trigger:
- main

pool:
vmImage: 'ubuntu-latest'

stages:
- stage: Build
displayName: 'Build Stage'
jobs:
- job: BuildJob
displayName: 'Build Job'
steps:
- script: |
echo "Restoring project dependencies..."
displayName: 'Restore dependencies'
- script: |
echo "Running unit tests..."
displayName: 'Run unit tests'

- stage: Test
displayName: 'Test Stage'
dependsOn: Build
isSkippable: false
jobs:
- job: TestJob
displayName: 'Test Job'
steps:
- script: |
echo "Running unit tests..."
displayName: 'Run unit tests'


- stage: DeployToStaging
displayName: 'Deploy to Staging'
dependsOn: Test
jobs:
- job: DeployStagingJob
displayName: 'Deploy to Staging Job'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
echo "Build staging job..."
displayName: 'Build and deploy to staging'

- job: DeployStagingJobWithValidation
pool: server
timeoutInMinutes: 4320 # job times out in 3 days
displayName: 'Deploy to Staging Job'
steps:
- task: ManualValidation@1
timeoutInMinutes: 1440 # task times out in 1 day
inputs:
notifyUsers: mukunthanthebest@gmail.com
instructions: 'Please validate the stage configuration and resume'
onTimeout: 'resume'

- stage: DeployToProduction
displayName: 'Deploy to Production'
dependsOn: DeployToStaging
lockBehavior: sequential
condition: and(succeeded(), in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/release'))
jobs:
- job: DeployProductionJob
displayName: 'Deploy to Production Job'
steps:
- script: |
echo "Deploying to production..."
# Add your deployment commands here
displayName: 'Run deployment commands'
- job: waitForValidation
displayName: Wait for external validation
pool: server
timeoutInMinutes: 4320 # job times out in 3 days
steps:
- task: ManualValidation@1
timeoutInMinutes: 1440 # task times out in 1 day
inputs:
notifyUsers: mukunthanthebest@gmail.com
instructions: 'Please validate the build configuration and resume'
onTimeout: 'resume'

- stage: DeployToAlternateProduction
displayName: 'Deploy to Alternate Production'
condition: succeeded()
trigger: manual
jobs:
- job: DeployAlternateProductionJob
displayName: 'Deploy to Alternate Production Job'
steps:
- script: |
echo "Deploying to alternate production..."
# Add your deployment commands here
displayName: 'Run deployment commands'

- stage: Rollback
displayName: 'Rollback Stage'
trigger: manual
jobs:
- job: RollbackJob
displayName: 'Rollback Job'
steps:
- script: |
echo "Rolling back the deployment..."
# Add your rollback commands here
displayName: 'Run rollback commands'
19 changes: 19 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
trigger:
- main

pool:
vmImage: 'ubuntu-latest'

stages:
- stage: Build
displayName: 'Build Stage'
jobs:
- job: BuildJob
displayName: 'Build Job'
steps:
- script: |
echo "Restoring project dependencies..."
displayName: 'Restore dependencies'
- script: |
echo "Running unit tests..."
displayName: 'Run unit tests'