Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Feb 20, 2023
2 parents 6a6bba9 + 586073b commit e85e3ba
Show file tree
Hide file tree
Showing 46 changed files with 471 additions and 406 deletions.
111 changes: 15 additions & 96 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,114 +10,33 @@ on:
jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase

test:
name: CellBase Test
runs-on: ubuntu-20.04
uses: opencb/cellbase/.github/workflows/test-analysis.yml@develop
needs: build
strategy:
matrix:
mongodb: ["4.2"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '10'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Start MongoDB v${{ matrix.mongodb }}
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb }}
mongodb-replica-set: rs-test
- name: Build with Maven
run: mvn -T 2 clean install -DskipTests -Dcheckstyle.skip

sonar:
uses: opencb/java-common-libs/.github/workflows/sonar-analysis-workflow.yml@develop
needs: test
with:
sonarProjectKey: opencb_cellbase
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
secrets: inherit
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SSH_TESTING_SERVER_HOST: ${{ secrets.SSH_TESTING_SERVER_HOST}}
# SSH_TESTING_SERVER_PORT: ${{ secrets.SSH_TESTING_SERVER_PORT}}
# SSH_TESTING_SERVER_USER: ${{ secrets.SSH_TESTING_SERVER_USER }}
# SSH_TESTING_SERVER_PASSWORD: ${{ secrets.SSH_TESTING_SERVER_PASSWORD }}

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase
secrets:
MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
secrets: inherit
# MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
# MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

deploy-docker:
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
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

# deploy:
# name: Build and Deploy CellBase libs, Javadocs and Docker images in Maven Central and DockerHub repositories
# runs-on: ubuntu-20.04
# needs: test
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: '10'
# - name: Set up JDK 1.8
# uses: actions/setup-java@v1
# with:
# java-version: 1.8
# server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
# server-username: MAVEN_NEXUS_USER # env variable for username in deploy
# server-password: MAVEN_NEXUS_PASSWORD # env variable for token in deploy
#
# ## IMPORTANT: this creates the 'build' installation folder and must be the FIRST action!
# ## Deploy in Maven repository
# - name: Copy GPG Private key
# run: echo "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" > private-key.txt && gpg --import --no-tty --batch --yes private-key.txt
# - name: Deploy to Maven Central respository
# env:
# MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
# MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
# run: mvn clean deploy -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} -DskipTests -P deploy
#
# ## making requests via Python needs special package
# - name: Install Python package
# run: pip3 install requests
#
# ## Build and deploy Docker images to DockerHub
# - name: Login to dockerhub
# run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
# - name: Build and publish Docker images to DockerHub
# run: python3 ./build/cloud/docker/docker-build.py push
#
# ## Generate and deploy Javadocs
# - name: Get CellBase version
# id: get_version
# run: echo ::set-output name=VERSION::$(grep '<cellbase.version>' pom.xml | sed 's/cellbase.version//g' | sed 's/[<>/ ]//g')
# - name: Generate Javadocs
# run: mvn javadoc:aggregate
# - name: Deploy to server
# id: deploy
# uses: Pendect/[email protected]
# env:
# DEPLOY_KEY: ${{secrets.SCP_PRIVATE_KEY}}
# with:
# flags: '-avzr --delete'
# options: ''
# ssh_options: ''
# src: 'target/site/apidocs/*'
# dest: '${{ secrets.SCP_SITE_USER }}@128.232.224.128:/mnt/resources/opencb/cellbase/javadocs/${{ steps.get_version.outputs.VERSION }}'
# - name: Display status from deploy
# run: echo "${{ steps.deploy.outputs.status }}"
secrets: inherit
# DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
# DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
18 changes: 18 additions & 0 deletions .github/workflows/pull-request-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Merge Workflow"

on:
pull_request:
branches:
- "develop"
- "release-*"
types:
- closed

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:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
173 changes: 18 additions & 155 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,184 +9,47 @@ on:
jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase

test:
name: CellBase Test
runs-on: ubuntu-20.04
uses: opencb/cellbase/.github/workflows/test-analysis.yml@develop
needs: build
strategy:
matrix:
mongodb: ["4.2"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '10'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Start MongoDB v${{ matrix.mongodb }}
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb }}
mongodb-replica-set: rs-test
- name: Build with Maven
run: mvn -T 2 clean install -DskipTests -Dcheckstyle.skip

sonar:
uses: opencb/java-common-libs/.github/workflows/sonar-analysis-workflow.yml@develop
needs: test
with:
sonarProjectKey: opencb_cellbase
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
secrets: inherit
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SSH_TESTING_SERVER_HOST: ${{ secrets.SSH_TESTING_SERVER_HOST}}
# SSH_TESTING_SERVER_PORT: ${{ secrets.SSH_TESTING_SERVER_PORT}}
# SSH_TESTING_SERVER_USER: ${{ secrets.SSH_TESTING_SERVER_USER }}
# SSH_TESTING_SERVER_PASSWORD: ${{ secrets.SSH_TESTING_SERVER_PASSWORD }}

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase
secrets:
MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
secrets: inherit
# MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
# MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

