Skip to content

intershop/iom-partner-devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iom-partner-devops

Overview

Repository iom-partner-devops provides an Azure DevOps Pipeline template, which can be used by IOM projects that are managed inside Intershops Commerce Platform. The template should be used as is. Any custom additions should be made outside of the template.

How to use the pipeline template

Add the azure-pipelines.yml file to the root-directory of your project with the following content. After that, in Azure DevOps a new pipeline has to be created from this file.

# Library iom-build-configuration is provided by Intershops DevOps Environment. It provides
# the following variables:
#  - BUILD_AGENT_POOL:                  name of the build agent pool
#  - REPO_SERVICE_CONNECTION:           service connection to the customer ACR
#  - REPO_PATH:                         host name and path of the customer ACR
#  - INTERSHOP_REPO_SERVICE_CONNECTION: service connection to the Intershop container registry
#  - INTERSHOP_REPO_PATH:               host name and path of the Intershop container registry
variables:
- group: iom-build-configuration

# Create a repository resource in the Github repo that is providing the centrally managed CI job.
resources:
  repositories:
    - repository: iom-partner-devops
      type: github
      endpoint: INTERSHOP_GITHUB
      name: intershop/iom-partner-devops
      ref: main

# Define when the pipeline should be triggered.
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#ci-triggers
trigger:
  branches:
    include:
      - '*'

# Run CI job. Additional custom stages/jobs might be added, see example below.
stages:
- stage: CI
  jobs:
    - template: ci-job-template.yml@iom-partner-devops
      parameters:
        # You have to set here the name of the environment that is providing the CI specific configuration!
        projectEnvName:                     dev

        # Project images, built and tested by the DevOps pipeline, are published to the project ACR only if
        # the name of the branch matches the regex passed in parameter branchesForPublication. If the default
        # behavior does not fit your requirements, activate the following line and adapt the regular expression.
        #branchesForPublication: '^refs/heads/develop$\|^refs/heads/master$\|^refs/heads/main$\|^refs/heads/release/\|^refs/heads/hotfix/'

        # You can choose whether tags of SNAPSHOT images should be unique or not. The image tag becomes
        # unique by appending the current commit hash.
        # Default value is True.
        #uniqueSnapshotTag: True

        # These parameters must not be changed. They are used to pass variables to the ci-job templaten, which
        # are defined by library iom-build-configuration.
        agentPool:                          $(BUILD_AGENT_POOL)
        artifactsFeed:                      iom-maven-artifacts
        dockerRepoIOMServiceConnection:     $(INTERSHOP_REPO_SERVICE_CONNECTION)
        dockerRepoIOM:                      $(INTERSHOP_REPO_PATH)
        acrServiceConnection:               $(REPO_SERVICE_CONNECTION)
        acr:                                $(REPO_PATH)

        # You may need to inject additional steps into the current job. This can be done by
        # defining additional templates, which are executed before and after the main steps
        # of the current job. Just create according template files and pass their names to the
        # following parameters. '@self' is important, otherwise the templates would be expected
        # at the same location as ci-job-template.yml.
        #preHookTemplate:  <filename>@self
        #postHookTemplate: <filename>@self
        #
        # This is a very simple example of a pre- or postHookTemplate:
        #
        # steps:
        # - script: |
        #     echo "Hello world"
        #   displayName: "hello world"

    # The following block shows a very simple example of how to extend the DevOps pipeline by a custom
    # job. Alternatively, one or more stages could be added, see:
    # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/stages?view=azure-devops
    #- job: custom
    #  pool: $(BUILD_AGENT_POOL)
    #  continueOnError: false
    #  timeoutInMinutes: 5
    #  workspace:
    #    clean: all
    #  steps:
    #  - checkout: self
    #    path: project
    #    clean: true
    #    timeoutInMinutes: 5
    #    displayName: "Checkout IOM project @$(Build.SourceBranchName)"