Skip to content

Commit

Permalink
[#1380] Added bugfix/* as allowed branch for deployments.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Aug 28, 2024
1 parent 606f299 commit 5b4a5be
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,12 @@ workflows:
# - project/description
# - deps/*
# - feature/description, feature/123-description
# - bugfix/description, bugfix/123-description
# - release/123.456.789, release/123.456.789-rc.123 (per https://semver.org/)
# - release/2023-04-17, release/2023-04-17.123 (date-based)
# - hotfix/123.456.789, hotfix/123.456.789-rc.1213 (per https://semver.org/)
# - hotfix/2023-04-17, hotfix/2023-04-17.123 (date-based)
only: /^(production|main|master|develop)$|^project\/[a-zA-z0-9\-\.]+|^feature\/[a-zA-Z0-9\-\.\,_]+$|^ci.*|^deps\/.*|^(release|hotfix)\/[0-9]+(\.[0-9]+){2}(-rc\.[0-9]+)?$|^(release|hotfix)\/[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9]+)?$/
only: /^(production|main|master|develop)$|^project\/[a-zA-z0-9\-\.]+|^(feature|bugfix)\/[a-zA-Z0-9\-\.\,_]+$|^ci.*|^deps\/.*|^(release|hotfix)\/[0-9]+(\.[0-9]+){2}(-rc\.[0-9]+)?$|^(release|hotfix)\/[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9]+)?$/
tags:
ignore: /.*/
- deploy-tags:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scaffold-test-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- develop
- 'feature/**'
- 'bugfix/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
8 changes: 4 additions & 4 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ below).
3. Creates a deployment artifact (project files to be pushed to Acquia Cloud
repository).
4. Pushes created artifact to the Acquia Cloud repository:
- for feature-based branches (i.e. `feature/ABC-123`) the code is pushed to
the branch with exactly the same name.
- for feature-based branches (i.e. `feature/ABC-123` or `bugfix/ABC-123`)
the code is pushed to the branch with exactly the same name.
- for release deployments, which are tag-based (i.e. `0.1.4`), the code is
pushed to the branch `deployment/[tag]` (i.e. `deployment/0.1.4`).
4. Acquia Cloud picks up recent push to the repository and
Expand Down Expand Up @@ -96,8 +96,8 @@ followed by all developers:
for project Technical Lead and Deployer user.
2. There should be no pushes to Acquia Cloud repository.
3. There may be `main` or `develop` branch in Acquia Cloud repository.
4. Technical Lead is expected to regularly cleanup `feature/*` branches in
Acquia Cloud repository.
4. Technical Lead is expected to regularly cleanup `feature/*` and `bugfix/*`
branches in Acquia Cloud repository.

[//]: # (#;> ACQUIA)

Expand Down
20 changes: 20 additions & 0 deletions tests/phpunit/CircleCiConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ public static function dataProviderDeployBranchRegex(): array {
['feature/0.1.x-description'],
['feature/0.1.2.x-description'],

['bugfix/description'],
['bugfix/Description'],
['bugfix/Description-With-Hyphens'],
['bugfix/Description-With_Underscores'],
['bugfix/123-description'],
['bugfix/123-Description'],
['bugfix/UNDERSCORES_UNDERSCORES'],
['bugfix/123-Description-With_UNDERSCORES'],
['bugfix/1.x'],
['bugfix/0.x'],
['bugfix/0.1.x'],
['bugfix/0.1.2.x'],
['bugfix/1.x-description'],
['bugfix/0.x-description'],
['bugfix/0.1.x-description'],
['bugfix/0.1.2.x-description'],

['project/description'],
['project/Description'],
['project/Description-With-Hyphens'],
Expand Down Expand Up @@ -183,12 +200,15 @@ public static function dataProviderDeployBranchRegex(): array {
['hotfix/123.456.789-rc.123-something', FALSE],

['prefeature/something', FALSE],
['prefbugfix/something', FALSE],
['prerelease/something', FALSE],
['prehotfix/something', FALSE],
['featurepost/something', FALSE],
['bugfixpost/something', FALSE],
['releasepost/something', FALSE],
['hotfixpost/something', FALSE],
['prefeaturepost/something', FALSE],
['prebugfixpost/something', FALSE],
['prereleasepost/something', FALSE],
['prehotfixpost/something', FALSE],
['preproject/something', FALSE],
Expand Down

1 comment on commit 5b4a5be

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.