Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Add fishbowl to update version workflow #1033

Merged
merged 1 commit into from
Oct 17, 2022
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
46 changes: 27 additions & 19 deletions .github/workflows/update-gaffer-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,40 @@ jobs:
VERSION_UPDATE_BRANCH: updating-gaffer-version-${{ github.event.inputs.version }}

steps:
- name: Checkout branch
uses: actions/checkout@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}

- name: Get branch name
run: echo "SOURCE_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV

- name: Set up Github credentials
run: |
git config user.name Gaffer
git config user.email [email protected]
- name: Checkout base branch
uses: actions/checkout@v3

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

- name: Update Gaffer Version
run: ./cd/updateGafferVersion.sh ${{ github.event.inputs.version }}
run: |
mvn -q org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.parent.version
oldVersion=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.parent.version | grep -v '\['`
newVersion=${{ github.event.inputs.version }}

sed -i'' "s#version>$oldVersion<#version>$newVersion<#g" pom.xml
sed -i'' "s#gaffer2:$oldVersion#gaffer2:$newVersion#g" NOTICES

sed -i'' "s#__version__ = \"$oldVersion\"#__version__ = \"$newVersion\"#g" python-shell/__init__.py
sed -i'' "s#__version__ = \"$oldVersion\"#__version__ = \"$newVersion\"#g" python-shell/src/__init__.py
sed -i'' "s#__version__ = \"$oldVersion\"#__version__ = \"$newVersion\"#g" python-shell/src/*/__init__.py

- name: Update gafferpy
run: |
newVersion=${{ github.event.inputs.version }}
curl -o spring-rest.jar https://repo.maven.apache.org/maven2/uk/gov/gchq/gaffer/spring-rest/$newVersion/spring-rest-$newVersion-exec.jar
java -Dgaffer.schemas=ui/example/road-traffic/schema/ -Dgaffer.storeProperties=ui/example/federated/federatedStore.properties -Dgaffer.graph.config=ui/example/federated/graphConfig.json -jar spring-rest.jar &
sleep 1m
python python-shell/src/generate.py
rm spring-rest.jar
GCHQDeveloper314 marked this conversation as resolved.
Show resolved Hide resolved

- name: Submit PR
if: ${{ success() }}
uses: repo-sync/pull-request@v2
uses: peter-evans/create-pull-request@v4
GCHQDeveloper314 marked this conversation as resolved.
Show resolved Hide resolved
with:
source_branch: ${{ env.VERSION_UPDATE_BRANCH }}
destination_branch: ${{ env.SOURCE_BRANCH }}
github_token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
title: Updated Gaffer version to ${{ github.event.inputs.version }}
commit-message: Updated Gaffer version to ${{ github.event.inputs.version }}
branch: ${{ env.VERSION_UPDATE_BRANCH }}
35 changes: 0 additions & 35 deletions cd/updateGafferVersion.sh

This file was deleted.