GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Dev/Jenkinsfile-jfrog.txt at main · Keshav2kumar/Dev

Expand file tree

/

Jenkinsfile-jfrog.txt

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
113 lines (109 loc) · 3.76 KB
/

Jenkinsfile-jfrog.txt

Copy path

File metadata and controls

113 lines (109 loc) · 3.76 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
pipeline {
agent {
label 'testslave'
}
stages {
stage('Checkout code') {
steps {
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/Rahul-training/Devops.git']])
}
}
stage('Install Maven Build Tool') {
steps {
sh 'wget https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz'
sh 'tar -xzvf /tmp/workspace/test/apache-maven-3.9.4-bin.tar.gz'
}
}
stage('Compile Sample Application') {
steps {
dir('/tmp/workspace/test/addressbook/addressbook_main'){
sh '/tmp/workspace/test/apache-maven-3.9.4/bin/mvn compile'
}
}
}
stage('Test Sample Application') {
steps {
dir('/tmp/workspace/test/addressbook/addressbook_main'){
sh '/tmp/workspace/test/apache-maven-3.9.4/bin/mvn test'
}
}
}
stage('Package Sample Application') {
steps {
dir('/tmp/workspace/test/addressbook/addressbook_main'){
sh '/tmp/workspace/test/apache-maven-3.9.4/bin/mvn package'
}
}
}
stage('Upload Jfrog Artifact') {
steps {
dir('/tmp/workspace/test/addressbook/addressbook_main/target'){
rtServer (
id: 'server-1',
url: 'http://20.235.151.127:8081/artifactory',
// If you're using username and password:
//username: 'admin',
//password: 'password',
// If you're using Credentials ID:
credentialsId: 'jfrog-connection',
// If Jenkins is configured to use an http proxy, you can bypass the proxy when using this Artifactory server:
bypassProxy: true,
// Configure the connection timeout (in seconds).
// The default value (if not configured) is 300 seconds:
timeout: 300
)
rtUpload (
serverId: 'server-1',
spec: '''{
"files": [
{
"pattern": "addressbook.war",
"target": "libs-snapshot-local"
}
]
}''',
)
}
}
}
stage('Download Jfrog Artifact') {
steps {
dir('/tmp'){
rtDownload (
serverId: 'server-1',
spec: '''{
"files": [
{
"pattern": "libs-snapshot-local/",
"target": ""
}
]
}''',
)
}
}
}
stage('Tomcat Prerequisites Installation') {
steps {
sh 'sudo apt update'
sh 'sudo apt install openjdk-17-jre -y'
}
}
stage('Install Apache Tomcat Server') {
steps {
sh 'wget https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.24/bin/apache-tomcat-8.5.24.tar.gz'
sh 'tar -xzvf apache-tomcat-8.5.24.tar.gz'
sh 'sudo chown -R cloudadmin:cloudadmin apache-tomcat-8.5.24'
sh 'sudo cp tomcat-users.xml apache-tomcat-8.5.24/conf/tomcat-users.xml'
sh 'sudo cp context.xml apache-tomcat-8.5.24/webapps/manager/META-INF/context.xml'
sh 'sudo sed -i "s/8080/8082/g" apache-tomcat-8.5.24/conf/server.xml'
}
}
stage('Deploy Sample Application To Tomcat Server') {
steps {
sh 'sudo cp addressbook/addressbook_main/target/addressbook.war apache-tomcat-8.5.24/webapps/'
sh 'sudo runuser -l cloudadmin -c "/tmp/workspace/test/apache-tomcat-8.5.24/bin/startup.sh"'
}
}
}
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.