Commit e1571307 authored by Bùi Bá Trường's avatar Bùi Bá Trường

truongbb - test ci

parent 66554eb8
Pipeline #409 failed
...@@ -70,6 +70,7 @@ check_quality_gate: ...@@ -70,6 +70,7 @@ check_quality_gate:
- chmod +x ./build-test.sh - chmod +x ./build-test.sh
- export QUALITY_GATE=$(./build-test.sh quality-gate) - export QUALITY_GATE=$(./build-test.sh quality-gate)
- echo $QUALITY_GATE - echo $QUALITY_GATE
- echo "Sonar statistic result: http://192.168.1.210:9000/dashboard?id=spring-ci-advanced"
# force pipeline exit and fail job if QUALITY GATE is FAIL # force pipeline exit and fail job if QUALITY GATE is FAIL
- sh ./stop_job.sh - sh ./stop_job.sh
......
...@@ -3,7 +3,7 @@ FROM ${JDK_BASE_IMAGE} ...@@ -3,7 +3,7 @@ FROM ${JDK_BASE_IMAGE}
ARG PROJECT_VERSION ARG PROJECT_VERSION
ENV PROJECT_VERSION ${PROJECT_VERSION} ENV PROJECT_VERSION ${PROJECT_VERSION}
WORKDIR /app WORKDIR /root
COPY target/spring-ci-advanced-$PROJECT_VERSION.jar spring-ci-advanced.jar COPY target/spring-ci-advanced-$PROJECT_VERSION.jar spring-ci-advanced.jar
ENTRYPOINT ["java","-Djava.security.egd=file:///dev/urandom","-jar", "/app/spring-ci-advanced.jar"] ENTRYPOINT ["java","-Djava.security.egd=file:///dev/urandom","-jar", "/root/spring-ci-advanced.jar"]
CMD ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9013","--spring.profiles.active=native,dev"] CMD ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9013","--spring.profiles.active=native,dev"]
...@@ -50,7 +50,6 @@ sub_quality-gate(){ ...@@ -50,7 +50,6 @@ sub_quality-gate(){
# echo "Quality gate status: " ${qualityGateStatus} # echo "Quality gate status: " ${qualityGateStatus}
if [[ ${qualityGateStatus} != "OK" ]] if [[ ${qualityGateStatus} != "OK" ]]
then then
# TODO - Fail quality gate --> stop pipeline???
# echo "*******QUALITY GATE FAILED!**********" # echo "*******QUALITY GATE FAILED!**********"
echo 0 echo 0
else else
......
version: '3.2' version: '3.2'
services: services:
od-service: spring-ci-advanced:
build: build:
context: ../../spring-ci-advanced context: ../../spring-ci-advanced
args: args:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>vn.itsol</groupId> <groupId>vn.itsol</groupId>
<artifactId>spring-ci-advanced</artifactId> <artifactId>spring-ci-advanced</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging> <packaging>jar</packaging>
<name>spring-ci-advanced</name> <name>spring-ci-advanced</name>
<description>Spring boot CI</description> <description>Spring boot CI</description>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment