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

Release/2.3.0 #3267

Merged
merged 17 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 0 additions & 20 deletions .github/release-notes.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
changelog:
categories:
- title: Headliners
labels:
- headliner
- title: New Features
labels:
- feature
- title: Enhancements
labels:
- enhancement
- title: Bugs Fixed
labels:
- bug
- title: Documentation
labels:
- documentation
- title: Automation
labels:
- automation
- title: Other changes
labels:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/create-hotfix-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Update versions
run: |
mvn versions:set -DnewVersion=$RELEASE_VERSION -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=revision -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false
sed -i'' -e "s/^gaffer.version=.*/gaffer.version=$RELEASE_VERSION/" rest-api/common-rest/src/main/resources/version.properties
- name: Push to hotfix branch
Expand Down
45 changes: 18 additions & 27 deletions .github/workflows/create-release-branch.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Create Release Branch

on:
workflow_dispatch:
inputs:
version:
description: 'Release Branch Version'
required: false
milestone:
types:
- closed

env:
artifactId: gaffer2
Expand All @@ -23,28 +21,11 @@ jobs:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
fetch-depth: 0

- name: Set version from input
if: ${{ github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ github.event.inputs.version }} | sed 's/^v//')" >> $GITHUB_ENV

- name: Get latest tag
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag

- name: Format latest tag
if: ${{ !github.event.inputs.version }}
run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^gaffer2-//')" >> $GITHUB_ENV

- name: Bump latest tag variable version
if: ${{ !github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ env.CURRENT_VERSION }} | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo \1.$((\2+1)).0/' | sh)" >> $GITHUB_ENV

- name: Verify version regex
run: echo ${{ env.RELEASE_VERSION }} | grep -E '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
- name: Set version from milestone
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }})" >> $GITHUB_ENV

- name: Set release branch
run: echo "BRANCH_NAME=$(echo release/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV
run: echo "BRANCH_NAME=$(echo release/"${{ env.RELEASE_VERSION }}" )" >> $GITHUB_ENV

- name: Set up Github credentials
run: |
Expand All @@ -53,11 +34,21 @@ jobs:

- name: Update versions
run: |
mvn versions:set -DnewVersion=$RELEASE_VERSION -DgenerateBackupPoms=false
sed -i'' -e "s/^gaffer.version=.*/gaffer.version=$RELEASE_VERSION/" rest-api/common-rest/src/main/resources/version.properties
mvn versions:set-property -Dproperty=revision -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false

- name: Push to release branch
run: |
git checkout -b $BRANCH_NAME
git commit -a -m "prepare release $artifactId-$RELEASE_VERSION"
git push --set-upstream origin $BRANCH_NAME

- name: Tag release branch
run: |
git tag gaffer2-$RELEASE_VERSION
git push origin --tags

- name: Create PR to master
run: |
gh pr create -B master -H $BRANCH_NAME --title 'Merge release into master branch' --body 'Created by GH Action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
182 changes: 78 additions & 104 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
name: Full Release

on:
milestone:
types:
- closed
pull_request:
branches:
- master
types: [closed]

env:
artifactId: gaffer2
MAVEN_OPTS: -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25


jobs:
create-release-tag:
deploy-release:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest

outputs:
branch_name: ${{ steps.branch.outputs.branch_name }}
release_version: ${{ steps.release-version.outputs.release_version }}

steps:
- name: Setup JDK
Expand All @@ -36,103 +37,15 @@ jobs:
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set release version
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV

- name: Set branch name
run: echo "BRANCH_NAME=$(git branch -a | grep $RELEASE_VERSION | tail -n 1 | cut -c 18-)" >> $GITHUB_ENV

- name: Output branch name
id: branch
run: echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT

- name: Fail if branch output missing (no branch found)
if: ${{ !steps.branch.outputs.branch_name }}
run: exit 1

- name: Merge release into master
run: |
git checkout ${{ env.BRANCH_NAME }}
git checkout master
git merge ${{ env.BRANCH_NAME }}
- name: Push changes
run: |
git tag $artifactId-$RELEASE_VERSION
git push origin $artifactId-$RELEASE_VERSION
git push
update-develop:
runs-on: ubuntu-latest
needs:
- create-release-tag

steps:
- name: Checkout develop
uses: actions/checkout@v4
with:
ref: develop
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
fetch-depth: 0

