From e5d3c95f3e428a1b8d61f85865a1d3612ad74908 Mon Sep 17 00:00:00 2001 From: Jacob Salvi Date: Thu, 9 Apr 2020 14:01:40 +0200 Subject: [PATCH] Added curtains --- .gitlab-ci.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75fbcfc..ba82901 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,12 +6,13 @@ stages: - test - code_quality - deploy - - hopeItWorks #Sets up the docker smarthut_deploy: stage: deploy image: docker:latest + tags: + - dind services: - docker:dind variables: @@ -21,11 +22,13 @@ smarthut_deploy: - 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}" + - "docker build -t smarthutsm/smarthut-backend:${CI_COMMIT_BRANCH} --pull ." + - "docker push smarthutsm/smarthut-backend:${CI_COMMIT_BRANCH}" after_script: - docker logout - + only: + - dev + - master #base checks for the code build: @@ -44,27 +47,19 @@ 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 + allow_failure: true 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 \ No newline at end of file + expose_as: 'Code Quality Report' \ No newline at end of file