diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Dockerfile (renamed from devops/gallifrey/Dockerfile) | 14 | ||||
-rw-r--r-- | devops/gallifrey/docker-entrypoint.sh | 2 | ||||
-rw-r--r-- | pom.xml | 281 | ||||
-rw-r--r-- | project.clj | 48 | ||||
-rw-r--r-- | version.properties | 13 |
6 files changed, 348 insertions, 12 deletions
@@ -1,8 +1,6 @@ # Created by https://www.gitignore.io/api/clojure,emacs,osx,java ### Clojure ### -pom.xml -pom.xml.asc *jar lib/ classes/ diff --git a/devops/gallifrey/Dockerfile b/Dockerfile index 4df1112..22e919b 100644 --- a/devops/gallifrey/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ENV JAVA_VERSION_MAJOR 8 ENV JAVA_VERSION_MINOR 131 ENV JAVA_VERSION_BUILD 11 ENV JAVA_PACKAGE jre -ENV GLIBC_VERSION 2.25-r0 +ENV GLIBC_VERSION 2.28-r0 ENV JAVA_8_BASE_URL http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/d54c1d3a095b4ff2b6607d096fa80163/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR} @@ -13,10 +13,10 @@ RUN apk update RUN apk add curl # Install glibc (required for java) -RUN curl -jsSL -o /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \ - curl -jsSL -O https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk && \ - apk add glibc-${GLIBC_VERSION}.apk && \ - rm -f glibc-${GLIBC_VERSION}.apk +RUN apk --no-cache add ca-certificates wget && \ + wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ + wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk && \ + apk add glibc-${GLIBC_VERSION}.apk # Install Java RUN mkdir /opt && \ @@ -38,8 +38,8 @@ RUN apk add zip openssh-keygen openssh-client EXPOSE 8080 RUN mkdir -p /opt/gallifrey -COPY gallifrey.jar /opt/gallifrey +COPY target/gallifrey-*.jar /opt/gallifrey -COPY ./docker-entrypoint.sh / +COPY ./devops/gallifrey/docker-entrypoint.sh / RUN chmod 700 /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/devops/gallifrey/docker-entrypoint.sh b/devops/gallifrey/docker-entrypoint.sh index 177d979..1ec8aca 100644 --- a/devops/gallifrey/docker-entrypoint.sh +++ b/devops/gallifrey/docker-entrypoint.sh @@ -2,4 +2,4 @@ set -e -java -jar /opt/gallifrey/gallifrey.jar +java -jar /opt/gallifrey/gallifrey-*.jar @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>gallifrey</groupId> + <artifactId>gallifrey</artifactId> + <packaging>jar</packaging> + <version>1.3.0-SNAPSHOT</version> + <name>aai-gallifrey</name> + <description/> + <scm> + <tag>330f1cb56cfafd1508438139dadc7cc645262ec6</tag> + </scm> + <build> + <sourceDirectory>src</sourceDirectory> + <testSourceDirectory>test</testSourceDirectory> + <resources> + <resource> + <directory>resources</directory> + </resource> + </resources> + <testResources> + <testResource> + <directory>resources</directory> + </testResource> + </testResources> + <directory>target</directory> + <outputDirectory>target/classes</outputDirectory> + <plugins> + <plugin> + <groupId>com.theoryinpractise</groupId> + <artifactId>clojure-maven-plugin</artifactId> + <version>1.3.13</version> + <extensions>true</extensions> + <configuration> + <sourceDirectories> + <sourceDirectory>src</sourceDirectory> + <sourceDirectory>prod</sourceDirectory> + <sourceDirectory>test</sourceDirectory> + </sourceDirectories> + </configuration> + <executions> + <execution> + <id>compile</id> + <goals> + <goal>compile</goal> + </goals> + <phase>compile</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.4</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <mainClass>gallifrey.server</mainClass> + <classpathPrefix>dependency</classpathPrefix> + </manifest> + </archive> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <phase>package</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + <version>1.6.7</version> + <extensions>true</extensions> + <configuration> + <nexusUrl>https://nexus.onap.org</nexusUrl> + <stagingProfileId>176c31dfe190a</stagingProfileId> + <serverId>ecomp-staging</serverId> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.2.0</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>dockerfile-maven-plugin</artifactId> + <version>1.4.4</version> + <configuration> + <tag>latest</tag> + <repository>${docker.push.registry}/onap/gallifrey</repository> + <verbose>true</verbose> + <serverId>docker-hub</serverId> + </configuration> + <executions> + <execution> + <id>default</id> + </execution> + </executions> + </plugin> + </plugins> + </build> + <repositories> + <repository> + <id>central</id> + <url>https://repo1.maven.org/maven2/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + </repository> + <repository> + <id>clojars</id> + <url>https://repo.clojars.org/</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + </repository> + <repository> + <id>ecomp-snapshots</id> + <url>https://nexus.onap.org/content/repositories/snapshots/</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + </repository> + <repository> + <id>onap-releases</id> + <url>https://nexus.onap.org/content/repositories/releases/</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + </repository> + </repositories> + <dependencyManagement> + <dependencies/> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.clojure</groupId> + <artifactId>clojure</artifactId> + <version>1.8.0</version> + </dependency> + <dependency> + <groupId>com.7theta</groupId> + <artifactId>utilis</artifactId> + <version>1.0.4</version> + </dependency> + <dependency> + <groupId>http-kit</groupId> + <artifactId>http-kit</artifactId> + <version>2.2.0</version> + </dependency> + <dependency> + <groupId>ring</groupId> + <artifactId>ring-core</artifactId> + <version>1.6.3</version> + </dependency> + <dependency> + <groupId>ring</groupId> + <artifactId>ring-defaults</artifactId> + <version>0.3.1</version> + </dependency> + <dependency> + <groupId>ring</groupId> + <artifactId>ring-anti-forgery</artifactId> + <version>1.1.0</version> + </dependency> + <dependency> + <groupId>compojure</groupId> + <artifactId>compojure</artifactId> + <version>1.6.0</version> + </dependency> + <dependency> + <groupId>liberator</groupId> + <artifactId>liberator</artifactId> + <version>0.15.1</version> + </dependency> + <dependency> + <groupId>cheshire</groupId> + <artifactId>cheshire</artifactId> + <version>5.7.1</version> + </dependency> + <dependency> + <groupId>com.apa512</groupId> + <artifactId>rethinkdb</artifactId> + <version>0.15.26</version> + </dependency> + <dependency> + <groupId>inflections</groupId> + <artifactId>inflections</artifactId> + <version>0.13.0</version> + </dependency> + <dependency> + <groupId>clj-time</groupId> + <artifactId>clj-time</artifactId> + <version>0.14.2</version> + </dependency> + <dependency> + <groupId>integrant</groupId> + <artifactId>integrant</artifactId> + <version>0.6.2</version> + </dependency> + <dependency> + <groupId>clojure-future-spec</groupId> + <artifactId>clojure-future-spec</artifactId> + <version>1.9.0-beta4</version> + </dependency> + <dependency> + <groupId>metrics-clojure</groupId> + <artifactId>metrics-clojure</artifactId> + <version>2.10.0</version> + </dependency> + <dependency> + <groupId>metrics-clojure-ring</groupId> + <artifactId>metrics-clojure-ring</artifactId> + <version>2.10.0</version> + </dependency> + <dependency> + <groupId>yogthos</groupId> + <artifactId>config</artifactId> + <version>0.9</version> + </dependency> + <dependency> + <groupId>ring</groupId> + <artifactId>ring-devel</artifactId> + <version>1.6.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>integrant</groupId> + <artifactId>repl</artifactId> + <version>0.2.0</version> + <scope>test</scope> + </dependency> + </dependencies> + <distributionManagement> + <repository> + <id>ecomp-releases</id> + <name>ECOMP Release Repository</name> + <url>https://nexus.onap.org/content/repositories/releases/</url> + </repository> + <snapshotRepository> + <id>ecomp-snapshots</id> + <name>ECOMP Snapshot Repository</name> + <url>https://nexus.onap.org/content/repositories/snapshots/</url> + </snapshotRepository> + </distributionManagement> +</project> + +<!-- This file was autogenerated by Leiningen. + Please do not edit it directly; instead edit project.clj and regenerate it. + It should not be considered canonical data. For more information see + https://github.com/technomancy/leiningen --> diff --git a/project.clj b/project.clj index 8637676..ccc5984 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject gallifrey "0.4.0" +(defproject gallifrey "1.3.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.8.0"] [com.7theta/utilis "1.0.4"] @@ -27,4 +27,48 @@ :uberjar {:source-paths ["prod"] :main gallifrey.server :uberjar-name "gallifrey.jar"}} - :prep-tasks ["compile"]) + :prep-tasks ["compile"] + :repositories [["ecomp-snapshots" {:name "ECOMP Snapshot Repository" :url "https://nexus.onap.org/content/repositories/snapshots/"}] + ["onap-releases" {:url "https://nexus.onap.org/content/repositories/releases/"}]] + :pom-addition [:distributionManagement + [:repository + [:id "ecomp-releases"] + [:name "ECOMP Release Repository"] + [:url "https://nexus.onap.org/content/repositories/releases/"]] + [:snapshotRepository + [:id "ecomp-snapshots"] + [:name "ECOMP Snapshot Repository"] + [:url "https://nexus.onap.org/content/repositories/snapshots/"]]] + :pom-plugins [[com.theoryinpractise/clojure-maven-plugin "1.3.13" + {:extensions "true" + :configuration [:sourceDirectories + [:sourceDirectory "src"] + [:sourceDirectory "prod"] + [:sourceDirectory "test"]] + :executions ([:execution [:id "compile"] + [:goals ([:goal "compile"])] + [:phase "compile"]])}] + [org.apache.maven.plugins/maven-jar-plugin "2.4" + {:configuration [:archive [:manifest + [:addClasspath true] + [:mainClass "gallifrey.server"] + [:classpathPrefix "dependency"]]]}] + [org.apache.maven.plugins/maven-dependency-plugin "2.8" + {:executions ([:execution [:id "copy-dependencies"] + [:goals ([:goal "copy-dependencies"])] + [:phase "package"]])}] + [org.sonatype.plugins/nexus-staging-maven-plugin "1.6.7" + {:extensions true + :configuration ([:nexusUrl "https://nexus.onap.org"] + [:stagingProfileId "176c31dfe190a"] + [:serverId "ecomp-staging"])}] + [org.apache.maven.plugins/maven-shade-plugin "3.2.0" + {:executions ([:execution + [:phase "package"] + [:goals ([:goal "shade"])]])}] + [com.spotify/dockerfile-maven-plugin "1.4.4" + {:configuration ([:tag "latest"] + [:repository "${docker.push.registry}/onap/gallifrey"] + [:verbose true] + [:serverId "docker-hub"]) + :executions ([:execution [:id "default"]])}]]) diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..a254b21 --- /dev/null +++ b/version.properties @@ -0,0 +1,13 @@ +# Versioning variables +# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) +# because they are used in Jenkins, whose plug-in doesn't support + +major=1 +minor=3 +patch=0 + +base_version=${major}.${minor}.${patch} + +# Release must be completed with git revision # in Jenkins +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT |