com.github.akvone:update-image-maven-plugin

Maven plugin to automate "package-build-update docker images" iteration

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

com.github.akvone
Идентификатор

Идентификатор

update-image-maven-plugin
Последняя версия

Последняя версия

0.6.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

com.github.akvone:update-image-maven-plugin
Maven plugin to automate "package-build-update docker images" iteration
Ссылка на сайт

Ссылка на сайт

https://github.com/akvone/update-image-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/akvone/update-image-maven-plugin/tree/master

Скачать update-image-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.github.akvone</groupId>
    <artifactId>update-image-maven-plugin</artifactId>
    <version>0.6.0</version>
</plugin>

Зависимости

compile (11)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.6.1
org.apache.maven : maven-project jar 2.2.1
org.slf4j : slf4j-api jar 1.7.30
com.github.docker-java : docker-java jar 3.2.1
com.github.docker-java : docker-java-transport-okhttp jar 3.2.1
com.sun.activation : javax.activation jar 1.2.0
org.apache.httpcomponents : httpclient jar 4.5.9
com.google.guava : guava jar 28.0-jre
org.apache.commons : commons-configuration2 jar 2.5
commons-beanutils : commons-beanutils jar 1.9.4
org.yaml : snakeyaml jar 1.24

provided (2)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0
org.projectlombok : lombok jar 1.18.12

test (2)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-simple jar 1.7.30
org.junit.jupiter : junit-jupiter-engine jar 5.6.2

Модули Проекта

Данный проект не имеет модулей.

Maven Central

Update image Maven plugin

What is it used for?

It is used to automate the next pipeline:

src.jardocker image → artifactory → OpenShift

  1. run maven package and build spring boot app (or whatever you need)
  2. build docker image and push it into a repository
  3. update docker image in the cloud (currently in OpenShift)

Actually, the plugin itself automates steps 2 and 3.

How to use

With maven

What you really need:

  • Type: mvn clean package -DskipTests com.github.akvone:update-image-maven-plugin:update to make full update

May be useful also

  • Type: mvn clean compile jar:jar org.springframework.boot:spring-boot-maven-plugin:repackage com.github.akvone:update-image-maven-plugin:update to make full update (fastest command, but works only with Spring Boot projects)
  • Type: mvn com.github.akvone:update-image-maven-plugin:update to make partial update (without generating new jar)
  • Type: mvn com.github.akvone:update-image-maven-plugin:build-push to make build and push (without generating new jar)

With Intellij IDEA

  1. Add Configuration
  2. Create Maven Run Configuration
  3. Command line: -N com.github.akvone:update-image-maven-plugin:update
  4. Before launch: clean package -DskipTests

EXAMPLE

Configuration

Add required properties

  • in {project root}/../config.yaml (most preferable way)
  • or in {project root}/gitignore/config.yaml (add {project root}/gitignore to .gitignore file then)

See default config

docker:
  host: "***" # Already has defaults based on your OS
  username: "!!!"
  authorization: "!!!"
artifactory:
  url: "!!!"
  repository: "!!!"
cloudProvider:
  type: "openshift" # currently, OpenShift is supported only
  url: "***"
  namespace: "***"
  authorizationToken: "***" # get it from OpenShift (Bearer token)

Note that properties with "!!!" are required and "***" are optional.

Prerequisites

  • Install Docker (Docker desktop for Windows) and run it
  • Add configuration file as described in Configuration section

Additionally

You can additionally use tcp protocol. Use "tcp://127.0.0.1:2375" in docker.host property.

After that you must enable 'Docker without TLS' (Docker -> Settings -> General -> Expose daemon on tcp://localhost:2375 without tls) in Windows or something similar in macOS.

Версии библиотеки

Версия
0.6.0
0.5.3
0.5.2