Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #38

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open

Test #38

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
e8b94cb
Update index.jsp
mohancggrl Jul 28, 2018
894d2db
Update index.jsp
mohancggrl Jul 28, 2018
c315584
Update index.jsp
mohancggrl Jul 31, 2018
9514e5a
Update index.jsp
mohancggrl Jul 31, 2018
5b772cb
Update index.jsp
mohancggrl Aug 3, 2018
2a88cf5
Update index.jsp
mohancggrl Sep 2, 2018
c42e564
Update index.jsp
mohancggrl Sep 3, 2018
936dbe1
Update index.jsp
mohancggrl Nov 5, 2018
2e11c74
Update index.jsp
mohancggrl Nov 23, 2018
52b43b1
Update index.jsp
mohancggrl Nov 23, 2018
6738180
Update index.jsp
mohancggrl Apr 20, 2019
facd11e
Update index.jsp
mohancggrl Jul 25, 2019
faa027b
Update index.jsp
mohancggrl Sep 25, 2019
a43d349
Update index.jsp
mohancggrl Sep 25, 2019
7b53a17
Update index.jsp
mohancggrl Sep 25, 2019
acfcd31
Update pom.xml
mohancggrl Dec 6, 2019
50b2932
Update pom.xml
mohancggrl Dec 6, 2019
891a609
Update pom.xml
mohancggrl Dec 6, 2019
2be7821
Update pom.xml
mohancggrl Dec 6, 2019
fa27fed
Update pom.xml
mohancggrl Dec 6, 2019
3b0a699
Update pom.xml
mohancggrl Dec 6, 2019
4257463
Update pom.xml
mohancggrl Dec 6, 2019
56d945b
Update pom.xml
mohancggrl Dec 6, 2019
861787a
Update pom.xml
mohancggrl Dec 7, 2019
6a9b5e9
Update pom.xml
mohancggrl Dec 7, 2019
e40a138
Update pom.xml
mohancggrl Dec 7, 2019
579845b
Update pom.xml
mohancggrl Dec 7, 2019
a1cd738
Update pom.xml
mohancggrl Dec 7, 2019
6375a7a
Update pom.xml
mohancggrl Dec 7, 2019
c12fa14
Update pom.xml
mohancggrl Dec 7, 2019
298b9a4
Update pom.xml
mohancggrl Dec 7, 2019
ecacedc
Update pom.xml
mohancggrl Dec 7, 2019
7576302
Update pom.xml
mohancggrl Dec 7, 2019
463c0cb
Update pom.xml
mohancggrl Jan 4, 2020
3fc2583
Update pom.xml
mohancggrl Jan 4, 2020
0d1fbf7
Update pom.xml
mohancggrl Jan 4, 2020
9ce21ab
Update pom.xml
mohancggrl Jan 4, 2020
00ab1c9
Update pom.xml
mohancggrl Jan 31, 2020
2428d22
Update pom.xml
mohancggrl May 1, 2020
8b7923f
Update index.jsp
mohancggrl May 5, 2020
5e3e9be
Update pom.xml
mohancggrl May 5, 2020
d64749b
Update index.jsp
mohancggrl May 5, 2020
91187ca
Update pom.xml
mohancggrl May 21, 2020
174521c
Update pom.xml
mohancggrl May 22, 2020
2ec42c8
Create jenkinsfile
mohancggrl May 24, 2020
495e556
Update jenkinsfile
mohancggrl May 24, 2020
86f476f
Update jenkinsfile
mohancggrl May 24, 2020
f844635
Update jenkinsfile
mohancggrl May 24, 2020
809d975
Update jenkinsfile
mohancggrl May 24, 2020
fd2275b
Update jenkinsfile
mohancggrl May 24, 2020
8f54a0c
Update pom.xml
mohancggrl May 24, 2020
4761c1a
Update pom.xml
mohancggrl May 24, 2020
90e3782
Update index.jsp
mohancggrl May 24, 2020
7656a45
Update pom.xml
mohancggrl May 24, 2020
e3af2a5
Update jenkinsfile
mohancggrl May 24, 2020
4e3eafd
Added Jenkinsfile
mohancggrl May 31, 2020
6db6f12
Update Jenkinsfile
mohancggrl Jun 21, 2020
1bd7e83
Create mohan
mohancggrl Jun 21, 2020
1c200b2
Update mohan
mohancggrl Jun 21, 2020
4b6e950
Update mohan
mohancggrl Jun 21, 2020
7993e0f
Update pom.xml
mohancggrl May 16, 2021
23079fe
Update pom.xml
mohancggrl May 16, 2021
ba705c7
Update pom.xml
mohancggrl May 16, 2021
729d556
Create settings.xml
mohancggrl May 23, 2021
67f6c2c
Update settings.xml
mohancggrl May 23, 2021
7d09653
changes
May 23, 2021
b21ae2c
Update settings.xml
mohancggrl May 23, 2021
f05499d
Update index.jsp
mohancggrl Mar 9, 2022
615e816
Update index.jsp
mohancggrl Mar 9, 2022
01c477c
Update index.jsp
mohancggrl Mar 9, 2022
910b061
Create suresh
mohancggrl Mar 24, 2022
27c73e3
Create Teju
mohancggrl Mar 24, 2022
3bbc1d3
Update pom.xml
mohancggrl Apr 11, 2022
1850747
Update pom.xml
mohancggrl Apr 11, 2022
82944b0
Update pom.xml
mohancggrl Apr 12, 2022
d1e2cb2
Update pom.xml
mohancggrl Apr 12, 2022
afd8fbf
Update pom.xml
mohancggrl Apr 12, 2022
7a3a8b8
Update index.jsp
mohancggrl Apr 13, 2022
c311d53
Update pom.xml
mohancggrl Apr 13, 2022
23c88bb
Create jenkins_file
mohancggrl Apr 13, 2022
d528f9e
Update jenkins_file
mohancggrl Apr 13, 2022
9eb0785
Update jenkins_file
mohancggrl Apr 13, 2022
ac1745e
Update pom.xml
mohancggrl Apr 13, 2022
79ec371
Update index.jsp
mohancggrl Apr 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
pipeline {
agent any
tools {
maven 'maven'
}
environment {
IMAGE = readMavenPom().getArtifactId()
VERSION = readMavenPom().getVersion()
}
stages {
stage ('git_checkout') {
steps {
git branch: 'dev', url: 'https://github.com/mohancggrl/hello-world-war.git'
}
}
stage ('mvn_build') {
steps {
sh "mvn clean package"
}
}
stage ('Upload_nexus') {
steps {
nexusArtifactUploader artifacts: [
[
artifactId: "${IMAGE}",
classifier: '',
file: "target/${IMAGE}-${VERSION}.war",
type: 'war'
]
],
credentialsId: 'Nexus3',
groupId: 'com.efsavage',
nexusUrl: '172.31.12.143:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'Hello_World',
version: "${VERSION}"
}
}
stage ('Deploy') {
steps {
git 'https://github.com/mohancggrl/CD.git'
sshPublisher (publishers: [
sshPublisherDesc
(
configName: 'ansbile',
transfers: [
sshTransfer
(
cleanRemote: false, excludes: '',
execCommand: "ansible-playbook -i /opt/hosts /opt/deploy.yml --extra-vars NODE=app --extra-vars username=admin password=cggrL@123 --extra-vars artifact_id=${IMAGE} --extra-vars version=${VERSION}",
execTimeout: 120000, flatten: false,
makeEmptyDirs: false,
noDefaultExcludes: false,
patternSeparator: '[, ]+',
remoteDirectory: '',
remoteDirectorySDF: false,
removePrefix: '',
sourceFiles: '*/'
)
],
usePromotionTimestamp: false,
useWorkspaceInPromotion: false,
verbose: false
)
]
)
}
}
}
}
1 change: 1 addition & 0 deletions Teju
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is Teju
56 changes: 56 additions & 0 deletions jenkins_file
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
pipeline {
agent {
label 'master'
}
tools {
maven 'maven4'
}
parameters {
choice (
choices: ['false', 'true'],
description: 'Run CI Job',
name: 'ci'
)
choice (
choices: ['false', 'true'],
description: 'Run cd Job',
name: 'cd'
)

// string (
// name: 'version',
// defaultValue: '9.0.0',
// description: 'deploy specified version'
// )
}
environment {
pom = readMavenPom file: 'pom.xml'
version = "${pom.version}"
}
stages {
// stage('git_checkout') {
// steps {
// git credentialsId: 'git', url: 'https://github.com/mohancggrl/hello-world-war.git'
// }
// }
stage('sonar') {
steps {
sh 'mvn clean install sonar:sonar -Dsonar.host.url=http://3.83.230.109:9000/ -Dsonar.login=525226d75595e2802bcc44f4ace096ad7d616bb4'
}
}
stage('build & deploy') {
steps {
sh 'mvn clean deploy'
}
}
stage('deploy') {
agent {
label 'ansible'
}
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'git', url: 'https://github.com/mohancggrl/devops_deploy.git']]])
sh 'ansible-playbook -i inventory.yml deploy.yml -e version=$version'
}
}
}
}
75 changes: 75 additions & 0 deletions jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
def pomv
pipeline {
agent any
tools {
maven 'maven'
}
stages {
stage ('Git-Fetch') {
steps {
git '[email protected]:mohancggrl/hello-world-war.git'
}
}
stage ('build') {
steps {
sh 'mvn clean package'
}
}
stage ('upload_to Nexus') {
steps {
script {
def pom = readMavenPom file: 'pom.xml'
pomv = "${pom.version}"
nexusArtifactUploader artifacts: [
[
artifactId: 'hello-world-war',
classifier: '',
file: "target/hello-world-war-${pom.version}.war",
type: 'war'
]
],
credentialsId: 'Nexus3',
groupId: 'com.efsavage',
nexusUrl: '172.31.8.254:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'mouni',
version: "${pom.version}"
}
}
}
stage ('deploy') {
steps {
git '[email protected]:mohancggrl/deploy.git'
sshPublisher (publishers: [
sshPublisherDesc
(
configName: 'ansible',
transfers:
[
sshTransfer
(
cleanRemote: false,
excludes: '',
execCommand: "ansible-playbook -i /opt/opt/hosts /opt/opt/deploy.yml --extra-var NODE=web --extra-var war_version=${pomv}",
execTimeout: 120000,
flatten: false,
makeEmptyDirs: false,
noDefaultExcludes: false,
patternSeparator: '[, ]+',
remoteDirectory: '/opt/',
remoteDirectorySDF: false,
removePrefix: '',
sourceFiles: '*/'
)
],
usePromotionTimestamp: false,
useWorkspaceInPromotion: false,
verbose: false
)
]
)
}
}
}
}
71 changes: 71 additions & 0 deletions mohan
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
pipeline {
agent any
tools {
maven 'maven'
}
environment {
IMAGE = readMavenPom().getArtifactId()
VERSION = readMavenPom().getVersion()
}
stages {
stage ('git_checkout') {
steps {
git 'https://github.com/mohancggrl/hello-world-war.git'
}
}
stage ('mvn_build') {
steps {
sh "mvn clean package"
}
}
stage ('Upload_nexus') {
steps {
nexusArtifactUploader artifacts: [
[
artifactId: "${IMAGE}",
classifier: '',
file: "target/${IMAGE}-${VERSION}.war",
type: 'war'
]
],
credentialsId: 'Nexus3',
groupId: 'com.efsavage',
nexusUrl: '172.31.12.143:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'Hello_World',
version: "${VERSION}"
}
}
stage ('Deploy') {
steps {
git 'https://github.com/mohancggrl/CD.git'
sshPublisher (publishers: [
sshPublisherDesc
(
configName: 'ansbile',
transfers: [
sshTransfer
(
cleanRemote: false, excludes: '',
execCommand: "ansible-playbook -i /opt/hosts /opt/deploy.yml --extra-vars NODE=app --extra-vars username=admin password=cggrL@123 --extra-vars artifact_id=${IMAGE} --extra-vars version=${VERSION}",
execTimeout: 120000, flatten: false,
makeEmptyDirs: false,
noDefaultExcludes: false,
patternSeparator: '[, ]+',
remoteDirectory: '',
remoteDirectorySDF: false,
removePrefix: '',
sourceFiles: '*/'
)
],
usePromotionTimestamp: false,
useWorkspaceInPromotion: false,
verbose: false
)
]
)
}
}
}
}
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.efsavage</groupId>
<artifactId>hello-world-war</artifactId>
<version>1.0.0</version>
<version>12.0.0</version>
<packaging>war</packaging>
<name>Hello World Web Application Repository</name>
<description>Simplest possible Java Webapp</description>
Expand All @@ -25,5 +25,11 @@
</plugin>
</plugins>
</build>

</project>
<distributionManagement>
<repository>
<id>nexus</id>
<name>hello-world</name>
<url>http://3.83.230.109:8081/repository/hello-world/</url>
</repository>
</distributionManagement>
</project>
Loading