#Trying to set up the CI, probably won't work image: gradle:jdk13 stages: - build - test - code_quality - deploy - hopeItWorks #Sets up the docker smarthut_deploy: stage: deploy image: docker:latest services: - docker:dind variables: DOCKER_DRIVER: overlay before_script: - docker version - docker info - docker login -u smarthutsm -p $CI_DOCKER_PASS #GiovanniRoberto script: - "docker build -t smarthutsm/smarthut:${CI_COMMIT_BRANCH} --pull ." - "docker push smarthutsm/smarthut:${CI_COMMIT_BRANCH}" after_script: - docker logout #base checks for the code build: stage: build script: - gradle clean - gradle assemble artifacts: paths: - build/libs/*.jar expire_in: 1 week #Runs the various tests and creates a report on the test coverage test: stage: test script: - gradle test artifacts: when: always paths: - build/test-results/test/TEST-*.xml reports: junit: build/test-results/test/TEST-*.xml # after_script: # - npm junit-viewer --results=/home/git/gitlab/shared/artifacts/build/test-results/test --port=3000 #Runs a quality check on the code and creates a report on the codes code_quality: stage: code_quality script: - gradle cpdCheck artifacts: paths: - build/reports/cpd/cpdCheck.xml #create a report on the quality of the code expose_as: 'Code Quality Report' allow_failure: true Robe: stage: hopeItWorks script: - curl -L