diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-11-10 07:12:08 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-11-10 07:12:08 +0100 |
commit | 77d0f7b66f7838a845e34aa7bb00108dfe052928 (patch) | |
tree | 1633a97016d8868dbfbad4205df99670528b5418 | |
parent | 8dbf2f1189fd81a02b8c42e1d94548f63d4fbb92 (diff) |
Zero-downtime deployments.
Change-Id: I744755891347ba9c55e51218265c69c667a5721e
-rw-r--r-- | .mvn/maven.config | 1 | ||||
-rw-r--r-- | build.xml | 13 | ||||
-rw-r--r-- | pom.xml | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 0000000..f8d5e4d --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1 @@ +-Drevision=0.1.0-SNAPSHOT @@ -2,6 +2,11 @@ <project default="package"> + <tstamp> + <format property="version.date" pattern="yyyyMMddhhmmss"/> + </tstamp> + + <property name="version.tag" value="1.${version.date}"/> <property name="web-dir" location="src/main/resources/META-INF/resources"/> <target name="yarn" depends="yarn.check" if="yarn.run"> @@ -88,13 +93,15 @@ <target name="deploy" description="Deploy JAR to Kubernetes"> <exec executable="./mvnw"> <arg value="package"/> + <arg value="-Drevision=${version.tag}"/> <arg value="-Dquarkus.container-image.build=true"/> <arg value="-Dquarkus.container-image.push=true"/> </exec> <exec executable="kubectl"> - <arg value="delete"/> - <arg value="pods"/> - <arg value="-lapp=mulkcms2"/> + <arg value="set"/> + <arg value="image"/> + <arg value="deployments/mulkcms2"/> + <arg value="mulkcms2=docker.benkard.de/mulk/mulkcms2:${version.tag}"/> </exec> <exec executable="kubectl"> <arg value="get"/> @@ -6,7 +6,7 @@ <groupId>eu.mulk</groupId> <artifactId>mulkcms2</artifactId> - <version>0.1.0-SNAPSHOT</version> + <version>${revision}</version> <properties> <maven.compiler.parameters>true</maven.compiler.parameters> |