-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
49 lines (44 loc) · 1.15 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
49 lines (44 loc) · 1.15 KB
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
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: Bash@3
displayName: "code build"
inputs:
targetType: 'inline'
script: |
#!/bin/bash
mvn clean package
- task: Bash@3
displayName: "collectiong versio no"
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "##vso[task.setvariable variable=version]$(cat pom.xml|grep "<version>"|head -1|sed 's/<version>//g'|sed 's/<\/version>//g'|sed 's/[[:space:]]//g')"
- task: Bash@3
displayName: "Prepare artifact"
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "-- my verion is $(version)"
mkdir -p /tmp/$(version)
cp ./target/*.jar /tmp/$(version)/app.jar
ls -l /tmp/$(version)
- task: UniversalPackages@1
inputs:
command: 'publish'
feed: 'mcdaib1/myapp-artifacts'
packageName: 'javaspringboot'
packageVersion: '$(version)'
directory: '/tmp/$(version)'
# - task: UniversalPackages@1
# displayName: "publish artifacts"
# inputs:
# command: 'publish'
# feed: 'myapp-artifacts'
# packageName: 'javaspringboot'
# packageVersion: '$(version)'
# directory: '/tmp/$(version)'