diff --git a/.github/workflows/SonarCloud.yml b/.github/workflows/SonarCloud.yml new file mode 100644 index 0000000..96081e4 --- /dev/null +++ b/.github/workflows/SonarCloud.yml @@ -0,0 +1,50 @@ +name: SonarCloud + +on: + push: + branches: + - develop + - master + pull_request: + +jobs: + SonarCloud: + runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name + steps: + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: '' + - run: | + git fetch --prune --unshallow + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Download and install Libs + env: + GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }} + LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }} + run: | + cd lib + gh release download --repo "$LIBS_REPO" 1.0 + ls -lh + sh install-libs-lin.sh + + - name: SonarCloud Scan + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: > + cd clusterAdminLibrary + + mvn -B verify sonar:sonar + -Dsonar.projectKey=YanSergey_OneS_ClusterAdmin + -Dsonar.projectName="OneS ClusterAdmin" + -Dsonar.organization=yansergey + -Dsonar.host.url=https://sonarcloud.io + -Dsonar.login=$SONAR_TOKEN \ No newline at end of file diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 0000000..1b41e8a --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,48 @@ +name: Build Linux + +on: + push: + branches: + - develop + - master + pull_request: + branches: + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Download and install Libs + env: + GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }} + LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }} + run: | + cd lib + gh release download --repo "$LIBS_REPO" 1.0 + ls -lh + sh install-libs-lin.sh + + - name: Install clusterAdmin lib + run: | + cd clusterAdminLibrary + mvn -B clean install -Plinux -DskipTests + + - name: Package Application + run: | + cd clusterAdminApplication + mvn -B clean package -Plinux -DskipTests + + - name: Upload build to artifacts + uses: actions/upload-artifact@master + with: + name: OneS_ClusterAdmin-linux + path: ${{ github.workspace }}/clusterAdminApplication/target/OneS_ClusterAdmin-*-linux.jar \ No newline at end of file diff --git a/.github/workflows/build-macOS.yml b/.github/workflows/build-macOS.yml new file mode 100644 index 0000000..e514b97 --- /dev/null +++ b/.github/workflows/build-macOS.yml @@ -0,0 +1,48 @@ +name: Build MacOS + +on: + push: + branches: + - develop + - master + pull_request: + branches: + +jobs: + build: + runs-on: macOS-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Download and install Libs + env: + GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }} + LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }} + run: | + cd lib + gh release download --repo "$LIBS_REPO" 1.0 + ls -lh + sh install-libs-lin.sh + + - name: Install clusterAdmin lib + run: | + cd clusterAdminLibrary + mvn -B clean install -PmacOS -DskipTests + + - name: Package Application + run: | + cd clusterAdminApplication + mvn -B clean package -PmacOS -DskipTests + + - name: Upload build to artifacts + uses: actions/upload-artifact@master + with: + name: OneS_ClusterAdmin-macOS + path: ${{ github.workspace }}/clusterAdminApplication/target/OneS_ClusterAdmin-*-macOS.jar \ No newline at end of file diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..d48c70a --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,51 @@ +name: Build Windows + +on: + push: + branches: + - develop + - master + pull_request: + branches: + +jobs: + build: + runs-on: windows-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Download and install Libs + env: + GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }} + LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }} + shell: cmd + run: | + cd lib + gh release download --repo "%LIBS_REPO%" 1.0 + dir + install-libs-win.bat + + - name: Install clusterAdmin lib + shell: cmd + run: | + cd clusterAdminLibrary + mvn -B clean install -Pwindows-x86_64 + + - name: Package Application + shell: cmd + run: | + cd clusterAdminApplication + mvn -B clean package -Pwindows-x86_64 + + - name: Upload build to artifacts + uses: actions/upload-artifact@master + with: + name: OneS_ClusterAdmin-windows-x64 + path: ${{ github.workspace }}\clusterAdminApplication\target\OneS_ClusterAdmin-*-windows-x64.jar \ No newline at end of file diff --git a/clusterAdminLibrary/pom.xml b/clusterAdminLibrary/pom.xml index d82dc7f..9b918db 100644 --- a/clusterAdminLibrary/pom.xml +++ b/clusterAdminLibrary/pom.xml @@ -242,15 +242,15 @@ ${basedir}/src/main/java/ru/yanygin/clusterAdminLibrary - true - /ru/yanygin/clusterAdminLibrary + true + ${basedir}/target/classes/ru/yanygin/clusterAdminLibrary **/*.properties ${basedir}/src/main/java/ru/yanygin/clusterAdminLibraryUI - /ru/yanygin/clusterAdminLibraryUI + ${basedir}/target/classes/ru/yanygin/clusterAdminLibraryUI **/*.properties diff --git a/lib/install-libs-lin.sh b/lib/install-libs-lin.sh new file mode 100644 index 0000000..8d6e8cc --- /dev/null +++ b/lib/install-libs-lin.sh @@ -0,0 +1,6 @@ +mvn install:install-file -Dfile=com._1c.v8.core-1.0.30-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.core -Dversion=1.0.30-SNAPSHOT -Dpackaging=jar +mvn install:install-file -Dfile=com._1c.v8.ibis.admin-1.6.7.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.ibis.admin -Dversion=1.6.7 -Dpackaging=jar +mvn install:install-file -Dfile=com._1c.v8.ibis.swp-1.1.1-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.ibis.swp -Dversion=1.1.1-SNAPSHOT -Dpackaging=jar +mvn install:install-file -Dfile=com._1c.v8.ibis-1.1.1-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.ibis -Dversion=1.1.1-SNAPSHOT -Dpackaging=jar +mvn install:install-file -Dfile=com._1c.v8.swp.netty-1.0.3-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.swp.netty -Dversion=1.0.3-SNAPSHOT -Dpackaging=jar +mvn install:install-file -Dfile=com._1c.v8.swp-1.0.3-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.swp -Dversion=1.0.3-SNAPSHOT -Dpackaging=jar diff --git a/lib/install-libs.bat b/lib/install-libs-win.bat similarity index 100% rename from lib/install-libs.bat rename to lib/install-libs-win.bat