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 1001 #10

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
dbbf68a
update gitignore file
EllenLiu2019 Jul 20, 2024
4a9cdf4
upgrade maven-compiler-plugin from 1.6 to 1.8
EllenLiu2019 Jul 20, 2024
eef22a8
empty commit
EllenLiu2019 Jul 20, 2024
992cc18
add jenkinsfile
EllenLiu2019 Jul 20, 2024
8bb1000
add docker file
EllenLiu2019 Jul 20, 2024
c3bbf39
add docker file
EllenLiu2019 Jul 20, 2024
4ef744b
update Jenkinsfile
EllenLiu2019 Jul 25, 2024
675ed4a
empty commit
EllenLiu2019 Jul 25, 2024
4d2277d
Merge pull request #1 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
66e3165
update jenkins file
EllenLiu2019 Jul 25, 2024
0554789
Merge pull request #2 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
d2d6374
update jenkins file
EllenLiu2019 Jul 25, 2024
f679033
Merge pull request #3 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
068e5df
update jenkins file
EllenLiu2019 Jul 25, 2024
55f345c
Merge branch 'master' into TEST-1001
EllenLiu2019 Jul 25, 2024
12549c6
Merge pull request #4 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
67250e8
empty commit
EllenLiu2019 Jul 25, 2024
42d4706
Merge pull request #5 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
f306846
update
EllenLiu2019 Jul 25, 2024
e88d3a4
Merge branch 'master' into TEST-1001
EllenLiu2019 Jul 25, 2024
41ca651
Merge pull request #6 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
2dfcdd9
add docker file
EllenLiu2019 Jul 25, 2024
0e37b9c
Merge pull request #7 from EllenLiu2019/TEST-1001
EllenLiu2019 Jul 25, 2024
f4d9bb8
update
EllenLiu2019 Jul 25, 2024
ec77a09
update
EllenLiu2019 Jul 25, 2024
5fa920c
Update jenkinsfile
EllenLiu2019 Aug 1, 2024
7b8be39
Update jenkinsfile
EllenLiu2019 Aug 1, 2024
852b2cb
Update jenkinsfile
EllenLiu2019 Aug 1, 2024
de38c6d
Update jenkinsfile
EllenLiu2019 Aug 1, 2024
8207a9b
Update jenkinsfile
EllenLiu2019 Aug 1, 2024
b2d7d3e
Update jenkinsfile
EllenLiu2019 Aug 1, 2024
ba90df8
Merge branch 'master' into TEST-1001
EllenLiu2019 Aug 1, 2024
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
target
.idea
.DS_Store
7 changes: 7 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM tomcat:latest

ADD ./webapp/target/*.war /usr/local/tomcat/webapps/

EXPOSE 8080

CMD ["catalina.sh","run"]
64 changes: 64 additions & 0 deletions jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

def jobName = env.JOB_NAME.split("/")[-1]

pipeline{
agent any
tools {
maven 'Maven'
}

parameters {
string(name: 'branch', defaultValue: 'master', description: 'github branch')
}

/* triggers {
pollSCM('* * * * *')
} */

triggers {
GenericTrigger(
genericVariables: [
[key: 'action', value: '$.action'],
[key: 'FEATURE_BRANCH', value: '$.pull_request.head.ref'],
[key: 'CURRENT_BRANCH', value: '$.pull_request.base.ref']
],

causeString: 'Triggered on pull request $action',

token: 'abc123',
tokenCredentialId: '',

printContributedVariables: true,
printPostContent: true,

silentResponse: false,

shouldNotFlatten: false,

regexpFilterText: '$action',

regexpFilterExpression: '*'

)
}

stages {
/* stage('Init') {
steps {
timeout(time: 60, unit: 'SECONDS'){
input message: 'approve to build job'
}
}
} */
stage('Build'){
steps {
echo "jobName: ${jobName}"
echo "FEATURE_BRANCH: ${FEATURE_BRANCH}"
echo "CURRENT_BRANCH: ${CURRENT_BRANCH}"
echo "action: ${action}"
//sh 'mvn clean package'
//sh "/usr/local/bin/docker build . -t tomcatwebapp:${env.BUILD_ID}"
}
}
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

Expand Down