Jib

How to pass credentials for jenkins to push a docker image to my own registry?

痞子三分冷 提交于 2020-01-16 06:05:54
问题 JHipster now uses the maven-jib-plugin. Before that, my jenkins server running in a docker-container was able to build a docker image with the *.war-file and push it to my own docker-registry with a pipeline using a 'Jenkinsfile' (for gradle, but I switched to Maven now), and after job completion another job pulled the newly build docker-image into a new docker-container on my server by executing shell scripts on the remote host using ssh. The stages for this task were: def dockerImage stage(

How do I pass Jenkins credentials to gradle?

最后都变了- 提交于 2020-01-15 02:53:25
问题 I'm using the jib Gradle plugin to create a docker image and push it to the Azure Container Registry. I've added username/password credentials to Jenkins so far and need to pass them to Gradle. Accessing or passing the credentials to Gradle, they get masked. Hope you can help me. Here're the code snippets: build.gradle (jib configuration): jib { to { image = "myacr.azurecr.io/" + project.name tags = ["latest"] auth { // retrieve from Jenkins username System.properties['ACR_CREDENTIALS_USR']

Building docker images with Jib and Gitlab-CI

折月煮酒 提交于 2019-12-25 02:47:07
问题 I am trying to create a pipeline where docker images are created using JIB (via a Maven Plugin) and pushed to my Gitlab Registry. This works fine locally as I am logged into my docker registry. <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> <version>1.0.0</version> <configuration> <allowInsecureRegistries>true</allowInsecureRegistries> <from> <image>dockerhost/projectgroup/alpine</image> </from> <to> <image>dockerhost/project/imagename:${project

Building docker images with Jib and Gitlab-CI

試著忘記壹切 提交于 2019-12-25 02:47:02
问题 I am trying to create a pipeline where docker images are created using JIB (via a Maven Plugin) and pushed to my Gitlab Registry. This works fine locally as I am logged into my docker registry. <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> <version>1.0.0</version> <configuration> <allowInsecureRegistries>true</allowInsecureRegistries> <from> <image>dockerhost/projectgroup/alpine</image> </from> <to> <image>dockerhost/project/imagename:${project

Jib构建镜像的问题分析(Could not find or load main class ${start-class})

主宰稳场 提交于 2019-11-30 17:04:52
问题简述 通过Jib插件将SpringBoot工程制作成Docker镜像成功,但是运行镜像的时候报错(Could not find or load main class ${start-class}),今天来一起分析这个问题,希望能帮读者跳过小坑。 关于Jib插件 在Maven工程中可以使用Jib插件将当前Java工程构建成Docker镜像,详情请参考: 《Docker与Jib(maven插件版)实战》 ; 《Jib使用小结(Maven插件版)》 ; 环境信息 操作系统:macOS Mojave 10.14.6 (18G103) JDK:10.14.6 (18G103) Docker:10.14.6 (18G103) SpringBoot:2.1.8.RELEASE Jib插件版本:1.6.1 源码下载 为了重现问题,我将出现问题的SpringBoot工程上传到GitHub,地址和链接信息如下表所示: 名称 链接 备注 项目主页 https://github.com/zq2599/blog_demos 该项目在GitHub上的主页 git仓库地址(https) https://github.com/zq2599/blog_demos.git 该项目源码的仓库地址,https协议 git仓库地址(ssh) git@github.com :zq2599/blog_demos.git