From a3e5e53ba4c940642ddd5becacd4b0cf361fb5a4 Mon Sep 17 00:00:00 2001 From: Michal Banka Date: Fri, 12 Feb 2021 14:45:59 +0100 Subject: Update image building - Removed 'docker' profile - Removed auto building and pushing image from mvn phases - Unified image name through project - Updated README Signed-off-by: Michal Banka Change-Id: I20e5e21d61b5e0283f9de6b9d0b2e0988328537a Issue-ID: DCAEGEN2-2573 --- Makefile | 2 +- README.md | 18 ++++++++++++- docker-compose.yml | 2 +- environment.config | 5 +++- pom.xml | 79 ++++++++++++++++-------------------------------------- 5 files changed, 46 insertions(+), 60 deletions(-) diff --git a/Makefile b/Makefile index fcf3f44..d675741 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ build: docker: @echo "Building ves-openapi-manager docker image" - @$(DOCKER) build --tag ves-openapi-manager:latest . + @$(DOCKER) build --tag $(IMAGE):latest . run: @echo "Starting ves-openapi-manager docker containers" diff --git a/README.md b/README.md index 7d74f51..07c64a2 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,20 @@ Results of validation are visible in two places: - In SDC UI in Service -> Distributions view under specific distribution as component *ves-openapi-manager*. It might take few minutes to show results after service distribution. - In logs of ves-openapi-manager, right after validation takes place. - \ No newline at end of file + +## Docker image + +### Building +There are at least two ways to build docker image. + +Using makefile: +``` +make build docker +``` + +Direct creation with mvn: +``` +mvn clean package docker:build +``` + +Image will be named: *onap/org.onap.dcaegen2.platform.ves-openapi-manager* \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d708fd8..ce7cb96 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: ves-openapi-manager: - image: ves-openapi-manager:latest + image: onap/org.onap.dcaegen2.platform.ves-openapi-manager:latest container_name: ves-openapi-manager hostname: ves-openapi-manager environment: diff --git a/environment.config b/environment.config index 0d34eef..57dfbe7 100644 --- a/environment.config +++ b/environment.config @@ -1,11 +1,14 @@ # Configuration file for ves-openapi-manager Makefile -# consts +# Consts COMPOSE = docker-compose MVN = mvn DOCKER = docker SSH = ssh +# Image +IMAGE=onap/org.onap.dcaegen2.platform.ves-openapi-manager + # Port-forwarding configuration RKE_IP=10.129.36.103 WORKER_IP=10.129.36.116 diff --git a/pom.xml b/pom.xml index 6f26677..bebdfac 100644 --- a/pom.xml +++ b/pom.xml @@ -83,64 +83,31 @@ ${maven.compiler.target} + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin.version} + + ${skipDockerPush} + true + IfNotPresent + + + ${project.artifactId} + ${docker-image.namespace}/${docker-image.name.prefix}.${project.artifactId} + ${onap.nexus.dockerregistry.daily} + + ${project.basedir} + + ${project.version}-${maven.build.timestamp}Z + + + + + + - - - docker - - false - - - linux - x86_64 - ${os.detected.name}-${os.detected.arch} - - - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin.version} - - - docker-build-image - package - - build - - - - docker-push-image - deploy - - push - - - - - ${skipDockerPush} - true - IfNotPresent - - - ${project.artifactId} - ${docker-image.namespace}/${docker-image.name.prefix}.${project.artifactId} - ${onap.nexus.dockerregistry.daily} - - ${project.basedir} - - ${project.version}-STAGE-${maven.build.timestamp}Z - - - - - - - - - - -- cgit 1.2.3-korg