Skip to content

Commit

Permalink
Update azure pipelines
Browse files Browse the repository at this point in the history
Add support for building test images (via test branch). Clean up noisy
comments from yml files.
  • Loading branch information
voneiden committed Aug 15, 2023
1 parent 434dd30 commit 78f571d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 128 deletions.
32 changes: 4 additions & 28 deletions azure-pipelines-build.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,29 @@
# Continuous integration (CI) triggers cause a pipeline to run whenever you push
# an update to the specified branches or you push specified tags.
# Build pipeline
# Builds images for dev, test, staging and production

trigger:
batch: true
branches:
include:
- develop
- refs/tags/staging-*
- refs/tags/release-*
# other examples:
#- release/*
#- refs/tags/*
paths:
exclude:
- README.md

# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
# opened with one of the specified target branches, or when updates are made to
# such a pull request.
#
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# of the pull request.
#
# Opt out of pull request validation
# PR's are tested by github actions
pr: none

# By default, use self-hosted agents
pool: Default

# Image tag name for Fuse projects
#parameters:
#- name: imagetag
# displayName: Image tag to be built and/or deployed
# type: string
# default: latest

resources:
repositories:
# Azure DevOps repository
- repository: linkedevents-pipelines
type: git
# Azure DevOps project/repository
name: linkedevents/linkedevents-pipelines

extends:
# Filename in Azure DevOps Repository (note possible -ui or -api)
template: azure-pipelines-build-linkedevents-api.yml@linkedevents-pipelines
#parameters:
#imagetag: ${{ parameters.imagetag }}
parameters:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/release-') }}:
buildenv: -prod
Expand Down
47 changes: 12 additions & 35 deletions azure-pipelines-dev.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,24 @@
# Continuous integration (CI) triggers cause a pipeline to run whenever you push
# an update to the specified branches or you push specified tags.
# trigger:
# batch: true
# branches:
# include:
# - master
# paths:
# exclude:
# - README.md
# Dev environment deploy pipeline
# Triggers automatically after a build of develop branch

trigger: none
# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
# opened with one of the specified target branches, or when updates are made to
# such a pull request.
#
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# of the pull request.
#
# Opt out of pull request validation
pr: none

# By default, use self-hosted agents
pool: Default

# Image tag name for Fuse projects
#parameters:
#- name: imagetag
# displayName: Image tag to be built and/or deployed
# type: string
# default: latest
parameters:
- name: buildenv
displayName: Build environment
type: string
default: "-dev"
values:
- "-prod"
- "-staging"
- "-dev"

resources:
repositories:
# Azure DevOps repository
- repository: linkedevents-pipelines
type: git
# Azure DevOps project/repository
name: linkedevents/linkedevents-pipelines
pipelines:
- pipeline: build-linkedevents-api
Expand All @@ -46,10 +29,4 @@ resources:
- refs/heads/develop

extends:
# Filename in Azure DevOps Repository (note possible -ui or -api)
# Django example: azure-pipelines-linkedevents-api-master.yml
# Drupal example: azure-pipelines-drupal-master.yml
template: azure-pipelines-deploy-linkedevents-api-dev.yml@linkedevents-pipelines
# Image tag name for Fuse projects
#parameters:
#imagetag: ${{ parameters.imagetag }}
40 changes: 3 additions & 37 deletions azure-pipelines-prod.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
# Continuous integration (CI) triggers cause a pipeline to run whenever you push
# an update to the specified branches or you push specified tags.
# trigger:
# batch: true
# branches:
# include:
# - master
# paths:
# exclude:
# - README.md
# Production environment deploy pipeline
# Must be triggered manually

trigger: none
# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
# opened with one of the specified target branches, or when updates are made to
# such a pull request.
#
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# of the pull request.
#
# Opt out of pull request validation
pr: none

# By default, use self-hosted agents
pool: Default

parameters:
Expand All @@ -31,27 +13,11 @@ parameters:
values:
- "-prod"


# Image tag name for Fuse projects
#parameters:
#- name: imagetag
# displayName: Image tag to be built and/or deployed
# type: string
# default: latest

resources:
repositories:
# Azure DevOps repository
- repository: linkedevents-pipelines
type: git
# Azure DevOps project/repository
name: linkedevents/linkedevents-pipelines

extends:
# Filename in Azure DevOps Repository (note possible -ui or -api)
# Django example: azure-pipelines-linkedevents-api-master.yml
# Drupal example: azure-pipelines-drupal-master.yml
template: azure-pipelines-deploy-linkedevents-api-prod.yml@linkedevents-pipelines
# Image tag name for Fuse projects
#parameters:
#imagetag: ${{ parameters.imagetag }}
4 changes: 3 additions & 1 deletion azure-pipelines-stage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Staging environment deploy pipeline
# Must be triggered manually

trigger: none
pr: none
pool: Default
Expand All @@ -10,7 +13,6 @@ parameters:
values:
- "-prod"
- "-staging"
- "-dev"


resources:
Expand Down
39 changes: 12 additions & 27 deletions azure-pipelines-test.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
# Continuous integration (CI) triggers cause a pipeline to run whenever you push
# an update to the specified branches or you push specified tags.
trigger: none
# Test environment deploy pipeline
# Triggers automatically after a build of test branch

# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
# opened with one of the specified target branches, or when updates are made to
# such a pull request.
#
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# of the pull request.
#
# Opt out of pull request validation
trigger: none
pr: none

# By default, use self-hosted agents
pool: Default

# Image tag name for Fuse projects
#parameters:
#- name: imagetag
# displayName: Image tag to be built and/or deployed
# type: string
# default: latest
parameters:
- name: buildenv
displayName: Build environment
type: string
default: "-test"
values:
- "-prod"
- "-staging"
- "-dev"

resources:
repositories:
# Azure DevOps repository
- repository: linkedevents-pipelines
type: git
# Azure DevOps project/repository
name: linkedevents/linkedevents-pipelines

extends:
# Filename in Azure DevOps Repository (note possible -ui or -api)
# Django example: azure-pipelines-linkedevents-api-release.yml
# Drupal example: azure-pipelines-drupal-release.yml
template: azure-pipelines-deploy-linkedevents-api-test.yml@linkedevents-pipelines
#parameters:
#imagetag: ${{ parameters.imagetag }}

0 comments on commit 78f571d

Please sign in to comment.