-
Notifications
You must be signed in to change notification settings - Fork 11
/
azure-pipelines-36.yml
79 lines (64 loc) · 1.89 KB
/
azure-pipelines-36.yml
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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger: none
pr: none
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: |
mkdir scripts
echo "echo 'from file'" > scripts/boot.sh
./scripts/boot.sh
continueOnError: true
- bash: |
echo "echo 'from file 2'" > scripts/boot2.sh
chmod u=rwx boot2.sh
./scripts/boot2.sh
continueOnError: true
- bash: |
tar -czf "$(Build.StagingDirectory)/update2.tar.gz" *
workingDirectory: $(Build.SourcesDirectory)/scripts
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)/scripts'
includeRootFolder: false
archiveType: "tar"
tarCompression: "gz"
archiveFile: "$(Build.StagingDirectory)/update.tar.gz"
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Build.StagingDirectory)/update.tar.gz'
destinationFolder: test
cleanDestinationFolder: true
- bash: |
./test/boot.sh
continueOnError: true
displayName: 'Run extracted file using ArchiveFiles@2 and ExtractFiles@1'
- bash: |
./test/boot2.sh
continueOnError: true
displayName: 'Run extracted file with permission set before pack using ArchiveFiles@2 and ExtractFiles@1'
- bash: |
ls '$(Build.StagingDirectory)'
mkdir test2
tar -xvf "$(Build.StagingDirectory)/update2.tar.gz" -C '$(Build.SourcesDirectory)/test2'
ls
ls test2
ls test2/scripts
continueOnError: true
- bash : ls
- bash: |
./test2/boot.sh
continueOnError: true
displayName: 'Run extracted file using tar'
- bash: |
./test2/boot2.sh
continueOnError: true
displayName: 'Run extracted file with permission set before pack using tar'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'