Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Release/orca #686

Merged
merged 20 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
78673aa
feat: CE-1046 create a read only level of access for nat com (#650)
barrfalk Sep 24, 2024
3f96ea0
feat: CE-1014 update web eoc filter to include complaints with a viol…
barrfalk Sep 24, 2024
7ecb5c1
chore(deps): update postgis/postgis:15-master docker digest to c1288c…
renovate[bot] Sep 24, 2024
f93511d
chore: CE-951 CEEB user data load (#655)
afwilcox Sep 24, 2024
c05bd2d
feat: CE-936 Add privacy indication field to complaint (#647)
marqueone-ps Sep 24, 2024
88e46d2
feat: CE-1067 (#661)
barrfalk Sep 25, 2024
9b88dc4
feat: CE-1064 Hide ‘Office’ field on the CEEB forms (#659)
marqueone-ps Sep 25, 2024
54186d8
feat: CE-1035 Update lead agency field in CEEB decision (#654)
Scarlett-Truong Sep 26, 2024
6b20580
fix: CE-1100 Map view not displaying correct complaints for ceeb user…
marqueone-ps Sep 26, 2024
ccc837d
feat: CE-1066 update rationale to text field (#652)
Scarlett-Truong Sep 26, 2024
d8d8e0a
chore: CE-1083 High Vulnerabilities (#662)
afwilcox Sep 27, 2024
aedce24
fix: CE-1047 'Select office' field on admin screen includes multiples…
marqueone-ps Sep 27, 2024
c94398e
fix: Recreated CE-1054 directly on the Orca release avoiding the reba…
gregorylavery Sep 27, 2024
99acf57
feat: CE-1044-Add-Method-complaint-was-received-as-a-filter-option-fo…
dmitri-korin-bcps Sep 28, 2024
dbc31a9
fix: Ce 1112 (#679)
gregorylavery Oct 1, 2024
62c3d63
feat: CE-882 versioning on prod releasesv2 (#668)
barrfalk Oct 1, 2024
dc3a466
feat: CE-111: CEEB users brought to 'Access Denied' page when followi…
barrfalk Oct 2, 2024
12bd0d4
fix: CE-897 incorrect value in tab map view (#682)
Scarlett-Truong Oct 2, 2024
0f8cb64
Merge branch 'main' into release/orca
barrfalk Oct 3, 2024
e68448a
fix: Pipeline fix (#687)
barrfalk Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,36 @@ jobs:
- name: Set PR Output
run: echo "pr=${{ steps.pr.outputs.pr }}" >> $GITHUB_OUTPUT

create_release:
name: Create GitHub Release (Keep Version)
runs-on: ubuntu-22.04
strategy:
matrix:
package: [backend, frontend, webeoc]
steps:
- uses: actions/checkout@v4

# Retrieve the latest tag (from the release branch)
- name: Get Latest Tag
id: tag
run: |
git fetch --tags
latest_tag=$(git describe --tags --abbrev=0 --match "v*.*.*")
echo "::set-output name=latest_tag::$latest_tag"
echo "Latest tag: $latest_tag"

# Create GitHub Release using the last tag
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.latest_tag }}
name: Release ${{ steps.tag.outputs.latest_tag }}
body: |
## Changes in this release:
- New features and bug fixes.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-prod:
name: Deploy (prod)
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: PR

on:
pull_request:
branches:
- release/**

concurrency:
# Cancel in progress for PR open and close
Expand All @@ -20,7 +22,6 @@ jobs:
steps:
- uses: bcgov-nr/action-builder-ghcr@v2.2.0
with:
keep_versions: 50
package: ${{ matrix.package }}
tag: ${{ github.event.number }}
tag_fallback: latest
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/pr-version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Handle PR Merge and Version Update

on:
pull_request:
types: [closed]
branches:
- release/**
jobs:
handle_pr:
name: Handle Merged PR
runs-on: ubuntu-22.04
if: ${{ github.event.pull_request.merged == true }}
steps:
- uses: actions/checkout@v4

- name: Fetch all tags
run: git fetch --tags --force

- name: Fetch tags from main
id: get_latest_tag
run: |
git fetch origin main --tags
latest_tag=$(git describe --tags --abbrev=0 origin/main)
echo "::set-output name=latest_tag::$latest_tag"
echo "Latest tag: $latest_tag"

- name: Increment Patch Version
id: increment_version
run: |
latest_tag=${{ steps.get_latest_tag.outputs.latest_tag }}
version_array=(${latest_tag//./ })
patch_version=${version_array[2]}
new_patch_version=$((patch_version + 1))
new_version="${version_array[0]}.${version_array[1]}.${new_patch_version}"
echo "::set-output name=new_version::$new_version"
echo "New version: $new_version"

- name: Update package.json versions
run: |
cd frontend
npm version ${{ steps.increment_version.outputs.new_version }} --no-git-tag-version
echo "Frontend package.json version updated to ${{ steps.increment_version.outputs.new_version }}"

cd ../backend
npm version ${{ steps.increment_version.outputs.new_version }} --no-git-tag-version
echo "Backend package.json version updated to ${{ steps.increment_version.outputs.new_version }}"

cd ../webeoc
npm version ${{ steps.increment_version.outputs.new_version }} --no-git-tag-version
echo "WebEOC package.json version updated to ${{ steps.increment_version.outputs.new_version }}"

cd ..

- name: Commit and Push Version Update
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add frontend/package.json backend/package.json webeoc/package.json
git commit -m "chore: bump version to ${{ steps.increment_version.outputs.new_version }}"
git push origin HEAD:refs/heads/${{ github.head_ref }}

- name: Create Git Tag
run: |
git tag "${{ steps.increment_version.outputs.new_version }}"
git push origin "${{ steps.increment_version.outputs.new_version }}"
50 changes: 50 additions & 0 deletions .github/workflows/release-branch-creation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create New Tag on Release Branch Creation

on:
create:

jobs:
bump_minor_version:
name: Bump Minor Version and Create New Tag
runs-on: ubuntu-22.04
# Only trigger for main release branches
if: startsWith(github.ref, 'refs/heads/release/') && !contains(github.ref, '/')
steps:
- uses: actions/checkout@v4

- name: Install npm
run: sudo apt-get install -y npm

# Fetch the latest tag (sort by creation date)
- name: Fetch latest tag
id: latest_tag
run: |
git fetch --tags
latest_tag=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
if [ -z "$latest_tag" ]; then
echo "No previous tags found, starting with v0.1.0"
latest_tag="v0.0.0"
fi
echo "::set-output name=latest_tag::$latest_tag"
echo "Latest tag: $latest_tag"

# Bump the minor version and reset the patch to 0
- name: Bump minor version
id: bump_version
run: |
latest_tag="${{ steps.latest_tag.outputs.latest_tag }}"
version_array=(${latest_tag//./ })
major_version=${version_array[0]//v/}
minor_version=${version_array[1]}
patch_version=${version_array[2]}
new_minor_version=$((minor_version + 1))
new_version="v${major_version}.${new_minor_version}.0"
echo "::set-output name=new_version::$new_version"
echo "New version: $new_version"

# Create a new tag with the bumped minor version
- name: Create and push the new tag
run: |
new_version="${{ steps.bump_version.outputs.new_version }}"
git tag "$new_version"
git push origin "$new_version"
Loading
Loading