1
- # trigger: none
2
-
3
- # The `resources` specify the location and version of the 1ES PT.
4
- resources :
5
- repositories :
6
- - repository : 1esPipelines
7
- type : git
8
- name : 1ESPipelineTemplates/1ESPipelineTemplates
9
- ref : refs/tags/release
10
-
11
- extends :
12
- # The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
13
- # For non-production pipelines, use "Unofficial" as defined below.
14
- # For productions pipelines, use "Official".
15
- template : v1/1ES.Official.PipelineTemplate.yml@1esPipelines
16
- parameters :
17
- # Update the pool with your team's 1ES hosted pool.
18
- pool :
19
- name : AzurePipelines-EO
20
- image : AzurePipelinesUbuntu20.04compliant # Name of the image in your pool. If not specified, first image of the pool is used
21
- os : linux # OS of the image. Allowed values: windows, linux, macOS
22
-
23
- stages :
24
- - stage : Stage
25
- jobs :
26
- - job : HostJob
27
- timeoutInMinutes : 250
28
- # If the pipeline publishes artifacts, use `templateContext` to define the artifacts.
29
- # This will enable 1ES PT to run SDL analysis tools on the artifacts and then upload them.
30
- templateContext :
31
- outputs :
32
- - output : pipelineArtifact
33
- targetPath : $(Build.ArtifactStagingDirectory)
34
- artifactName : buildImageBasesJobArtifact
35
- # Define the steps that the pipeline will run.
36
- # In most cases, copy and paste the steps from the original pipeline.
37
- steps :
38
- - task : ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
39
- displayName : ' Component Detection - OSS Compliance'
40
- inputs :
41
- ignoreDirectories : ' $(Build.SourcesDirectory)/tests'
42
-
43
- - task : ShellScript@2
44
- displayName : Build images
45
- inputs :
46
- scriptPath : ${{ parameters.scriptPath }}
47
- args : ${{ parameters.imageDir }} ${{ parameters.imageDebianFlavor }}
48
- env :
49
- ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN : $(ORYX-SDK-STAGING-PRIVATE-SAS-TOKEN)
50
- DOTNET_PRIVATE_STORAGE_ACCOUNT_ACCESS_TOKEN : $(DotnetPrivateStorageAccountAccessToken)
51
-
52
- - task : AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
53
- displayName : Generate Software Bill of Materials (SBOM)
54
- inputs :
55
- BuildDropPath : ' $(Build.ArtifactStagingDirectory)'
56
- AdditionalComponentDetectorArgs : ' --DirectoryExclusionList **/SampleApps/**'
57
-
58
- - task : CopyFiles@2
59
- displayName : Copy artifacts to staging directory
60
- inputs :
61
- sourceFolder : ' $(Build.SourcesDirectory)/artifacts'
62
- contents : ' **/*.*'
63
- targetFolder : $(Build.ArtifactStagingDirectory)
64
- overWrite : true
65
- condition : true
66
-
67
- - task : Docker@1
68
- displayName : Push built base images to dev ACR
69
- inputs :
70
- command : push
71
- azureSubscriptionEndpoint : $(ascName)
72
- azureContainerRegistry : $(acrName)
73
- pushMultipleImages : true
74
- imageNamesPath : ' $(Build.ArtifactStagingDirectory)/images/${{ parameters.artifactsFileName }}'
75
- enforceDockerNamingConvention : false
76
-
77
- - task : ShellScript@2
78
- displayName : ' Clean up Docker containers and images'
79
- inputs :
80
- scriptPath : ./vsts/scripts/cleanDocker.sh
81
-
82
- - task : PublishBuildArtifacts@1
83
- displayName : Publish build artifacts
84
- inputs :
85
- pathtoPublish : $(Build.ArtifactStagingDirectory)
86
-
87
- - task : ShellScript@2
88
- displayName : ' Clean up Docker containers and images'
89
- inputs :
90
- scriptPath : ./vsts/scripts/cleanDocker.sh
91
- condition : true
1
+ jobs :
2
+ - job : ${{ parameters.jobName }}
3
+ displayName : ${{ parameters.displayName }}
4
+ timeoutInMinutes : 250
5
+ templateContext :
6
+ outputs :
7
+ - output : pipelineArtifact
8
+ displayName : ' Publish build artifacts'
9
+ targetPath : $(Build.ArtifactStagingDirectory)
10
+ steps :
11
+ - task : ShellScript@2
12
+ displayName : Build images
13
+ inputs :
14
+ scriptPath : ${{ parameters.scriptPath }}
15
+ args : ${{ parameters.imageDir }} ${{ parameters.imageDebianFlavor }}
16
+ env :
17
+ ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN : $(ORYX-SDK-STAGING-PRIVATE-SAS-TOKEN)
18
+ DOTNET_PRIVATE_STORAGE_ACCOUNT_ACCESS_TOKEN : $(DotnetPrivateStorageAccountAccessToken)
19
+ - task : CopyFiles@2
20
+ displayName : Copy artifacts to staging directory
21
+ inputs :
22
+ sourceFolder : ' $(Build.SourcesDirectory)/artifacts'
23
+ contents : ' **/*.*'
24
+ targetFolder : $(Build.ArtifactStagingDirectory)
25
+ overWrite : true
26
+ condition : true
27
+ - task : 1ES.PushContainerImage@1
28
+ displayName : Push built base images to dev ACR
29
+ inputs :
30
+ image : ' $(Build.ArtifactStagingDirectory)/images/${{ parameters.artifactsFileName }}'
31
+ remoteImage : $(acrname)/$(Build.ArtifactStagingDirectory)/images/${{ parameters.artifactsFileName }}
32
+ - task : ShellScript@2
33
+ displayName : ' Clean up Docker containers and images'
34
+ inputs :
35
+ scriptPath : ./vsts/scripts/cleanDocker.sh
36
+ - task : ShellScript@2
37
+ displayName : ' Clean up Docker containers and images'
38
+ inputs :
39
+ scriptPath : ./vsts/scripts/cleanDocker.sh
40
+ condition : true
0 commit comments