Skip to content

Commit 539c316

Browse files
author
Sheyla Trudo
committed
fixup! Separate Build Changes
1 parent 9c00b97 commit 539c316

File tree

3 files changed

+78
-64
lines changed

3 files changed

+78
-64
lines changed

.pipelines/containers/container-template.jobs.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,36 @@ parameters:
88
- name: images
99
type: object
1010

11-
- name: pushAcr
12-
type: string
11+
- name: containerRegistry
12+
type: object
1313

1414

1515
jobs:
1616
- ${{ each image in parameters.images }}:
1717
- job: ${{ replace(image, '-', '_') }}_${{ parameters.os }}_${{ parameters.arch }}
1818
displayName: Build Image - (${{ image }} ${{ parameters.os }}/${{ parameters.arch }})
19+
templateContext:
20+
authenticatedContainerRegistries:
21+
- registry: ${{ parameters.containerRegistry.name }}
22+
identity: ManagedIdentity
23+
- registry: onebranch.azurecr.io
24+
tenant: AME
25+
identity: 1ESPipelineIdentity
1926

2027
steps:
2128
- task: GoTool@0
2229
inputs:
2330
version: $(GO_VERSION)
24-
31+
2532
- task: AzureCLI@2
33+
displayName: "Docker Login"
2634
inputs:
2735
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
2836
scriptLocation: "inlineScript"
2937
scriptType: "bash"
3038
addSpnToEnvironment: true
3139
inlineScript: |
32-
az acr login --name "$ACR"
40+
ls -la /bin
3341
env:
3442
ACR: ${{ parameters.pushAcr }}
3543

.pipelines/run-pipeline.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ stages:
8585
- cns
8686
- ipv6-hp-bpf
8787
- npm
88-
pushAcr: acnpublic
88+
containerRegistry:
89+
name: $(ACR_NAME)
90+
#clientId: $(ACR_CLIENTID)
8991
- template: containers/container-template.jobs.yaml
9092
parameters:
9193
arch: arm64
@@ -96,7 +98,9 @@ stages:
9698
- cns
9799
- ipv6-hp-bpf
98100
- npm
99-
pushAcr: acnpublic
101+
containerRegistry:
102+
name: $(ACR_NAME)
103+
#clientId: $(ACR_CLIENTID)
100104
- template: containers/container-template.jobs.yaml
101105
parameters:
102106
arch: amd64
@@ -106,7 +110,9 @@ stages:
106110
- cni
107111
- cns
108112
- npm
109-
pushAcr: acnpublic
113+
containerRegistry:
114+
name: $(ACR_NAME)
115+
#clientId: $(ACR_CLIENTID)
110116

111117

112118
- stage: publish
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
stages:
2-
- stage: test
3-
displayName: Test ACN
4-
dependsOn:
5-
- setup
6-
jobs:
7-
- job: test
8-
displayName: Run Tests
9-
variables:
10-
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
11-
pool:
12-
name: "$(BUILD_POOL_NAME_DEFAULT)"
13-
os: linux
14-
image: acn-runner-vmss-image-1es-v3.0
15-
steps:
16-
- task: GoTool@0
17-
inputs:
18-
version: $(GO_VERSION)
2+
- stage: test
3+
displayName: Test ACN
4+
dependsOn:
5+
- setup
6+
jobs:
7+
- job: test
8+
displayName: Run Tests
9+
variables:
10+
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
11+
pool:
12+
name: "$(BUILD_POOL_NAME_DEFAULT)"
13+
os: linux
14+
image: acn-runner-vmss-image-1es-v3.0
15+
steps:
16+
- task: GoTool@0
17+
inputs:
18+
version: $(GO_VERSION)
1919

20-
- script: |
21-
make tools
22-
# run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml), stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code. Read all output from fd 4 (output from tee) and write to top stdout
23-
{ { { {
24-
sudo -E env "PATH=$PATH" make test-all;
25-
echo $? >&3;
26-
} | tee >(build/tools/bin/go-junit-report > report.xml) >&4;
27-
} 3>&1;
28-
} | { read xs; exit $xs; }
29-
} 4>&1
30-
retryCountOnTaskFailure: 3
31-
name: "Test"
32-
displayName: "Run Tests"
20+
- script: |
21+
make tools
22+
# run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml), stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code. Read all output from fd 4 (output from tee) and write to top stdout
23+
{ { { {
24+
sudo -E env "PATH=$PATH" make test-all;
25+
echo $? >&3;
26+
} | tee >(build/tools/bin/go-junit-report > report.xml) >&4;
27+
} 3>&1;
28+
} | { read xs; exit $xs; }
29+
} 4>&1
30+
retryCountOnTaskFailure: 3
31+
name: "Test"
32+
displayName: "Run Tests"
3333
34-
- stage: test_windows
35-
displayName: Test ACN Windows
36-
dependsOn:
37-
- setup
38-
jobs:
39-
- job: test
40-
displayName: Run Tests
41-
variables:
42-
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
43-
pool:
44-
name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS)"
45-
os: windows
46-
image: acn-runner-vmss-image-windows-1es-v2.0
47-
steps:
48-
- task: GoTool@0
49-
inputs:
50-
version: $(GO_VERSION)
34+
- stage: test_windows
35+
displayName: Test ACN Windows
36+
dependsOn:
37+
- setup
38+
jobs:
39+
- job: test
40+
displayName: Run Tests
41+
variables:
42+
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
43+
pool:
44+
name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS)"
45+
os: windows
46+
image: acn-runner-vmss-image-windows-1es-v2.0
47+
steps:
48+
- task: GoTool@0
49+
inputs:
50+
version: $(GO_VERSION)
5151

52-
- script: |
53-
cd npm/
54-
go test ./...
55-
cd ../cni/
56-
go test ./...
57-
cd ../platform/
58-
go test ./...
59-
retryCountOnTaskFailure: 3
60-
name: "TestWindows"
61-
displayName: "Run Windows Tests"
52+
- script: |
53+
cd npm/
54+
go test ./...
55+
cd ../cni/
56+
go test ./...
57+
cd ../platform/
58+
go test ./...
59+
retryCountOnTaskFailure: 3
60+
name: "TestWindows"
61+
displayName: "Run Windows Tests"
6262

0 commit comments

Comments
 (0)