- name: Set up Github credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'

- name: Merge release into develop
run: |
git checkout ${{ needs.create-release-tag.outputs.branch_name }}
git checkout develop
git merge ${{ needs.create-release-tag.outputs.branch_name }} --strategy-option theirs
- name: Update develop branch
- name: Output release version
id: release-version
run: |
git checkout develop
mvn release:update-versions -B
NEW_GAFFER_VERSION=$(mvn -q help:evaluate -DforceStdout -Dexpression=pom.version)
sed -i'' -e "s/^gaffer.version=.*/gaffer.version=$NEW_GAFFER_VERSION/" rest-api/common-rest/src/main/resources/version.properties
git commit -a -m "prepare for next development iteration"
git push
update-github-releases:
runs-on: ubuntu-latest
needs:
- create-release-tag

steps:
- name: Checkout Master
uses: actions/checkout@v4
with:
ref: master

- name: Create Release Notes
uses: docker://decathlon/release-notes-generator-action:3.1.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set version
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV

- name: Upload notes
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.artifactId }}-${{ env.RELEASE_VERSION }}
name: Gaffer ${{ env.RELEASE_VERSION }}
body_path: release_file.md
echo "release_version=$(mvn -q help:evaluate -DforceStdout -Dexpression=pom.version)" >> $GITHUB_OUTPUT
generate-javadoc:
runs-on: ubuntu-latest
needs:
- create-release-tag
- deploy-release

steps:
- name: Checkout Master
Expand All @@ -153,7 +66,7 @@ jobs:
java-version: '11'

- name: Set version
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=$(echo ${{ needs.deploy-release.outputs.release_version }})" >> $GITHUB_ENV

- name: Upload Javadoc
run: |
Expand All @@ -173,20 +86,20 @@ jobs:
release-to-nexus:
runs-on: ubuntu-latest
needs:
- create-release-tag
- deploy-release

steps:
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'

- name: Checkout release
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release-tag.outputs.branch_name }}
ref: master

- name: Decode CodeSigning key
env:
CODE_SIGNING_KEY: ${{ secrets.CODE_SIGNING_KEY }}
Expand All @@ -202,4 +115,65 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSS_NEXUS_USERNAME: ${{ secrets.OSS_NEXUS_USERNAME }}
OSS_NEXUS_PASSWORD: ${{ secrets.OSS_NEXUS_PASSWORD }}
run: mvn deploy -P quick,ossrh-release --settings cd/mvnsettings.xml -B
run:
mvn deploy -P quick,ossrh-release --settings cd/mvnsettings.xml -B

update-github-releases:
runs-on: ubuntu-latest
needs:
- deploy-release

steps:
- name: Checkout Master
uses: actions/checkout@v4
with:
ref: master

- name: Set version
run: echo "RELEASE_VERSION=$(echo ${{ needs.deploy-release.outputs.release_version }})" >> $GITHUB_ENV

- name: Create github release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.artifactId }}-${{ env.RELEASE_VERSION }}
name: Gaffer ${{ env.RELEASE_VERSION }}

update-develop:
runs-on: ubuntu-latest
needs:
- deploy-release

steps:
- name: Checkout develop
uses: actions/checkout@v4
with:
ref: develop
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
fetch-depth: 0

- name: Set up Github credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'

- name: Merge master into develop
run: |
git merge origin/master
- name: Update develop branch
run: |
git checkout develop
mvn versions:set-property -Dproperty=revision -DnewVersion=$(echo ${{ needs.deploy-release.outputs.release_version }})-SNAPSHOT
mvn build-helper:parse-version versions:set-property \
-Dproperty=revision \
-DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT
git commit -a -m "prepare for next development iteration"
git push
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 Crown Copyright
# Copyright 2016-2024 Crown Copyright

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,4 +29,5 @@ parquet_data/
**/.vscode
example/real-federated-store/*.properties
example/real-federated-store/*.json
example/real-federated-store/*.jar
example/real-federated-store/*.jar
.flattened-pom.xml
4 changes: 2 additions & 2 deletions core/access/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2020-2023 Crown Copyright
~ Copyright 2020-2024 Crown Copyright
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>uk.gov.gchq.gaffer</groupId>
<version>2.2.2</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading
Loading