Skip to content

Commit

Permalink
Merge branch 'release-2.12.x' into TASK-5279
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Nov 21, 2023
2 parents 3d309d4 + 812ccba commit e2064fc
Show file tree
Hide file tree
Showing 161 changed files with 4,537 additions and 1,708 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check-junit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ jobs:
uses: ./.github/workflows/test-analysis.yml
with:
test_profile: ${{ needs.get_profiles.outputs.profiles }}
report_context: development
mvn_opts: ${{ inputs.mvn_opts }}
secrets: inherit
18 changes: 5 additions & 13 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,26 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

deploy-docker-ext-tools:
uses: opencb/java-common-libs/.github/workflows/[email protected]
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ needs.build.outputs.version }}
secrets: inherit

test:
uses: ./.github/workflows/test-analysis.yml
needs: deploy-docker-ext-tools
secrets: inherit
needs: build
with:
test_profile: runShortTests,runMediumTests
report_context: development
secrets: inherit

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -P storage-hadoop,hdp3.1 -Dopencga.war.name=opencga
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: test
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/docker-aws-emr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,emr6.1 -Dopencga.war.name=opencga

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init
secrets: inherit
# DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
# DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Docker Tools
name: Deploy Docker Ext-Tools

on:
push:
Expand All @@ -8,17 +8,14 @@ on:
- TASK-*
paths:
- opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile
workflow_dispatch:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/[email protected]
with:
maven_opts:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop

deploy-docker-ext-tools:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ needs.build.outputs.version }}
secrets: inherit
secrets: inherit
8 changes: 5 additions & 3 deletions .github/workflows/long-test-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: Long test for run only on weekend

#Every Saturday at 01:10

## Every Saturday at 01:10
on:
schedule:
- cron: '10 1 * * 6'
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/test-analysis.yml
secrets: inherit
with:
test_profile: runLongTests,runMediumTests,runShortTests
report_context: development
test_profile: runShortTests,runMediumTests,runLongTests,


50 changes: 50 additions & 0 deletions .github/workflows/manual-deploy-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Manual deploy Docker base
on:
workflow_dispatch:
inputs:
branch:
description: "The branch, tag or SHA of the source code to build docker."
type: string
required: true
tag:
description: "The tag for the new docker."
type: string
required: true

jobs:
build:
name: Build Java app
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.get_project_version.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '10'
ref: "${{ inputs.branch }}"
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Install dependencies branches
run: |
if [ -f "./.github/workflows/scripts/get_same_branch.sh" ]; then
chmod +x ./.github/workflows/scripts/get_same_branch.sh
./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }}
fi
- name: Maven Build (skip tests)
run: mvn -T 2 clean install -DskipTests
- uses: actions/upload-artifact@v3
with:
name: build-folder
path: build


deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init --tag ${{ inputs.tag }}
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/manual-deploy-ext-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ jobs:
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ inputs.tag }}
secrets: inherit

20 changes: 13 additions & 7 deletions .github/workflows/pull-request-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ on:
- "release-*"
types:
- closed
workflow_dispatch:

jobs:
docker-delete:
name: Delete TASK Docker image
runs-on: ubuntu-22.04
steps:
- name: "Checkout opencga"
uses: actions/checkout@v3
- run: python3 ./opencga-app/app/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

delete-docker:
uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }}
secrets: inherit

36 changes: 10 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,38 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

deploy-docker-ext-tools:
uses: opencb/java-common-libs/.github/workflows/[email protected]
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ needs.build.outputs.version }}
secrets: inherit

test:
uses: ./.github/workflows/test-analysis.yml
needs: deploy-docker-ext-tools
secrets: inherit
with:
test_profile: runShortTests,runMediumTests
report_context: xetabase

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@release-4.8.x
needs: test
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: build
with:
maven_opts: -P storage-hadoop,hdp3.1 -Dopencga.war.name=opencga
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x
needs: test
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init
secrets: inherit



deploy-python:
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@release-4.8.x
needs: test
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@develop
needs: build
with:
cli: ./clients/python/python-build.sh push
artifact: build-folder
secrets: inherit

release:
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@release-4.8.x
needs: [ build,test ]
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@develop
needs: [ build, deploy-maven, deploy-docker, deploy-python ]
with:
artifact: build-folder
file: |
opencga-client-${{ needs.build.outputs.version }}.tar.gz
clients/R/opencgaR_${{ needs.build.outputs.version }}.tar.gz
30 changes: 30 additions & 0 deletions .github/workflows/scripts/get_same_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

BRANCH_NAME=$1

if [[ -z $BRANCH_NAME ]]; then
echo "The first parameter is mandatory and must be a valid branch name."
exit 1
fi

if [[ $BRANCH_NAME != "TASK-"* ]]; then
echo "No need to check dependencies."
exit 0
fi

function install(){
local REPO=$1
cd /home/runner/work/ || exit 2
git clone https://github.com/opencb/"$REPO".git -b "$BRANCH_NAME"
if [ -d "./$REPO" ]; then
cd "$REPO" || exit 2
echo "Branch name $BRANCH_NAME already exists."
mvn clean install -DskipTests
else
echo "$CURRENT Branch is NOT EQUALS $BRANCH_NAME "
fi
}

install "java-common-libs"
install "biodata"
install "cellbase"
33 changes: 4 additions & 29 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ on:
- TASK-*
workflow_dispatch:

# WARNING Develop branch needed for prod

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

Expand All @@ -18,37 +20,10 @@ jobs:
secrets: inherit
with:
test_profile: runShortTests
report_context: development

deploy-maven:
name: Deploy in maven only for renamed versions
uses: opencb/java-common-libs/.github/workflows/[email protected]
needs: [ build, test ]
if: contains( needs.build.outputs.version ,'TASK')
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: test
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init --tag ${{ github.ref_name }}
secrets: inherit

# The following jobs are to see that the previous 'if' doesn't fail and that the maven deploy is executed because it is true
snapshot-version:
name: Check SNAPSHOT version
needs: [ build, test ]
if: contains(needs.build.outputs.version ,'SNAPSHOT')
runs-on: ubuntu-22.04
steps:
- name: test-version-from-check
run: echo "Project version is " ${{ needs.build.outputs.version }}

task-version:
name: Check TASK version
needs: [ build, test ]
if: contains(needs.build.outputs.version ,'TASK')
runs-on: ubuntu-22.04
steps:
- name: test-version-from-check
run: echo "Project version is " ${{ needs.build.outputs.version }}
Loading

0 comments on commit e2064fc

Please sign in to comment.