Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Make NPM image
run: |
make npm-image VERSION=cyclonus PLATFORM=linux/amd64 CONTAINER_BUILDER=docker
make npm-image NPM_PLATFORM_TAG=cyclonus PLATFORM=linux/amd64 CONTAINER_BUILDER=docker

- name: Install Azure NPM
# set the ConfigMap based on the build matrix
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Make NPM image
run: |
make npm-image VERSION=cyclonus PLATFORM=linux/amd64 CONTAINER_BUILDER=docker
make npm-image NPM_PLATFORM_TAG=cyclonus PLATFORM=linux/amd64 CONTAINER_BUILDER=docker

- name: Install Azure NPM
# set the ConfigMap based on the build matrix
Expand Down
25 changes: 0 additions & 25 deletions .pipelines/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .pipelines/containers/container-template-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
addPipelineData: false

- powershell: |
powershell.exe -command "& { . .\windows.ps1; Retry({${{ parameters.name }}-image windows-${{ parameters.arch }}-${{ parameters.tag }}}) }"
powershell.exe -command "& { . .\build\scripts\windows.ps1; Retry({${{ parameters.name }}-image windows-${{ parameters.arch }}-${{ parameters.tag }}}) }"
name: image_build
displayName: Image Build

Expand Down
15 changes: 5 additions & 10 deletions .pipelines/containers/container-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ parameters:
name: ""
os: ""
arch: ""
tag: ""

steps:
- task: Docker@2
Expand All @@ -14,35 +13,31 @@ steps:

- script: |
set -e
sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes
make qemu-user-static
name: container_env
displayName: Prepare Environment

- script: |
set -e
export PLATFORM_TAG=$(make container-platform-tag TAG=${{ parameters.tag }} PLATFORM=${{ parameters.os }}/${{ parameters.arch }})
make ${{ parameters.name }}-image OS=${{ parameters.os }} ARCH=${{ parameters.arch }} PLATFORM=${{ parameters.os }}/${{ parameters.arch }} TAG=$PLATFORM_TAG
make ${{ parameters.name }}-image OS=${{ parameters.os }} ARCH=${{ parameters.arch }}
name: image_build
displayName: Image Build
retryCountOnTaskFailure: 3

- script: |
set -e
export PLATFORM_TAG=$(make container-platform-tag TAG=${{ parameters.tag }} PLATFORM=${{ parameters.os }}/${{ parameters.arch }})
export REF=$(IMAGE_REGISTRY)/$(make ${{ parameters.name }}-image-name):$PLATFORM_TAG
skopeo copy containers-storage:$REF docker-daemon:$REF
make ${{ parameters.name }}-skopeo-export OS=${{ parameters.os }} ARCH=${{ parameters.arch }}
wget https://github.com/aquasecurity/trivy/releases/download/v0.18.1/trivy_0.18.1_Linux-64bit.tar.gz
tar -zxvf trivy*.tar.gz
mkdir -p ./trivy-cache
sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $REF
name: trivy
displayName: Vulnerability Scan
retryCountOnTaskFailure: 3

- script: |
set -e
export PLATFORM_TAG=$(make container-platform-tag TAG=${{ parameters.tag }} PLATFORM=${{ parameters.os }}/${{ parameters.arch }})
make ${{ parameters.name }}-image-push PLATFORM=${{ parameters.os }}/${{ parameters.arch }} TAG=$PLATFORM_TAG
make ${{ parameters.name }}-image-pull PLATFORM=${{ parameters.os }}/${{ parameters.arch }} TAG=$PLATFORM_TAG
make ${{ parameters.name }}-image-push OS=${{ parameters.os }} ARCH=${{ parameters.arch }}
retryCountOnTaskFailure: 3
name: image_push
displayName: Push Images
Expand Down
17 changes: 3 additions & 14 deletions .pipelines/containers/manifest-template.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
parameters:
name: ""
platforms: ""
tag: ""

steps:
- task: Docker@2
Expand All @@ -13,19 +12,15 @@ steps:

- script: |
set -e
make ${{ parameters.name }}-multiarch-manifest-create PLATFORMS="${{ parameters.platforms }}" TAG=${{ parameters.tag }}
make ${{ parameters.name }}-image-info TAG=${{ parameters.tag }}
make ${{ parameters.name }}-manifest-create PLATFORMS="${{ parameters.platforms }}"
name: manifest_build
displayName: Manifest Build

