Skip to content

Commit 7d89094

Browse files
authored
Merge pull request #153 from dario-rodriguez/cicd
New CI/CD pipelines & documentation
2 parents e68c325 + 9b35d6b commit 7d89094

16 files changed

+520
-214
lines changed

angular/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"start:electron": "npm run postinstall:electron && npm-run-all -p serve electron:serve",
1313
"compodoc": "compodoc -p src/tsconfig.app.json -s",
1414
"test": "ng test --browsers Chrome",
15-
"test:ci": "ng test --browsers ChromeHeadless --watch=false",
15+
"test:ci": "npm run postinstall:web && ng test --browsers ChromeHeadless --watch=false",
1616
"test:firefox": "ng test --browsers Firefox",
1717
"test:ci:firefox": "ng test --browsers FirefoxHeadless --watch=false",
1818
"test:firefox-dev": "ng test --browsers FirefoxDeveloper",
@@ -32,7 +32,7 @@
3232
"build": "ng build",
3333
"build:pwa": "npm run postinstall:web && ng build --configuration=pwa --prod --build-optimizer && npm run ngsw-config && npm run ngsw-copy",
3434
"build:prod": "npm run postinstall:web && ng build --prod --build-optimizer",
35-
"build:prodcompose": "npm run postinstall:web && ng build --configuration=prodcompose --prod --build-optimizer",
35+
"build:prodcompose": "npm run postinstall:web && ng build --configuration=prodcompose ",
3636
"build:electron": "npm run postinstall:electron && npm run electron:serve-tsc && ng build --base-href ./",
3737
"build:electron:dev": "npm run build:electron -- -c dev",
3838
"build:electron:prod": "npm run build:electron -- -c production",

java/mtsj/pom.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
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">
44
<modelVersion>4.0.0</modelVersion>
55

66
<artifactId>mtsj</artifactId>
@@ -12,7 +12,7 @@
1212

1313
<properties>
1414
<spring.boot.version>2.0.4.RELEASE</spring.boot.version>
15-
<devon4j.version>3.0.0</devon4j.version>
15+
<devon4j.version>3.0.0</devon4j.version>
1616
<java.version>1.8</java.version>
1717
<devon.port.range>81</devon.port.range>
1818
<devon.http.port>${devon.port.range}81</devon.http.port>
@@ -220,12 +220,12 @@
220220
<repository>
221221
<id>devon.releases</id>
222222
<name>devon Releases</name>
223-
<url>https://devon.s2-eu.capgemini.com/nexus/content/repositories/releases/</url>
223+
<url>http://nexus3-core:8081/nexus/content/repositories/releases/</url>
224224
</repository>
225225
<snapshotRepository>
226226
<id>devon.snapshots</id>
227227
<name>devon Snapshots</name>
228-
<url>https://devon.s2-eu.capgemini.com/nexus/content/repositories/snapshots/</url>
228+
<url>http://nexus3-core:8081/nexus3/repository/snapshots</url>
229229
</snapshotRepository>
230230
</distributionManagement>
231231
</project>

jenkins/README.md

+168-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,173 @@
22

