diff --git a/azure-pipelines-prod.yml b/azure-pipelines-prod.yml deleted file mode 100644 index 8df5632c9c..0000000000 --- a/azure-pipelines-prod.yml +++ /dev/null @@ -1,30 +0,0 @@ -# File: drupal-helfi/azure-pipelines.yml - -# 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 - -# 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 - -resources: - repositories: - # Azure DevOps repository - - repository: avustusasiointi-pipelines - type: git - # project/repository - name: avustusasiointi/avustusasiointi-pipelines - -extends: - template: azure-pipelines-drupal-prod.yml@avustusasiointi-pipelines diff --git a/azure-pipelines-staging.yml b/azure-pipelines-staging.yml deleted file mode 100644 index 8f833f0eec..0000000000 --- a/azure-pipelines-staging.yml +++ /dev/null @@ -1,41 +0,0 @@ -# File: drupal-helfi/azure-pipelines.yml - -# 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: - - main - paths: - exclude: - - '*.md' - - '.github/' - - 'azure-pipelines-dev.yml' - - 'azure-pipelines-test.yml' - - 'azure-pipelines-prod.yml' - -# 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 - -resources: - repositories: - # Azure DevOps repository - - repository: avustusasiointi-pipelines - type: git - # project/repository - name: avustusasiointi/avustusasiointi-pipelines - -extends: - template: azure-pipelines-drupal-staging.yml@avustusasiointi-pipelines diff --git a/pipelines/drupal-dev.yml b/pipelines/drupal-dev.yml new file mode 100644 index 0000000000..cd16817b23 --- /dev/null +++ b/pipelines/drupal-dev.yml @@ -0,0 +1,49 @@ +# 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 + # batch: true + # branches: + # include: + # - dev + # paths: + # exclude: + # - '*.md' + # - '.github/' + # - 'pipelines/drupal-production.yml' + # - 'pipelines/drupal-staging.yml' + # - 'pipelines/drupal-test.yml' + # - 'compose*' + +# 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 + +resources: + repositories: + # Azure DevOps repository + - repository: avustusasiointi-pipelines + type: git + # Azure DevOps project/repository + name: avustusasiointi/avustusasiointi-pipelines + +extends: + # Filename in Azure DevOps Repository + template: components/drupal/pipelines/drupal-dev.yml@avustusasiointi-pipelines + # parameters: + # Application build arguments and config map values as key value pairs. + # Does not contain all buildArguments or configMap values, the rest located in avustusasiointi-pipelines + # The values here will override the values defined in the avustusasiointi-pipelines repository + # buildArgs: + # DEBUG: 1 + # configMap: # pod environment variables + # DEBUG: 1 diff --git a/azure-pipelines-dev.yml b/pipelines/drupal-production.yml similarity index 58% rename from azure-pipelines-dev.yml rename to pipelines/drupal-production.yml index 1b7ed5ebe5..fd7c3b2b21 100644 --- a/azure-pipelines-dev.yml +++ b/pipelines/drupal-production.yml @@ -1,15 +1,6 @@ -# File: drupal-helfi/azure-pipelines.yml - # 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 -# batch: true -# tags: -# include: -# - deploy-to-dev -# 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 @@ -30,12 +21,17 @@ resources: # Azure DevOps repository - repository: avustusasiointi-pipelines type: git - # project/repository + # Azure DevOps project/repository name: avustusasiointi/avustusasiointi-pipelines - - repository: robottests - type: github - name: City-of-Helsinki/hel-fi-drupal-grants - endpoint: City-of-Helsinki extends: - template: azure-pipelines-drupal-dev.yml@avustusasiointi-pipelines + # Filename in Azure DevOps Repository + template: components/drupal/pipelines/drupal-production.yml@avustusasiointi-pipelines + # parameters: + # Application build arguments and config map values as key value pairs. + # Does not contain all buildArguments or configMap values, the rest located in avustusasiointi-pipelines + # The values here will override the values defined in the avustusasiointi-pipelines repository + # buildArgs: + # DEBUG: 1 + # configMap: # pod environment variables + # DEBUG: 1 diff --git a/pipelines/drupal-staging.yml b/pipelines/drupal-staging.yml new file mode 100644 index 0000000000..84e86e1dfd --- /dev/null +++ b/pipelines/drupal-staging.yml @@ -0,0 +1,48 @@ +# 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: + - main + paths: + exclude: + - '*.md' + - '.github/' + - 'pipelines/drupal-production.yml' + - 'pipelines/drupal-test.yml' + - 'pipelines/drupal-dev.yml' + +# 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 + +resources: + repositories: + # Azure DevOps repository + - repository: avustusasiointi-pipelines + type: git + # Azure DevOps project/repository + name: avustusasiointi/avustusasiointi-pipelines + +extends: + # Filename in Azure DevOps Repository + template: components/drupal/pipelines/drupal-staging.yml@avustusasiointi-pipelines + # parameters: + # Application build arguments and config map values as key value pairs. + # Does not contain all buildArguments or configMap values, the rest located in avustusasiointi-pipelines + # The values here will override the values defined in the avustusasiointi-pipelines repository + # buildArgs: + # DEBUG: 1 + # configMap: # pod environment variables + # DEBUG: 1 diff --git a/azure-pipelines-test.yml b/pipelines/drupal-test.yml similarity index 54% rename from azure-pipelines-test.yml rename to pipelines/drupal-test.yml index 3ed92852c0..36823a8f68 100644 --- a/azure-pipelines-test.yml +++ b/pipelines/drupal-test.yml @@ -1,19 +1,17 @@ -# File: drupal-helfi/azure-pipelines.yml - # 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: - - dev + - dev paths: exclude: - - '*.md' - - '.github/' - - 'azure-pipelines-dev.yml' - - 'azure-pipelines-staging.yml' - - 'azure-pipelines-prod.yml' + - '*.md' + - '.github/' + - 'pipelines/drupal-production.yml' + - 'pipelines/drupal-staging.yml' + - 'pipelines/drupal-dev.yml' # 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 @@ -34,8 +32,17 @@ resources: # Azure DevOps repository - repository: avustusasiointi-pipelines type: git - # project/repository + # Azure DevOps project/repository name: avustusasiointi/avustusasiointi-pipelines extends: - template: azure-pipelines-drupal-test.yml@avustusasiointi-pipelines + # Filename in Azure DevOps Repository + template: components/drupal/pipelines/drupal-test.yml@avustusasiointi-pipelines + # parameters: + # Application build arguments and config map values as key value pairs. + # Does not contain all buildArguments or configMap values, the rest located in avustusasiointi-pipelines + # The values here will override the values defined in the avustusasiointi-pipelines repository + # buildArgs: + # DEBUG: 1 + # configMap: # pod environment variables + # DEBUG: 1