Commit 15a0102c authored by iSergio's avatar iSergio
Browse files

Update and fixes

parent 8837c3e0
Loading
Loading
Loading
Loading
Loading
+23 −33
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ cache:
stages:
  - init
  - build
#  - test
  - package
  - deploy

@@ -25,7 +24,7 @@ default:
    - docker
  interruptible: true
  before_script:
    - >
    - |
      if [[ "${CI_COMMIT_TAG}" != ""  ]]; then
        mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${CI_COMMIT_TAG}
        VERSION=${CI_COMMIT_TAG}
@@ -38,11 +37,11 @@ default:
          VERSION=${VERSION}-SNAPSHOT
        fi
      fi
      echo "Version set to "$VERSION

compile:cesiumjs4gwt-main:
  stage: build
  script:
    - mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec
    - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true compile

compile:cesiumjs4gwt-showcase:
@@ -50,11 +49,6 @@ compile:cesiumjs4gwt-showcase:
  script:
    - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-showcase -DskipTests=true compile -am -DskipTests=true

#test:cesiumjs4gwt-main:
#  stage: test
#  script:
#    - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main test

package:cesiumjs4gwt-main:
  stage: package
  only:
@@ -63,9 +57,6 @@ package:cesiumjs4gwt-main:
    - tags
  script:
    - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true package
      #artifacts:
      #paths:
      #- cesiumjs4gwt-main/target/*.jar

deploy:cesiumjs4gwt-main:
  stage: deploy
@@ -99,18 +90,17 @@ deploy:cesiumjs4gwt-showcase:
    - tags
  script:
    - curl https://gis4fun.org/wildfly/wildfly-$WILDFLY_VERSION.tar.gz --output wildfly.tar.gz && tar -zxf wildfly.tar.gz
      - >
    - |
      if [[ "${VERSION}" == *-SNAPSHOT ]]; then
        SUFFIX="-SNAPSHOT"
      else
        SUFFIX=""
      fi
      - EXISTS=`$WILDFLY_BASE_CLI --commands="deployment-info --server-group=main-server-group --name=cesiumjs4gwt-showcase$SUFFIX.war"`
      - >
      echo "SUFFIX IS "$SUFFIX
      EXISTS=`$WILDFLY_BASE_CLI --commands="deployment-info --server-group=main-server-group --name=cesiumjs4gwt-showcase$SUFFIX.war"`
      echo "$EXISTS"
      if [[ $EXISTS = "" ]]; then
          echo "empty"
        $WILDFLY_BASE_CLI --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war --name=cesiumjs4gwt-showcase$SUFFIX.war --server-groups=main-server-group"
      else
          echo "notempty"
        $WILDFLY_BASE_CLI --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war --name=cesiumjs4gwt-showcase$SUFFIX.war --force"
      fi