Skip to content

Commit d929d1a

Browse files
authored
chore: Specify CI build pool name (#841)
* Specify pool name
1 parent 8449676 commit d929d1a

File tree

10 files changed

+75
-68
lines changed

10 files changed

+75
-68
lines changed

.pipelines/npm/npm-conformance-tests.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- job: setup
1414
displayName: "Configure Test Environment"
1515
pool:
16-
name: Networking-ContainerNetworking
16+
name: $(BUILD_POOL_NAME_DEFAULT)
1717
demands:
1818
- agent.os -equals Linux
1919
- Role -equals Build
@@ -44,7 +44,7 @@ jobs:
4444
- job: Build_test
4545
displayName: "Build NPM and Kubernetes Test Suite"
4646
pool:
47-
name: Networking-ContainerNetworking
47+
name: $(BUILD_POOL_NAME_DEFAULT)
4848
demands:
4949
- agent.os -equals Linux
5050
- Role -equals Build
@@ -87,7 +87,7 @@ jobs:
8787
- job: Create_cluster
8888
displayName: "Deploy AKS Cluster"
8989
pool:
90-
name: Networking-ContainerNetworking
90+
name: $(BUILD_POOL_NAME_DEFAULT)
9191
demands:
9292
- agent.os -equals Linux
9393
- Role -equals Build
@@ -123,7 +123,7 @@ jobs:
123123
timeoutInMinutes: 360
124124
displayName: "Run Kubernetes Network Policy Test Suite"
125125
pool:
126-
name: Networking-ContainerNetworking
126+
name: $(BUILD_POOL_NAME_DEFAULT)
127127
demands:
128128
- agent.os -equals Linux
129129
- Role -equals Build
@@ -190,7 +190,7 @@ jobs:
190190
- job: Clean_up
191191
displayName: "Cleanup"
192192
pool:
193-
name: Networking-ContainerNetworking
193+
name: $(BUILD_POOL_NAME_DEFAULT)
194194
demands:
195195
- agent.os -equals Linux
196196
- Role -equals Build

.pipelines/pipeline.yaml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ stages:
1515
- job: unit_tests
1616
displayName: CNI, NPM, CNS, CNM
1717
pool:
18-
name: Networking-ContainerNetworking
19-
demands:
20-
- agent.os -equals Linux
21-
- Role -equals Build
22-
23-
container:
24-
image: "$(BUILD_IMAGE)" # build image set as variable in pipeline runtime for flexibility
25-
options: "--privileged"
18+
name: "$(BUILD_POOL_NAME_DEFAULT)"
2619

2720
# Go setup for the vmImage:
2821
# https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/scripts/installers/go.sh
@@ -32,18 +25,9 @@ stages:
3225
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking" # $(build.repository.name)' # Path to the module's code
3326

3427
steps:
35-
- bash: |
36-
echo $UID
37-
sudo rm -rf $(System.DefaultWorkingDirectory)/*
38-
sudo rm /run/docker/plugins/test.sock || true
39-
sudo ip link del dev dummy || true
40-
displayName: "Set up OS environment"
41-
42-
- checkout: self
4328

4429
- bash: |
45-
go version
46-
go env
30+
go version
4731
mkdir -p '$(GOBIN)'
4832
mkdir -p '$(GOPATH)/pkg'
4933
mkdir -p '$(modulePath)'
@@ -52,6 +36,7 @@ stages:
5236
mv !(gopath) '$(modulePath)'
5337
echo '##vso[task.prependpath]$(GOBIN)'
5438
echo '##vso[task.prependpath]$(GOROOT)/bin'
39+
go env
5540
name: "GoEnv"
5641
displayName: "Set up the Go environment"
5742
@@ -61,6 +46,7 @@ stages:
6146
echo "##vso[task.setvariable variable=CommitHash;isOutput=true]$(git rev-parse HEAD)"
6247
echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --always --dirty)"
6348
echo "##vso[task.setvariable variable=ImageTag;isOutput=true]$(git describe --tags --always --dirty)-test"
49+
sudo chown -R $(whoami):$(whoami) .
6450
workingDirectory: "$(modulePath)"
6551
name: "EnvironmentalVariables"
6652
displayName: "Set environmental variables"
@@ -79,15 +65,13 @@ stages:
7965
displayName: "Install Go dependencies"
8066
8167
- script: |
82-
export GOOS=windows
83-
make all-binaries VERSION=$(EnvironmentalVariables.Tag)
68+
GOOS=windows make all-binaries VERSION=$(EnvironmentalVariables.Tag)
8469
workingDirectory: "$(modulePath)"
8570
name: "BuildWindows"
8671
displayName: "Build Windows"
8772
8873
- script: |
89-
export GOOS=linux
90-
make all-binaries VERSION=$(EnvironmentalVariables.Tag)
74+
GOOS=linux make all-binaries VERSION=$(EnvironmentalVariables.Tag)
9175
workingDirectory: "$(modulePath)"
9276
name: "BuildLinux"
9377
displayName: "Build Linux"
@@ -253,10 +237,8 @@ stages:
253237
- job: delete_remote_artifacts
254238
displayName: Delete remote artifacts
255239
pool:
256-
name: Networking-ContainerNetworking
240+
name: $(BUILD_POOL_NAME_DEFAULT)
257241
demands: agent.os -equals Linux
258-
container:
259-
image: "$(BUILD_IMAGE)"
260242
steps:
261243
- checkout: none
262244
- task: AzureCLI@1

.pipelines/singletenancy/aks-engine/e2e-job-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ stages:
1616
displayName: Singletenancy AKS Engine Suite - (${{ parameters.name }})
1717
timeoutInMinutes: 120
1818
pool:
19-
name: Networking-ContainerNetworking
19+
name: $(BUILD_POOL_NAME_DEFAULT)
2020
demands:
2121
- agent.os -equals Linux
2222
- Role -equals Build
2323
container:
24-
image: ${{ parameters.pipelineBuildImage }}
24+
image: mcr.microsoft.com/oss/azcu/go-dev:$(GO_DEV_IMAGE_TAG)
2525
variables:
2626
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
2727
GOBIN: "$(GOPATH)/bin" # Go binaries path

.pipelines/singletenancy/aks-engine/e2e-step-template.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ steps:
6969
echo "Running E2E tests against a cluster built with the following API model:"
7070
cat '${{ parameters.clusterDefinition }}'
7171
cp ${{ parameters.clusterDefinition }} clusterDefinition.json
72-
curl -L https://dl.k8s.io/v1.17.4/kubernetes-client-linux-amd64.tar.gz | tar xvzf -
73-
sudo cp kubernetes/client/bin/kubectl /usr/local/bin/kubectl
74-
sudo cp kubernetes/client/bin/kubectl /usr/local/bin/k
7572
displayName: Configure AKS-Engine
7673
workingDirectory: "$(modulePath)"
7774
@@ -91,7 +88,6 @@ steps:
9188
export IS_JENKINS=false
9289
export DEBUG_CRASHING_PODS=true
9390
export AZURE_CORE_ONLY_SHOW_ERRORS=True
94-
export
9591
make test-kubernetes
9692
name: DeployAKSEngine
9793
displayName: Run AKS-Engine E2E Tests

.pipelines/singletenancy/aks-swift/e2e-job-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ stages:
1212
displayName: Singletenancy AKS on Swift Suite - (${{ parameters.name }})
1313
timeoutInMinutes: 120
1414
pool:
15-
name: Networking-ContainerNetworking
15+
name: "$(BUILD_POOL_NAME_SWIFT)"
1616
demands:
1717
- agent.os -equals Linux
1818
- Role -equals $(CUSTOM_E2E_ROLE)

Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ ACN_PACKAGE_PATH = github.com/Azure/azure-container-networking
106106
BUILD_CONTAINER_IMAGE = acn-build
107107
BUILD_CONTAINER_NAME = acn-builder
108108
BUILD_CONTAINER_REPO_PATH = /go/src/github.com/Azure/azure-container-networking
109-
BUILD_USER ?= $(shell id -u)
109+
110110

111111
# Target OS specific parameters.
112112
ifeq ($(GOOS),linux)
@@ -248,7 +248,6 @@ all-containerized:
248248
export GOARCH=$(GOARCH) && \
249249
make all-binaries && \
250250
make all-images && \
251-
chown -R $(BUILD_USER):$(BUILD_USER) $(BUILD_DIR) \
252251
'
253252
docker cp $(BUILD_CONTAINER_NAME):$(BUILD_CONTAINER_REPO_PATH)/$(BUILD_DIR) $(OUTPUT_DIR)
254253
docker rm $(BUILD_CONTAINER_NAME)
@@ -381,15 +380,13 @@ cni-archive:
381380
cp telemetry/azure-vnet-telemetry.config $(CNI_BUILD_DIR)/azure-vnet-telemetry.config
382381
chmod 0755 $(CNI_BUILD_DIR)/azure-vnet$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-ipam$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-ipamv6$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-telemetry$(EXE_EXT)
383382
cd $(CNI_BUILD_DIR) && $(ARCHIVE_CMD) $(CNI_ARCHIVE_NAME) azure-vnet$(EXE_EXT) azure-vnet-ipam$(EXE_EXT) azure-vnet-ipamv6$(EXE_EXT) azure-vnet-telemetry$(EXE_EXT) 10-azure.conflist azure-vnet-telemetry.config
384-
chown $(BUILD_USER):$(BUILD_USER) $(CNI_BUILD_DIR)/$(CNI_ARCHIVE_NAME)
385383

386384
mkdir -p $(CNI_MULTITENANCY_BUILD_DIR)
387385
cp cni/azure-$(GOOS)-multitenancy.conflist $(CNI_MULTITENANCY_BUILD_DIR)/10-azure.conflist
388386
cp telemetry/azure-vnet-telemetry.config $(CNI_MULTITENANCY_BUILD_DIR)/azure-vnet-telemetry.config
389387
cp $(CNI_BUILD_DIR)/azure-vnet$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-ipam$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-telemetry$(EXE_EXT) $(CNI_MULTITENANCY_BUILD_DIR)
390388
chmod 0755 $(CNI_MULTITENANCY_BUILD_DIR)/azure-vnet$(EXE_EXT) $(CNI_MULTITENANCY_BUILD_DIR)/azure-vnet-ipam$(EXE_EXT)
391389
cd $(CNI_MULTITENANCY_BUILD_DIR) && $(ARCHIVE_CMD) $(CNI_MULTITENANCY_ARCHIVE_NAME) azure-vnet$(EXE_EXT) azure-vnet-ipam$(EXE_EXT) azure-vnet-telemetry$(EXE_EXT) 10-azure.conflist azure-vnet-telemetry.config
392-
chown $(BUILD_USER):$(BUILD_USER) $(CNI_MULTITENANCY_BUILD_DIR)/$(CNI_MULTITENANCY_ARCHIVE_NAME)
393390

394391
#baremetal mode is windows only (at least for now)
395392
ifeq ($(GOOS),windows)
@@ -398,7 +395,6 @@ ifeq ($(GOOS),windows)
398395
cp $(CNI_BUILD_DIR)/azure-vnet$(EXE_EXT) $(CNI_BAREMETAL_BUILD_DIR)
399396
chmod 0755 $(CNI_BAREMETAL_BUILD_DIR)/azure-vnet$(EXE_EXT)
400397
cd $(CNI_BAREMETAL_BUILD_DIR) && $(ARCHIVE_CMD) $(CNI_BAREMETAL_ARCHIVE_NAME) azure-vnet$(EXE_EXT) 10-azure.conflist
401-
chown $(BUILD_USER):$(BUILD_USER) $(CNI_BAREMETAL_BUILD_DIR)/$(CNI_BAREMETAL_ARCHIVE_NAME)
402398
endif
403399

404400
#swift mode is linux only
@@ -409,15 +405,13 @@ ifeq ($(GOOS),linux)
409405
cp $(CNI_BUILD_DIR)/azure-vnet$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-ipam$(EXE_EXT) $(CNI_BUILD_DIR)/azure-vnet-telemetry$(EXE_EXT) $(CNI_SWIFT_BUILD_DIR)
410406
chmod 0755 $(CNI_SWIFT_BUILD_DIR)/azure-vnet$(EXE_EXT) $(CNI_SWIFT_BUILD_DIR)/azure-vnet-ipam$(EXE_EXT)
411407
cd $(CNI_SWIFT_BUILD_DIR) && $(ARCHIVE_CMD) $(CNI_SWIFT_ARCHIVE_NAME) azure-vnet$(EXE_EXT) azure-vnet-ipam$(EXE_EXT) azure-vnet-telemetry$(EXE_EXT) 10-azure.conflist azure-vnet-telemetry.config
412-
chown $(BUILD_USER):$(BUILD_USER) $(CNI_SWIFT_BUILD_DIR)/$(CNI_SWIFT_ARCHIVE_NAME)
413408
endif
414409

415410
# Create a CNM archive for the target platform.
416411
.PHONY: cnm-archive
417412
cnm-archive:
418413
chmod 0755 $(CNM_BUILD_DIR)/azure-vnet-plugin$(EXE_EXT)
419414
cd $(CNM_BUILD_DIR) && $(ARCHIVE_CMD) $(CNM_ARCHIVE_NAME) azure-vnet-plugin$(EXE_EXT)
420-
chown $(BUILD_USER):$(BUILD_USER) $(CNM_BUILD_DIR)/$(CNM_ARCHIVE_NAME)
421415

422416
# Create a CNM archive for the target platform.
423417
.PHONY: acncli-archive
@@ -426,7 +420,6 @@ ifeq ($(GOOS),linux)
426420
mkdir -p $(ACNCLI_BUILD_DIR)
427421
chmod 0755 $(ACNCLI_BUILD_DIR)/acn$(EXE_EXT)
428422
cd $(ACNCLI_BUILD_DIR) && $(ARCHIVE_CMD) $(ACNCLI_ARCHIVE_NAME) acn$(EXE_EXT)
429-
chown $(BUILD_USER):$(BUILD_USER) $(ACNCLI_BUILD_DIR)/$(ACNCLI_ARCHIVE_NAME)
430423
endif
431424

432425

@@ -436,15 +429,13 @@ cns-archive:
436429
cp cns/configuration/cns_config.json $(CNS_BUILD_DIR)/cns_config.json
437430
chmod 0755 $(CNS_BUILD_DIR)/azure-cns$(EXE_EXT)
438431
cd $(CNS_BUILD_DIR) && $(ARCHIVE_CMD) $(CNS_ARCHIVE_NAME) azure-cns$(EXE_EXT) cns_config.json
439-
chown $(BUILD_USER):$(BUILD_USER) $(CNS_BUILD_DIR)/$(CNS_ARCHIVE_NAME)
440432

441433
# Create a CNMS archive for the target platform. Only Linux is supported for now.
442434
.PHONY: cnms-archive
443435
cnms-archive:
444436
ifeq ($(GOOS),linux)
445437
chmod 0755 $(CNMS_BUILD_DIR)/azure-cnms$(EXE_EXT)
446438
cd $(CNMS_BUILD_DIR) && $(ARCHIVE_CMD) $(CNMS_ARCHIVE_NAME) azure-cnms$(EXE_EXT)
447-
chown $(BUILD_USER):$(BUILD_USER) $(CNMS_BUILD_DIR)/$(CNMS_ARCHIVE_NAME)
448439
endif
449440

450441
# Create a NPM archive for the target platform. Only Linux is supported for now.
@@ -453,7 +444,6 @@ npm-archive:
453444
ifeq ($(GOOS),linux)
454445
chmod 0755 $(NPM_BUILD_DIR)/azure-npm$(EXE_EXT)
455446
cd $(NPM_BUILD_DIR) && $(ARCHIVE_CMD) $(NPM_ARCHIVE_NAME) azure-npm$(EXE_EXT)
456-
chown $(BUILD_USER):$(BUILD_USER) $(NPM_BUILD_DIR)/$(NPM_ARCHIVE_NAME)
457447
endif
458448

459449
.PHONY: release
@@ -466,7 +456,7 @@ PRETTYGOTEST := $(shell command -v gotest 2> /dev/null)
466456
# run all tests
467457
.PHONY: test-all
468458
test-all:
469-
go test -coverpkg=./... -v -race -covermode atomic -coverprofile=coverage.out ./...
459+
go test -coverpkg=./... -v -race -covermode atomic -failfast -coverprofile=coverage.out ./...
470460

471461
# run all tests
472462
.PHONY: test-integration

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
## Overview
77
This repository contains container networking services and plugins for Linux and Windows containers running on Azure:
88

9-
* [Azure CNI network and IPAM plugins](docs/cni.md) for Kubernetes and DC/OS.
10-
* [Azure CNM (libnetwork) network and IPAM plugins](docs/cnm.md) for Docker Engine.
9+
* [Azure CNI network and IPAM plugins](docs/cni.md) for Kubernetes.
10+
* [Azure CNM (libnetwork) network and IPAM plugins](docs/cnm.md) for Docker Engine. **(MAINTENANCE MODE)**
1111
* [Azure NPM - Kubernetes Network Policy Manager](docs/npm.md) (Supports only linux for now).
1212

1313
The `azure-vnet` network plugins connect containers to your [Azure VNET](https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview), to take advantage of Azure SDN capabilities. The `azure-vnet-ipam` IPAM plugins provide address management functionality for container IP addresses allocated from Azure VNET address space.

cni/network/network_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ func TestPlugin(t *testing.T) {
7070
}
7171
plugin.nm.CreateNetwork(nwInfo)
7272
plugin.Delete(args)
73-
}
73+
}

0 commit comments

Comments
 (0)