- script: |
set -e
export IMAGE=$(make ${{ parameters.name }}-image-name)
export TAG=${{ parameters.tag }}
make multiarch-manifest-push IMAGE=$IMAGE TAG=$TAG
make container-pull IMAGE=$IMAGE TAG=$TAG
make ${{ parameters.name }}-manifest-push
mkdir -p $(Build.ArtifactStagingDirectory)/images
skopeo copy --all docker://$IMAGE_REGISTRY/$IMAGE:$TAG oci-archive:$(Build.ArtifactStagingDirectory)/images/$IMAGE-$TAG.tar
make ${{ parameters.name }}-skopeo-archive IMAGE_ARCHIVE_DIR=$(Build.ArtifactStagingDirectory)/images
name: manifest_push
displayName: Manifest Push

Expand All @@ -36,12 +31,6 @@ steps:
command: "logout"
addPipelineData: false

- task: CopyFiles@2
inputs:
sourceFolder: "output"
targetFolder: $(Build.ArtifactStagingDirectory)
condition: succeeded()

- task: ManifestGeneratorTask@0
displayName: "Add SBOM Generator tool"
inputs:
Expand Down
4 changes: 1 addition & 3 deletions .pipelines/npm/npm-conformance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
mkdir -p '$(GOPATH)/pkg'
BUILD_NUMBER=$(Build.BuildNumber)
RG=e2e-$(echo "npm-`date "+%Y-%m-%d-%S"`")
TAG=$(make version)-conformance-test
TAG=$(make npm-version)
echo "Resource group: $RG"
echo "Image tag: $TAG"

Expand Down Expand Up @@ -57,7 +57,6 @@ jobs:
name: $(name)
os: $(os)
arch: $(arch)
tag: $(TAG)

- job: containerize_windows
dependsOn: [setup]
Expand All @@ -76,7 +75,6 @@ jobs:
parameters:
name: $(name)
arch: $(arch)
tag: $(TAG)

- job: k8se2e
displayName: "Build Kubernetes Test Suite"
Expand Down
12 changes: 3 additions & 9 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ stages:
BUILD_NUMBER=$(Build.BuildNumber)
echo "##vso[task.setvariable variable=StorageID;isOutput=true]$(echo ${BUILD_NUMBER//./-})"
echo "##vso[task.setvariable variable=Tag;isOutput=true]$(make version)"
echo "##vso[task.setvariable variable=cniVersion;isOutput=true]$(make cni-version)"
echo "##vso[task.setvariable variable=npmVersion;isOutput=true]$(make npm-version)"
cat /etc/os-release
uname -a
sudo chown -R $(whoami):$(whoami) .
Expand Down Expand Up @@ -90,13 +92,12 @@ stages:
- job: build
displayName: Build Binaries
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
steps:
- script: |
make all-binaries-platforms VERSION=$(TAG)
make all-binaries-platforms
name: "BuildAllPlatformBinaries"
displayName: "Build all platform binaries"

Expand Down Expand Up @@ -144,8 +145,6 @@ stages:
jobs:
- job: containerize
displayName: Build Images
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
strategy:
Expand Down Expand Up @@ -188,7 +187,6 @@ stages:
name: $(name)
os: $(os)
arch: $(arch)
tag: $(TAG)
- job: containerize_windows
displayName: Build Images
variables:
Expand All @@ -213,13 +211,10 @@ stages:
- stage: publish
displayName: Publish Multiarch Manifests
dependsOn:
- setup
- containerize
jobs:
- job: manifest
displayName: Compile Manifests
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
strategy:
Expand All @@ -241,7 +236,6 @@ stages:
parameters:
name: $(name)
platforms: $(platforms)
tag: $(TAG)

- template: singletenancy/cilium/cilium-e2e-job-template.yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ stages:
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
GOBIN: "$(GOPATH)/bin" # Go binaries path
acnPath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
Tag: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
CommitHash: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.CommitHash'] ]
StorageID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
cniVersion: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
steps:
- task: DownloadPipelineArtifact@2
inputs:
Expand All @@ -39,15 +39,14 @@ stages:
targetPath: $(Pipeline.Workspace)
- bash: |
ls -lah
export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(StorageID)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }}
export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(StorageID)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(cniVersion)${{ parameters.clusterDefinitionCniBuildExt }}
export CNI_TYPE=${{ parameters.clusterDefinitionCniTypeKey }}
echo CNI type is $CNI_TYPE
echo Tag is $(Tag)
echo CNI_URL is $CNI_URL
echo Config: '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp
cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg ver $(cniVersion) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $ver' > '${{ parameters.clusterDefinition }}'
mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}'
echo "Running E2E tests against a cluster built with the following API model:"
cp ${{ parameters.clusterDefinition }} clusterDefinition.json
Expand Down
5 changes: 4 additions & 1 deletion .pipelines/singletenancy/aks-engine/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ stages:
GOBIN: "$(GOPATH)/bin" # Go binaries path
modulePath: "$(GOPATH)/src/github.com/Azure/aks-engine"
acnPath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
Tag: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
CommitHash: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.CommitHash'] ]
StorageID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
cniVersion: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
npmVersion: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.npmVersion'] ]
steps:
- template: e2e-step-template.yaml
parameters:
Expand All @@ -40,3 +41,5 @@ stages:
clusterDefinitionCniTypeKey: ${{ parameters.clusterDefinitionCniTypeKey }}
clusterDefinitionCniBuildOS: ${{ parameters.clusterDefinitionCniBuildOS }}
clusterDefinitionCniBuildExt: ${{ parameters.clusterDefinitionCniBuildExt }}
cniVersion: $(cniVersion)
npmVersion: $(npmVersion)
13 changes: 7 additions & 6 deletions .pipelines/singletenancy/aks-engine/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ parameters:
clusterDefinitionCniTypeKey: ""
clusterDefinitionCniBuildOS: ""
clusterDefinitionCniBuildExt: ""
cniVersion: ""
npmVersion: ""

