Skip to content

Commit

Permalink
Merge branch 'main' into vol-5987-hidden-messages-from-deleted-users
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg2020 authored Feb 27, 2025
2 parents b723bff + eaf2ea3 commit 0c87c2f
Show file tree
Hide file tree
Showing 17 changed files with 133 additions and 516 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- prerelease

concurrency:
group: ${{ github.workflow }}
Expand All @@ -23,11 +24,32 @@ jobs:
tag_name: ${{ steps.release.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: googleapis/release-please-action@v4
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
fetch-depth: 0

- name: Configure Release-Please for Branch
run: |
if [[ "${{ github.ref_name }}" == "prerelease" ]]; then
echo "Configuring for pre-releases..."
cp prerelease-config.json release-please-config.json
fi
- name: Run Release-Please
id: release
uses: googleapis/release-please-action@v4
with:
target-branch: ${{ github.ref_name }}

- name: Cleanup
if: always()
run: |
if [[ "${{ github.ref_name }}" == "prerelease" ]]; then
git checkout -- release-please-config.json || true
fi
orchestrator:
name: Orchestrator
needs:
Expand Down Expand Up @@ -346,7 +368,7 @@ jobs:
needs:
- terraform_env_dev
- liquibase-dev
uses: dvsa/vol-functional-tests/.github/workflows/e2eSmoke.yaml@use-surefire-summary-with-percentage-pass-support
uses: dvsa/vol-functional-tests/.github/workflows/e2eSmoke.yaml@main
with:
platform_env: dev
aws_role: ${{ vars.ACCOUNT_NONPROD_TEST_OIDC_ROLE }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm64

- name: Extract Docker metadata
id: meta
Expand Down
3 changes: 2 additions & 1 deletion app/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ phpcs.xml
phpstan.neon
phpunit.xml
psalm.xml
# Trigger CD - 2025-02-20-1533
# Trigger CD - 2025-02-24-0945

Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ private function createTaskCmd(CaseEntity $case): CreateTaskCmd
'category' => CategoryEntity::CATEGORY_COMPLIANCE,
'subCategory' => CategoryEntity::TASK_SUB_CATEGORY_NR,
'description' => 'ERRU case has been automatically created',
'actionDate' => date('Y-m-d', strtotime('+7 days')),
'actionDate' => date('Y-m-d'),
'urgent' => 'Y',
'case' => $case->getId(),
'licence' => $case->getLicence()->getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public function testHandleCommand()
'category' => CategoryEntity::CATEGORY_COMPLIANCE,
'subCategory' => CategoryEntity::TASK_SUB_CATEGORY_NR,
'description' => 'ERRU case has been automatically created',
'actionDate' => date('Y-m-d', strtotime('+7 days')),
'actionDate' => date('Y-m-d'),
'urgent' => 'Y',
'case' => null,
'licence' => $licenceId,
Expand Down
23 changes: 23 additions & 0 deletions cleanup-prerelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

if [[ "$CURRENT_BRANCH" == "prerelease" ]]; then
echo "Cannot delete prerelease while on prerelease branch"
echo "Please checkout another branch first"
exit 1
fi

if ! git show-ref --verify --quiet refs/heads/prerelease; then
echo "No local prerelease branch found"
exit 0
fi

git branch -D prerelease

if git ls-remote --exit-code --heads origin prerelease >/dev/null 2>&1; then
git push origin --delete prerelease
echo "Remote prerelease branch deleted"
fi

echo "Prerelease branch cleanup complete"
43 changes: 43 additions & 0 deletions create-prerelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

VERSION=$1
SOURCE_BRANCH=$(git rev-parse --abbrev-ref HEAD)

if [ -z "$VERSION" ]; then
echo "Error: Version argument required"
echo "Usage: ./create-prerelease.sh <version>"
echo "Example: ./create-prerelease.sh 1.1.0"
echo ""
echo "This will create a prerelease branch from your current branch: $SOURCE_BRANCH"
exit 1
fi

echo "Updating current branch ($SOURCE_BRANCH)..."
git pull origin $SOURCE_BRANCH || exit 1

echo "Creating prerelease branch from $SOURCE_BRANCH..."
git checkout -b prerelease || exit 1

echo "Copying changelog..."
if [ -f "CHANGELOG.md" ]; then
cp CHANGELOG.md CHANGELOG-PRERELEASE.md || exit 1
git add CHANGELOG-PRERELEASE.md
echo "Committing changelog..."
git commit -m "chore: initialize prerelease changelog from $SOURCE_BRANCH" || exit 1
else
echo "Warning: No CHANGELOG.md found in $SOURCE_BRANCH"
touch CHANGELOG-PRERELEASE.md
git add CHANGELOG-PRERELEASE.md
git commit -m "chore: initialize empty prerelease changelog" || exit 1
fi

echo "Creating release commit..."
git commit --allow-empty -m "chore: release v${VERSION}-rc1
Release-As: v${VERSION}-rc1" || exit 1

echo "Pushing to remote..."
git push origin prerelease || exit 1

echo "Prerelease branch setup complete!"
echo "A release-please PR for v${VERSION}-rc1 should be created shortly."
echo "Source branch was: $SOURCE_BRANCH"
Loading

0 comments on commit 0c87c2f

Please sign in to comment.