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

Port patch 6.4.0 -> 7.0.0 #718

Merged
merged 21 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3726b31
Prepare next release 6.4.0-SNAPSHOT
juanfeSanahuja Oct 15, 2024
36fee34
cicd: added if github.event.review.state approved #TASK-7301
juanfeSanahuja Jan 8, 2025
fda2660
Merge pull request #715 from opencb/TASK-7301
juanfeSanahuja Jan 16, 2025
5fa131c
Prepare release 6.4.0
juanfeSanahuja Jan 28, 2025
5249e59
Prepare next release 6.5.0-SNAPSHOT
juanfeSanahuja Jan 28, 2025
7f2166c
Prepare release 6.4.0
juanfeSanahuja Jan 28, 2025
5ca6a83
Prepare release 6.4.0
juanfeSanahuja Jan 28, 2025
ddd0572
pom server: Modify pom.xml to include a classifier for the WAR file, …
juanfeSanahuja Jan 28, 2025
2c24611
pom server: Modify pom.xml to include a classifier for the WAR file, …
juanfeSanahuja Jan 28, 2025
815b18b
pom server: Modify pom.xml to include a classifier for the jar file a…
juanfeSanahuja Jan 29, 2025
2f33bba
Merge branch 'TASK-7362' of github.com:opencb/cellbase into TASK-7362
juanfeSanahuja Jan 29, 2025
abda10e
pom: create server JAR file
imedina Jan 29, 2025
d3236aa
Restore variable CELLBASE.WAR.NAME #TASK-7362
juanfeSanahuja Jan 29, 2025
a7fef92
Merge pull request #716 from opencb/TASK-7362
juanfeSanahuja Jan 29, 2025
9779cfe
Prepare release 6.4.0
juanfeSanahuja Jan 29, 2025
4bd5815
Prepare port patch v6.4.0 -> v7.0.0 #TASK-7214
juanfeSanahuja Feb 6, 2025
0a6beee
Merge branch 'develop' into TASK-7214
juanfeSanahuja Feb 6, 2025
9cd431a
fix merge cicd #TASK-7214
juanfeSanahuja Feb 12, 2025
8b03014
fix merge cicd #TASK-7214
juanfeSanahuja Feb 12, 2025
e054d6a
fix merge cicd #TASK-7214
juanfeSanahuja Feb 12, 2025
cd28cbe
fix merge cicd #TASK-7214
juanfeSanahuja Feb 12, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-approved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh
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 }}"
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }})
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }})
echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY}
echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT
env:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/pull-request-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ on:

jobs:
delete-docker:
uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@develop
with:
cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }}
secrets: inherit
name: Execute delete docker image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '10'
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Delete in Docker Hub
run: |
echo "Deleting docker image ${{ github.head_ref }}"
python3 ./cellbase-app/app/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }}



26 changes: 14 additions & 12 deletions .github/workflows/scripts/get-xetabase-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,36 @@
# Function to calculate the corresponding branch of Xetabase project
get_xetabase_branch() {
# Input parameter (branch name)
input_branch="$1"
target_branch="$1"
current_branch="$2"

# If the branch begins with 'TASK' and exists in the opencga-enterprise repository, I return it
if [[ $input_branch == TASK* ]]; then
if [ "$(git ls-remote "https://[email protected]/zetta-genomics/opencga-enterprise.git" "$input_branch" )" ] ; then
echo $input_branch;
if [[ $current_branch == TASK* ]]; then
if [ "$(git ls-remote "https://[email protected]/zetta-genomics/opencga-enterprise.git" "$current_branch" )" ] ; then
echo "$current_branch";
return 0;
fi
fi

# Check if the branch name is "develop" in that case return the same branch name
if [[ "$input_branch" == "develop" ]]; then
if [[ "$target_branch" == "develop" ]]; then
echo "develop"
return 0
fi

# 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
if [[ "$target_branch" =~ ^release-([0-9]+)\.x\.x$ ]] || [[ "$target_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 4 from MAJOR of cellbase
XETABASE_MAJOR=$((MAJOR - 4))
# Calculate the XETABASE_MAJOR by subtracting 1 from MAJOR of opencga
XETABASE_MAJOR=$((MAJOR - 1))
# Check if the XETABASE_MAJOR is negative
if (( XETABASE_MAJOR < 0 )); then
echo "Error: 'MAJOR' digit after subtraction results in a negative number."
return 1
fi
# Construct and echo the new branch name
echo "release-$XETABASE_MAJOR.${input_branch#release-$MAJOR.}"
echo "release-$XETABASE_MAJOR.${target_branch#release-$MAJOR.}"
return 0
fi

Expand All @@ -41,10 +42,11 @@ get_xetabase_branch() {
}

# Check if the script receives exactly one argument
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <branch-name>"
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <target-branch> <current-branch>"
exit 1
fi


# Call the function with the input branch name
get_xetabase_branch "$1"
get_xetabase_branch "$1" "$2"
Loading