Skip to content

Commit

Permalink
Merge pull request #91 from opencb/TASK-6879
Browse files Browse the repository at this point in the history
TASK-6879 - Adapt GitHub Actions, CICD workflows and release scripts to new SDLC
  • Loading branch information
juanfeSanahuja authored Sep 19, 2024
2 parents 864b1d4 + a1efd8f commit 9c1bb4a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-approved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}"
echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}"
echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}"
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }})
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }})
echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY}
echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scripts/get-xetabase-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ get_xetabase_branch() {
return 0
fi

# Check if the branch name starts with "release-" and follows the patterns "release-a.b.x" or "release-a.b.c.x"
if [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.x$ ]] || [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.([0-9]+)\.x$ ]]; then
# Check if the branch name starts with "release-" and follows the patterns "release-a.x.x" or "release-a.b.x"
if [[ "$input_branch" =~ ^release-([0-9]+)\.x\.x$ ]] || [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.x$ ]]; then
# Extract the MAJOR part of the branch name
MAJOR=${BASH_REMATCH[1]}
# Calculate the XETABASE_MAJOR by subtracting 3 from MAJOR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull request approve workflow
name: TMP test-xetabase-branch
run-name: 'Pull request approve workflow ${{ github.event.pull_request.head.ref }} -> ${{ github.event.pull_request.base.ref }} by @${{ github.actor }}'

on:
Expand All @@ -23,16 +23,16 @@ jobs:
- id: get_xetabase_branch
name: "Get current branch for Xetabase from target branch"
run: |
if [ "$( git ls-remote https://[email protected]/opencb/opencga.git "TASK-6807" )" ] ; then
echo "OPENCGA TASK-6807 branch";
if [ "$( git ls-remote https://[email protected]/opencb/opencga.git "TASK-6879" )" ] ; then
echo "OPENCGA TASK-6879 branch";
fi
if [ "$( git ls-remote https://[email protected]/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then
echo "Here it is TASK-6807 branch";
fi
chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh
echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" | tee -a ${GITHUB_STEP_SUMMARY}
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" )
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6879" )
echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY}
echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT
env:
Expand All @@ -44,5 +44,5 @@ jobs:
uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop
with:
branch: ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }}
task: TASK-6807
task: TASK-6879
secrets: inherit
2 changes: 1 addition & 1 deletion commons-datastore/commons-datastore-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opencb.commons</groupId>
<artifactId>commons-datastore</artifactId>
<version>5.2.2-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion commons-datastore/commons-datastore-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opencb.commons</groupId>
<artifactId>commons-datastore</artifactId>
<version>5.2.2-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion commons-datastore/commons-datastore-solr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.opencb.commons</groupId>
<artifactId>commons-datastore</artifactId>
<version>5.2.2-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion commons-datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opencb.commons</groupId>
<artifactId>commons</artifactId>
<version>5.2.2-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion commons-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opencb.commons</groupId>
<artifactId>commons</artifactId>
<version>5.2.2-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.opencb.commons</groupId>
<artifactId>commons</artifactId>
<version>5.2.2-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>OpenCB commons project</name>
Expand Down

0 comments on commit 9c1bb4a

Please sign in to comment.