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

Remove v2-alpha from workflows #2939

Merged
merged 2 commits into from
Apr 25, 2023
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
3 changes: 2 additions & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
branches:
- 'release/**'
- 'hotfix/**'
- 'alpha-release/**'
- develop
- master

jobs:
analyse:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
branches:
- 'release/**'
- 'hotfix/**'
- 'alpha-release/**'
- develop
- master

jobs:
build-then-run-tests:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
branches:
- 'release/**'
- 'hotfix/**'
- 'alpha-release/**'
- develop
t92549 marked this conversation as resolved.
Show resolved Hide resolved
- master

jobs:
check-all-modules-are-tested:
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/create-alpha-release-branch.yaml

This file was deleted.

46 changes: 10 additions & 36 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,17 @@ jobs:
if: ${{ !env.BRANCH_NAME }}
run: exit 1

- name: Set alpha master branch
if: ${{ startsWith( env.BRANCH_NAME , 'alpha') }}
run: echo "MASTER_BRANCH=v2-alpha" >> $GITHUB_ENV

- name: Set master branch
if: ${{ !startsWith( env.BRANCH_NAME , 'alpha') }}
run: echo "MASTER_BRANCH=master" >> $GITHUB_ENV

- name: Checkout master
uses: actions/checkout@v2
with:
ref: ${{ env.MASTER_BRANCH }}
ref: master
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
fetch-depth: 0

- name: Merge release into master
run: |
git checkout ${{ env.BRANCH_NAME }}
git checkout ${{ env.MASTER_BRANCH }}
git checkout master
git merge ${{ env.BRANCH_NAME }}

- name: Push changes
Expand All @@ -83,14 +75,6 @@ jobs:
- create-release-tag

steps:
- name: Set develop branch
if: ${{ !startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}
run: echo "DEVELOP_BRANCH=develop" >> $GITHUB_ENV

- name: Set v2-alpha branch
if: ${{ startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}
run: echo "DEVELOP_BRANCH=v2-alpha" >> $GITHUB_ENV

- name: Checkout develop
uses: actions/checkout@v2
with:
Expand All @@ -109,17 +93,15 @@ jobs:
distribution: 'zulu'
java-version: '8'

# Skip if alpha release
- name: Merge release into develop
if: ${{ !startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}
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 appropriate development branch
- name: Update develop branch
run: |
git checkout ${{ env.DEVELOP_BRANCH }}
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
Expand Down Expand Up @@ -153,14 +135,11 @@ jobs:
tag_name: ${{ env.artifactId }}-${{ env.RELEASE_VERSION }}
name: Gaffer ${{ env.RELEASE_VERSION }}
body_path: release_file.md
prerelease: ${{ startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}

# Skip if alpha release
generate-javadoc:
runs-on: ubuntu-latest
needs:
- create-release-tag
if: ${{ !startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}

steps:
- name: Checkout Master
Expand All @@ -178,7 +157,7 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '8'
java-version: '11'

- name: Set version
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV
Expand All @@ -188,9 +167,12 @@ jobs:
git remote set-branches --add origin gh-pages
git pull
mvn -q clean install -Pquick -Dskip.jar-with-dependencies=true -Dshaded.jar.phase=true
mvn -q javadoc:javadoc -Pquick
rm -rf integration-test/src/main/*
mvn -q javadoc:aggregate
git checkout gh-pages
rm -rf uk
rm -rf jquery
rm -rf resources
mv target/site/apidocs/* .
git add .
git commit -a -m "Updated javadoc - $RELEASE_VERSION"
Expand Down Expand Up @@ -239,19 +221,11 @@ jobs:
- name: Set version
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV

- name: Set develop branch
if: ${{ !startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}
run: echo "DEVELOP_BRANCH=develop" >> $GITHUB_ENV

- name: Set v2-alpha branch
if: ${{ startsWith( needs.create-release-tag.outputs.branch_name , 'alpha') }}
run: echo "DEVELOP_BRANCH=v2-alpha" >> $GITHUB_ENV

- name: Update gaffer-tools' Gaffer version
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Update Gaffer Version
repo: gchq/gaffer-tools
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
inputs: '{ "version": "${{ env.RELEASE_VERSION }}" }'
ref: ${{ env.DEVELOP_BRANCH }}
ref: develop