Skip to content

Commit 524da60

Browse files
committed
RELEASE : 0.1.0
1 parent 6c63c2a commit 524da60

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM openjdk:17-oracle
22

3+
ARG VERSION
4+
35
ARG MYSQL_HOST
46
ARG MYSQL_PORT
57
ARG MYSQL_PASSWORD
@@ -11,7 +13,6 @@ ARG REDIS_HOST
1113
ARG REDIS_PORT
1214
ARG REDIS_PASSWORD
1315

14-
1516
ENV MYSQL_HOST=${MYSQL_HOST}
1617
ENV MYSQL_PORT=${MYSQL_PORT}
1718
ENV MYSQL_PASSWORD=${MYSQL_PASSWORD}
@@ -22,6 +23,7 @@ ENV JWT_SECRET_KEY=${JWT_SECRET_KEY}
2223
ENV REDIS_HOST=${REDIS_HOST}
2324
ENV REDIS_PORT=${REDIS_PORT}
2425
ENV REDIS_PASSWORD=${REDIS_PASSWORD}
26+
ENV VERSION=${VERSION}
2527

2628
RUN microdnf install findutils
2729

@@ -31,4 +33,4 @@ COPY . /app
3133
RUN chmod +x ./gradlew
3234
RUN ./gradlew build -x test
3335

34-
CMD ["java", "-jar", "-Dspring.profiles.active=product", "build/libs/jshop-0.0.6-hotfix.1.jar"]
36+
CMD ["java", "-jar", "-Dspring.profiles.active=product", "build/libs/web-$VERSION.jar"]

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55

66
allprojects {
77
group = 'jshop'
8-
version = '0.0.6-hotfix.1'
8+
version = '0.1.0'
99

1010
java {
1111
sourceCompatibility = '17'

jenkins/deploy.jenkins

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pipeline {
1515
REDIS_HOST = credentials('REDIS_HOST')
1616
REDIS_PORT = credentials('REDIS_PORT')
1717
REDIS_PASSWORD = credentials('REDIS_PASSWORD')
18-
19-
IMAGE = 'jshop.kr.ncr.ntruss.com/jshop:v0.0.6-hotfix.1'
18+
VERSION = '0.1.0'
19+
IMAGE = 'jshop.kr.ncr.ntruss.com/jshop'
2020
}
2121

2222
stages {
@@ -35,7 +35,7 @@ pipeline {
3535
steps {
3636
script {
3737
echo 'build'
38-
sh "docker build -t ${IMAGE} --build-arg MYSQL_HOST=${MYSQL_HOST} --build-arg MYSQL_PORT=${MYSQL_PORT} --build-arg MYSQL_USERNAME=${MYSQL_USERNAME} --build-arg MYSQL_PASSWORD=${MYSQL_PASSWORD} --build-arg JWT_SECRET_KEY=${JWT_SECRET_KEY} --build-arg REDIS_HOST=${REDIS_HOST} --build-arg REDIS_PORT=${REDIS_PORT} --build-arg REDIS_PASSWORD=${REDIS_PASSWORD} ."
38+
sh "docker build -t ${IMAGE}:${VERSION} --build-arg MYSQL_HOST=${MYSQL_HOST} --build-arg MYSQL_PORT=${MYSQL_PORT} --build-arg MYSQL_USERNAME=${MYSQL_USERNAME} --build-arg MYSQL_PASSWORD=${MYSQL_PASSWORD} --build-arg JWT_SECRET_KEY=${JWT_SECRET_KEY} --build-arg REDIS_HOST=${REDIS_HOST} --build-arg REDIS_PORT=${REDIS_PORT} --build-arg REDIS_PASSWORD=${REDIS_PASSWORD} ."
3939
}
4040
}
4141
}
@@ -45,7 +45,7 @@ pipeline {
4545
script {
4646
echo 'push'
4747
sh "echo ${NCLOUD_SECRET_KEY} | docker login jshop.kr.ncr.ntruss.com -u ${NCLOUD_ACCESS_KEY_ID} --password-stdin"
48-
sh "docker push ${IMAGE}"
48+
sh "docker push ${IMAGE}:${VERSION}"
4949
}
5050
}
5151
}
@@ -64,7 +64,7 @@ pipeline {
6464
SERVERS.each { server ->
6565
sshagent(['ssh-deploy-key']) {
6666
sh "ssh jhkim@${server} 'echo $NCLOUD_SECRET_KEY | docker login jshop.kr.ncr.ntruss.com -u ${NCLOUD_ACCESS_KEY_ID} --password-stdin'"
67-
sh "ssh jhkim@${server} 'docker service update --image ${IMAGE} jshop_jshop --with-registry-auth'"
67+
sh "ssh jhkim@${server} 'docker service update --image ${IMAGE}:${VERSION} jshop_jshop --with-registry-auth'"
6868
}
6969
}
7070
}

0 commit comments

Comments
 (0)