33
In this folder 2 Jenkinsfile(s) are provided to execute some CI/CD process for different parts of the **My Thai Star** project. One for the **Angular client** and another one for the **Java server**. Both are intended to be executed in an already configured **Production Line instance**. This configuration is required to be **used by Devonfw projects**, and a guide can be found in the [**Devonfw Shop Floor** incubator's wiki](https://github.com/devonfw/devonfw-shop-floor/wiki/devonfw-shop-floor-4-production-line-environment).
44

5+
## Installed plugins
6+
7+
In order to run all pipelines, we have installed the following plugins (maybe not all are required):
8+
9+
- **Pipeline Utility Steps (pipeline-utility-steps)**
10+
- OWASP Markup Formatter Plugin (antisamy-markup-formatter)
11+
- Office 365 Connector (Office-365-Connector)
12+
- JavaScript GUI Lib: ACE Editor bundle plugin (ace-editor)
13+
- Ant Plugin (ant)
14+
- Apache HttpComponents Client 4.x API Plugin (apache-httpcomponents-client-4-api)
15+
- Authentication Tokens API Plugin (authentication-tokens)
16+
- Autofavorite for Blue Ocean (blueocean-autofavorite)
17+
- Bitbucket Pipeline for Blue Ocean (blueocean-bitbucket-pipeline)
18+
- Common API for Blue Ocean (blueocean-commons)
19+
- Config API for Blue Ocean (blueocean-config)
20+
- Blue Ocean Core JS (blueocean-core-js)
21+
- Display URL for Blue Ocean (blueocean-display-url)
22+
- Events API for Blue Ocean (blueocean-events)
23+
- Git Pipeline for Blue Ocean (blueocean-git-pipeline)
24+
- GitHub Pipeline for Blue Ocean (blueocean-github-pipeline)
25+
- i18n for Blue Ocean (blueocean-i18n)
26+
- JIRA Integration for Blue Ocean (blueocean-jira)
27+
- JWT for Blue Ocean (blueocean-jwt)
28+
- Personalization for Blue Ocean (blueocean-personalization)
29+
- Pipeline implementation for Blue Ocean (blueocean-pipeline-api-impl)
30+
- Blue Ocean Pipeline Editor (blueocean-pipeline-editor)
31+
- Pipeline SCM API for Blue Ocean (blueocean-pipeline-scm-api)
32+
- REST Implementation for Blue Ocean (blueocean-rest-impl)
33+
- REST API for Blue Ocean (blueocean-rest)
34+
- Web for Blue Ocean (blueocean-web)
35+
- Blue Ocean (blueocean)
36+
- bouncycastle API Plugin (bouncycastle-api)
37+
- Branch API Plugin (branch-api)
38+
- build-env-propagator (build-env-propagator)
39+
- Build Timeout (build-timeout)
40+
- Bitbucket Branch Source Plugin (cloudbees-bitbucket-branch-source)
41+
- Folders Plugin (cloudbees-folder)
42+
- Command Agent Launcher Plugin (command-launcher)
43+
- Config File Provider Plugin (config-file-provider)
44+
- Credentials Binding Plugin (credentials-binding)
45+
- Credentials Plugin (credentials)
46+
- **Custom Tools Plugin (custom-tools-plugin)**
47+
- Deploy to container Plugin (deploy)
48+
- disk-usage plugin (disk-usage)
49+
- Display URL API (display-url-api)
50+
- Docker Commons Plugin (docker-commons)
51+
- Docker API Plugin (docker-java-api)
52+
- Docker plugin (docker-plugin)
53+
- Docker Pipeline (docker-workflow)
54+
- Durable Task Plugin (durable-task)
55+
- Email Extension Plugin (email-ext)
56+
- EnvInject API Plugin (envinject-api)
57+
- Environment Injector Plugin (envinject)
58+
- Extended Choice Parameter Plug-In (extended-choice-parameter)
59+
- External Monitor Job Type Plugin (external-monitor-job)
60+
- Favorite (favorite)
61+
- Gerrit Trigger (gerrit-trigger)
62+
- GitHub Pull Request Builder (ghprb)
63+
- Git client plugin (git-client)
64+
- GIT server Plugin (git-server)
65+
- Git plugin (git)
66+
- GitHub API Plugin (github-api)
67+
- GitHub Branch Source Plugin (github-branch-source)
68+
- GitHub Integration Plugin (github-pullrequest)
69+
- GitHub plugin (github)
70+
- Gradle Plugin (gradle)
71+
- JavaScript GUI Lib: Handlebars bundle plugin (handlebars)
72+
- Handy Uri Templates 2.x API Plugin (handy-uri-templates-2-api)
73+
- HTML Publisher plugin (htmlpublisher)
74+
- Icon Shim Plugin (icon-shim)
75+
- Jackson 2 API Plugin (jackson2-api)
76+
- Javadoc Plugin (javadoc)
77+
- Design Language (jenkins-design-language)
78+
- JIRA plugin (jira)
79+
- JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin (jquery-detached)
80+
- jQuery UI plugin (jquery-ui)
81+
- jQuery plugin (jquery)
82+
- JSch dependency plugin (jsch)
83+
- JUnit Plugin (junit)
84+
- LDAP Plugin (ldap)
85+
- Lockable Resources plugin (lockable-resources)
86+
- Mailer Plugin (mailer)
87+
- MapDB API Plugin (mapdb-api)
88+
- Matrix Authorization Strategy Plugin (matrix-auth)
89+
- Matrix Project Plugin (matrix-project)
90+
- **Maven Integration plugin (maven-plugin)**
91+
- Mercurial plugin (mercurial)
92+
- JavaScript GUI Lib: Moment.js bundle plugin (momentjs)
93+
- Multiple SCMs plugin (multiple-scms)
94+
- **NodeJS Plugin (nodejs)**
95+
- PAM Authentication plugin (pam-auth)
96+
- Pipeline: Build Step (pipeline-build-step)
97+
- Pipeline: GitHub (pipeline-github)
98+
- Pipeline GitHub Notify Step Plugin (pipeline-githubnotify-step)
99+
- Pipeline Graph Analysis Plugin (pipeline-graph-analysis)
100+
- Pipeline: Input Step (pipeline-input-step)
101+
- Pipeline Maven Integration Plugin (pipeline-maven)
102+
- Pipeline: Milestone Step (pipeline-milestone-step)
103+
- Pipeline: Model API (pipeline-model-api)
104+
- Pipeline: Declarative Agent API (pipeline-model-declarative-agent)
105+
- Pipeline: Declarative (pipeline-model-definition)
106+
- Pipeline: Declarative Extension Points API (pipeline-model-extensions)
107+
- Pipeline: REST API Plugin (pipeline-rest-api)
108+
- Pipeline: Stage Step (pipeline-stage-step)
109+
- Pipeline: Stage Tags Metadata (pipeline-stage-tags-metadata)
110+
- Pipeline: Stage View Plugin (pipeline-stage-view)
111+
- Plain Credentials Plugin (plain-credentials)
112+
- pom2config (pom2config)
113+
- Publish Over SSH (publish-over-ssh)
114+
- Infrastructure plugin for Publish Over X (publish-over)
115+
- Pub-Sub "light" Bus (pubsub-light)
116+
- Purge Job History Plugin (purge-job-history)
117+
- Resource Disposer Plugin (resource-disposer)
118+
- Reverse Proxy Auth Plugin (reverse-proxy-auth-plugin)
119+
- SCM API Plugin (scm-api)
120+
- Selenium Plugin (selenium)
121+
- SeleniumRC plugin (seleniumrc-plugin)
122+
- **SonarQube Scanner for Jenkins (sonar)**
123+
- Server Sent Events (SSE) Gateway Plugin (sse-gateway)
124+
- SSH Agent Plugin (ssh-agent)
125+
- SSH Credentials Plugin (ssh-credentials)
126+
- SSH Slaves plugin (ssh-slaves)
127+
- Structs Plugin (structs)
128+
- Subversion Plug-in (subversion)
129+
- Self-Organizing Swarm Plug-in Modules (swarm)
130+
- Terminal Plugin (terminal)
131+
- Timestamper (timestamper)
132+
- Token Macro Plugin (token-macro)
133+
- Variant Plugin (variant)
134+
- VncRecorder Plugin (vncrecorder)
135+
- Windows Slaves Plugin (windows-slaves)
136+
- Pipeline (workflow-aggregator)
137+
- Pipeline: API (workflow-api)
138+
- Pipeline: Basic Steps (workflow-basic-steps)
139+
- Pipeline: Shared Groovy Libraries (workflow-cps-global-lib)
140+
- Pipeline: Groovy (workflow-cps)
141+
- Pipeline: Nodes and Processes (workflow-durable-task-step)
142+
- Pipeline: Job (workflow-job)
143+
- Pipeline: Multibranch (workflow-multibranch)
144+
- Pipeline: SCM Step (workflow-scm-step)
145+
- Pipeline: Step API (workflow-step-api)
146+
- Pipeline: Supporting APIs (workflow-support)
147+
- Workspace Cleanup Plugin (ws-cleanup)
148+
- Xvnc plugin (xvnc)
149+
- Dashboard for Blue Ocean (blueocean-dashboard)
150+
- Script Security Plugin (script-security)
151+
152+
Most of them come pre-installed with the production line instance. The ones we need are the ones related to the pipeline and the ones in bold.
153+
154+
## Tools
155+
156+
- Java 8u192 JDK \
157+
![java8jdk](./java8-jdk.png)
158+
- Google Chrome Stable \
159+
![googlechromestable](./google-chrome-stable.png)
160+
- SonarQube Scanner 3.2.0.1227 \
161+
![sonarscanner](./sonar-scanner.png)
162+
- Maven 3.6.0
163+
![maven](./maven.png)
164+
- NodeJS 10.14.0 + yarn
165+
![nodejs](./nodejs.png)
166+
167+
## How to create the pipelines
168+
169+
You only need to create a new pipeline and modify the configuration following the image:
170+
![](./pipeline-config.png)
171+
5172
**TIP**: All environment variables used on both Jenkinsfiles should be declared in the correspondant Jenkins Pipeline configuration more or less like this:
6173

7-
![](./jenkins-pipelines-params.png)
174+
![](./jenkins-pipelines-params.png)

jenkins/angular/Jenkinsfile

-60
This file was deleted.

0 commit comments

Comments
 (0)