steps:
- checkout: none
Expand Down Expand Up @@ -63,16 +65,16 @@ steps:

- bash: |
ls -lah
export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(StorageID)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }}
cd $(modulePath)
export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(StorageID)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-${{ parameters.cniVersion }}${{ parameters.clusterDefinitionCniBuildExt }}
export CNI_TYPE=${{ parameters.clusterDefinitionCniTypeKey }}
echo CNI type is $CNI_TYPE
echo Tag is $(Tag)
echo CNI_URL is $CNI_URL
echo Config: '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp
cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage $IMAGE_REGISTRY/azure-npm:$(Tag) '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp
cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg ver ${{ parameters.cniVersion }} '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $ver' > '${{ parameters.clusterDefinition }}'
cat '${{ parameters.clusterDefinition }}' | jq --arg ver $IMAGE_REGISTRY/azure-npm:${{ parameters.npmVersion }} '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $ver' > '${{ parameters.clusterDefinition }}'.tmp
if [ "${{ parameters.Name }}" == "windows_20_22_e2e" ]; then
if [[ -z $(WS2022_IMG_SUBSCRIPTION) || -z $(WS2022_IMG_VERSION) ]]; then
echo WS2022 Gallery/Image Subscription and Version not set, using defaults in cniWindows2022.json
Expand All @@ -86,7 +88,6 @@ steps:
echo "Running E2E tests against a cluster built with the following API model:"
cp ${{ parameters.clusterDefinition }} clusterDefinition.json
displayName: Configure AKS-Engine
workingDirectory: "$(modulePath)"

- task: AzureCLI@1
inputs:
Expand Down Expand Up @@ -141,4 +142,4 @@ steps:
scriptLocation: 'inlineScript'
inlineScript: |
echo "Deleting: $(RESOURCE_GROUP)"
az group delete -n $(RESOURCE_GROUP) --yes
az group delete -n $(RESOURCE_GROUP) --yes
1 change: 0 additions & 1 deletion .pipelines/singletenancy/aks-swift/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ stages:
variables:
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
GOBIN: "$(GOPATH)/bin" # Go binaries path
Tag: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
steps:
- template: e2e-step-template.yaml
Expand Down
6 changes: 1 addition & 5 deletions .pipelines/singletenancy/aks-swift/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- bash: |
echo $(Tag)
displayName: Echo Tag

- task: AzureCLI@1
inputs:
azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
Expand Down Expand Up @@ -61,7 +57,7 @@ steps:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
sudo -E env "PATH=$PATH" VERSION=$(Tag) INSTALL_CNS=true INSTALL_AZURE_VNET=true make test-integration
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZURE_VNET=true
retryCountOnTaskFailure: 3
name: "aksswifte2e"
displayName: "Run AKS Swift E2E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ stages:
variables:
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
GOBIN: "$(GOPATH)/bin" # Go binaries path
Tag: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
steps:
- template: cilium-e2e-step-template.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- bash: |
echo $(Tag)
displayName: Echo Tag

- task: AzureCLI@1
inputs:
azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
Expand Down Expand Up @@ -75,7 +71,7 @@ steps:
- script: |
echo "Start Azilium E2E Tests"
kubectl get po -owide -A
sudo -E env "PATH=$PATH" VERSION=$(Tag) INSTALL_CNS=true INSTALL_AZILIUM=true make test-integration
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZILIUM=true
retryCountOnTaskFailure: 3
name: "aziliumTest"
displayName: "Run Azilium E2E"
Expand Down
Loading