deploy-docker:
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
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
secrets: inherit
# DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
# DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

deploy-python:
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@develop
needs: test
with:
cli: bash ./clients/python/python-build.sh push
artifact: build-folder
secrets:
PYPI_TWINE_USER: ${{ secrets.PYPI_TWINE_USER }}
PYPI_TWINE_PASSWORD: ${{ secrets.PYPI_TWINE_PASSWORD }}
secrets: inherit
# PYPI_TWINE_USER: ${{ secrets.PYPI_TWINE_USER }}
# PYPI_TWINE_PASSWORD: ${{ secrets.PYPI_TWINE_PASSWORD }}

release:
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@develop
needs: [deploy-maven, deploy-docker, deploy-python]

# deploy:
# name: Build and deploy CellBase libs, Java docs and Docker images in Maven Central and DockerHub repositories
# runs-on: ubuntu-18.04
## needs: test
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: '10'
# - name: Set up JDK 1.8
# uses: actions/setup-java@v1
# with:
# java-version: 1.8
# server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
# server-username: MAVEN_NEXUS_USER # env variable for username in deploy
# server-password: MAVEN_NEXUS_PASSWORD # env variable for token in deploy
#
# ## IMPORTANT: this creates the 'build' installation folder and must be the FIRST action!
# ## Deploy in Maven repository
# - name: Copy GPG Private key
# run: echo "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" > private-key.txt && gpg --import --no-tty --batch --yes private-key.txt
# - name: Deploy to Maven Central respository
# env:
# MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
# MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
# run: mvn clean deploy -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} -DskipTests -DCELLBASE.WAR.NAME=cellbase -P deploy
#
# ## set tag name
# - name: Get tag
# id: get_tag
# run: echo ::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//}
#
# ## Build and deploy Docker images to DockerHub
# - name: Login to dockerhub
# run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
# - name: Build and publish Docker images to DockerHub
# run: python3 ./build/cloud/docker/docker-build.py push --tag ${{ steps.get_tag.outputs.TAG_NAME }}
#
# ## Delete snapshot
# - name: Delete SNAPSHOT image on dockerhub, if present
# env:
# SNAPSHOT_TAG: "${{ steps.get_tag.outputs.TAG_NAME }}-SNAPSHOT"
# run: python3 ./build/cloud/docker/docker-build.py delete --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD}} --tag ${SNAPSHOT_TAG}
#
# ## Publish GitHub release
# - name: Create GitHub Release
# id: create_release
# uses: actions/create-release@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# See http://docs.opencb.org/display/cellbase/Release+Notes for the full list of features and fixes in this release.
# draft: false
# prerelease: false
#
# ## Tar the build directory
# - name: zip
# id: zip
# run: tar -zcf cellbase-${{ steps.get_tag.outputs.TAG_NAME }}.tar.gz build --transform s/build/cellbase-${{ steps.get_tag.outputs.TAG_NAME }}/
#
# ## Upload tarball
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./cellbase-${{ steps.get_tag.outputs.TAG_NAME }}.tar.gz
# asset_name: cellbase-${{ steps.get_tag.outputs.TAG_NAME }}.tar.gz
# asset_content_type: application/tar+gzip

# site:
# name: Generate Maven site
# runs-on: ubuntu-18.04
# needs: build
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: '10'
# - name: Set up JDK 1.8
# uses: actions/setup-java@v1
# with:
# java-version: 1.8
# - name: Generate Site with Maven CLI
# run: mvn site
# - name: Prepare Maven Site submodules
# run: cp -r cellbase-app/target/site target/site/cellbase-app &&
# cp -r cellbase-client/target/site target/site/cellbase-client &&
# cp -r cellbase-core/target/site target/site/cellbase-core &&
# cp -r cellbase-lib/target/site target/site/cellbase-lib &&
# cp -r cellbase-server/target/site target/site/cellbase-server
# - name: Get CellBase version
# id: get_version
# run: echo ::set-output name=VERSION::$(grep '<cellbase.version>' pom.xml | sed 's/cellbase.version//g' | sed 's/[<>/ ]//g')
# - name: Get current date in YYMMDD format
# id: get_date
# run: echo ::set-output name=YYMMDD::$(date +%Y%m%d)
# - name: Get current date in HHMMSS format
# id: get_time
# run: echo ::set-output name=HHMMSS::$(date +%H%M%S)
# - name: Deploy Site web recursively to remote
# uses: garygrossgarten/github-action-scp@release
# with:
# local: target/site
# remote: /mnt/resources/opencb/cellbase/site/${{ steps.get_tag.outputs.TAG_NAME }}/${{ steps.get_date.outputs.YYMMDD }}/${{ steps.get_time.outputs.HHMMSS }}-${{ github.sha }}
# host: 128.232.224.128
# username: ${{ secrets.SCP_SITE_USER }}
# password: ${{ secrets.SCP_SITE_PASSWORD }}
Loading

0 comments on commit e85e3ba

Please sign in to comment.