ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
Pipeline YML file:-------------------------------------------------------------------------------------------------------------------------------------------------------------# Maven# Build your Java project and run tests with Apache Maven.# Add steps that analyze code, save build artifacts, deploy, and more:# docs.microsoft.com/azure/devops/pipelines/languages/javatrigger:- masterpool: vmImage: ubuntu-lateststeps:- task: Maven@3 inputs: mavenPomFile: 'pom.xml' mavenOptions: '-Xmx3072m' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'package'- task: TomcatDeployment@1 inputs: TomcatUrl: 'YOUR-JENKINS-URL' Username: 'JENKINS-ADMIN-USERNAME' Password: 'JENKINS-ADMIN-PASSWORD' Warfile: 'target/NAME-OF-YOUR-WAR-FILE' Context: '/azure-deploy' ServerVersion: '7OrAbove'-------------------------------------------------------------------------------------------------------------------------------------------------------------
very straight forward, thanks !!
Pipeline YML file:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
- task: TomcatDeployment@1
inputs:
TomcatUrl: 'YOUR-JENKINS-URL'
Username: 'JENKINS-ADMIN-USERNAME'
Password: 'JENKINS-ADMIN-PASSWORD'
Warfile: 'target/NAME-OF-YOUR-WAR-FILE'
Context: '/azure-deploy'
ServerVersion: '7OrAbove'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
very straight forward, thanks !!