# simple-java-maven-artifact **Repository Path**: wst021/simple-java-maven-artifact ## Basic Information - **Project Name**: simple-java-maven-artifact - **Description**: jenkins-java-maven技术栈 - **Primary Language**: Groovy - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2020-09-04 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # simple-java-maven-artifact This repository is for the [Build a Java app with Maven](https://jenkins.io/doc/tutorials/build-a-java-app-with-maven/) tutorial in the [Jenkins User Documentation](https://jenkins.io/doc/). The repository contains a simple Java application which outputs the string "Hello world!" and is accompanied by a couple of unit tests to check that the main application works as expected. The results of these tests are saved to a JUnit XML report. The `jenkins` directory contains an example of the `Jenkinsfile` (i.e. Pipeline) you'll be creating yourself during the tutorial and the `scripts` subdirectory contains a shell script with commands that are executed when Jenkins processes the "Deliver" stage of your Pipeline. ## Demo 结合java-maven,主要是验证一些常见使用 - 参数化pipeline - CI,CD,CICD 拆分,可以cover不同的场景 (基于https://gitee.com/owen2016/Jenkins-Pipeline 加入技术栈) ### VER1.0 版本 - bat/ssh 不同平台使用 - pipeline build version 更新 - 单引号/双引号 区别 - 变量使用/打印 - **artifact 使用** - archive artifacts (通常需要push 到制品库,比如nexus) - copy artifacts from another job (一般当只做部署时候,从制品库里选择一个已经测试通过可以上线的版本) ### VER1.2版本 - 使用 docker image作为 jenkins agent ![artifact-pipeline-1.JPG](./jenkins/artifact-pipeline-1.JPG) ![artifact-pipeline-2.JPG](./jenkins/artifact-pipeline-2.JPG) ![artifact-pipeline-3.JPG](./jenkins/artifact-pipeline-3.PNG) ![artifact-pipeline-4.JPG](./jenkins/artifact-pipeline-4.JPG)