-
Notifications
You must be signed in to change notification settings - Fork 262
ci: Update ACN Pipeline for Compliance #3597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
6d105e2
Edit Pipeline Trigger
sheylatrudo ac83015
ci: E2E work
jpayne3506 8a5c974
Update Variables to Generated Values
sheylatrudo 508cf9f
fixup! Update Variables to Generated Values
sheylatrudo 995279b
Use New Pipeline Files
sheylatrudo bbb314b
fixup! Use New Pipeline Files
sheylatrudo cc2addc
fixup! Use New Pipeline Files
sheylatrudo e97f24f
fixup! Use New Pipeline Files
sheylatrudo a74406f
fixup! Use New Pipeline Files
sheylatrudo d6c36a1
fixup! Use New Pipeline Files
sheylatrudo 25fce7e
fixup! Use New Pipeline Files
sheylatrudo 98c4a94
Update Dockerfiles
sheylatrudo 5b1a259
Update Dockerfiles
sheylatrudo a7731cd
fixup! Update Dockerfiles
sheylatrudo d7fcbb5
fixup! Use New Pipeline Files
sheylatrudo ffa7d8c
fixup! Use New Pipeline Files
sheylatrudo 0e1bb56
fixup! Use New Pipeline Files
sheylatrudo 82ac0a8
Update .pipelines/build/utils/rename-dockerfile-references.steps.yaml
sheylatrudo ce44092
Update .pipelines/build/utils/rename-dockerfile-references.steps.yaml
sheylatrudo 5f79709
Update .pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2…
sheylatrudo 0814e34
Address PR Comments
sheylatrudo baf4381
fixup! Use New Pipeline Files
sheylatrudo 4b971a2
fixup! Use New Pipeline Files
sheylatrudo 421592f
fixup! Address PR Comments
sheylatrudo 37a07b8
fixup! Address PR Comments
sheylatrudo 58d8cfb
fixup! Address PR Comments
sheylatrudo da0acf8
Remove Dockerfile Changes for Testing
sheylatrudo d64d95c
fixup! Remove Dockerfile Changes for Testing
sheylatrudo 5f8a212
Update .pipelines/singletenancy/cilium-dualstack-overlay/cilium-duals…
jpayne3506 5673fbb
Update .pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e…
jpayne3506 d66ab28
Update .pipelines/singletenancy/cilium-overlay-withhubble/cilium-over…
jpayne3506 f3e6729
Update .pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.ste…
jpayne3506 420a9f4
fixup! Address PR Comments
sheylatrudo 6085893
fixup! Address PR Comments
sheylatrudo 7d825d9
fixup! Address PR Comments
sheylatrudo 5239483
Add IPV6_IMAGE_REPO_PATH to Tests
sheylatrudo 2ee76f8
Update .pipelines/cni/cilium/cilium-scale-test.yaml
sheylatrudo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ ipam-*.xml | |
|
|
||
| # Environment | ||
| .vscode/* | ||
| **/*.sw? | ||
|
|
||
| # Coverage | ||
| *.out | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| parameters: | ||
| - name: binaries | ||
| type: jobList | ||
|
|
||
|
|
||
| jobs: | ||
| - ${{ each job_data in parameters.binaries }}: | ||
| - ${{ if eq(job_data.templateContext.action, 'build') }}: | ||
| - job: binaries_${{ job_data.job }} | ||
| displayName: "Build Binary - ${{ job_data.displayName }} -" | ||
| strategy: ${{ job_data.strategy }} | ||
| pool: | ||
| type: linux | ||
| ${{ if eq(job_data.job, 'linux_arm64') }}: | ||
| hostArchitecture: arm64 | ||
|
|
||
| variables: | ||
| ob_outputDirectory: $(Build.ArtifactStagingDirectory)/out | ||
| ob_artifactSuffix: _$(artifact) | ||
| ob_git_checkout: false | ||
| REPO_ROOT: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }} | ||
| ${{ if eq(job_data.job, 'linux_amd64') }}: | ||
| LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest' | ||
| ARCH: amd64 | ||
| OS: linux | ||
| ${{ elseif eq(job_data.job, 'windows_amd64') }}: | ||
| LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest' | ||
| ARCH: amd64 | ||
| OS: windows | ||
| ${{ elseif eq(job_data.job, 'linux_arm64') }}: | ||
| ob_enable_qemu: true | ||
| ARCH: arm64 | ||
| OS: linux | ||
|
|
||
| steps: | ||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| targetPath: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }} | ||
| artifact: '${{ job_data.templateContext.repositoryArtifact }}' | ||
|
|
||
| - template: binary.steps.yaml | ||
| parameters: | ||
| target: $(name) | ||
| os: $(OS) | ||
| arch: $(ARCH) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| parameters: | ||
| - name: target | ||
| type: string | ||
|
|
||
| - name: os | ||
| type: string | ||
|
|
||
| - name: arch | ||
| type: string | ||
|
|
||
|
|
||
| steps: | ||
| - task: GoTool@0 | ||
| inputs: | ||
| version: '$(GOVERSION)' | ||
|
|
||
| - bash: | | ||
| # Ubuntu | ||
| if [[ -f /etc/debian_version ]];then | ||
| sudo apt-get update -y | ||
| if [[ $GOARCH =~ amd64 ]]; then | ||
| sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-multilib tree | ||
| for dir in /usr/include/x86_64-linux-gnu/*; do | ||
| sudo ln -sfn "$dir" /usr/include/$(basename "$dir") | ||
| done | ||
|
|
||
| elif [[ $GOARCH =~ arm64 ]]; then | ||
| sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-aarch64-linux-gnu tree | ||
| for dir in /usr/include/aarch64-linux-gnu/*; do | ||
| sudo ln -sfn "$dir" /usr/include/$(basename "$dir") | ||
| done | ||
| fi | ||
| # Mariner | ||
| else | ||
| sudo tdnf install -y llvm clang libbpf-devel nftables tree | ||
| for dir in /usr/include/aarch64-linux-gnu/*; do | ||
| if [[ -d $dir ]]; then | ||
| sudo ln -sfn "$dir" /usr/include/$(basename "$dir") | ||
| elif [[ -f "$dir" ]]; then | ||
| sudo ln -Tsfn "$dir" /usr/include/$(basename "$dir") | ||
| fi | ||
| done | ||
| fi | ||
| displayName: "Install Binary Pre-Reqs" | ||
| workingDirectory: $(ACN_DIR) | ||
| continueOnError: true | ||
| env: | ||
| GOOS: ${{ parameters.os }} | ||
| GOARCH: ${{ parameters.arch }} | ||
|
|
||
| - bash: | | ||
| make "$TARGET" | ||
| displayName: "Build Binary - ${{ parameters.target }}" | ||
| workingDirectory: $(ACN_DIR) | ||
| env: | ||
| REPO_ROOT: $(ACN_DIR) | ||
jpayne3506 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| TARGET: ${{ parameters.target }} | ||
| GOOS: ${{ parameters.os }} | ||
| GOARCH: ${{ parameters.arch }} | ||
|
|
||
| - script: | | ||
| SOURCE_DIR="./output" | ||
| TARGET_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"/out | ||
| tree "$SOURCE_DIR" | ||
|
|
||
| mkdir -p "$TARGET_DIR" | ||
| find "$SOURCE_DIR" -name '*.tgz*' -print -exec mv -t "$TARGET_DIR"/ {} + | ||
| find "$SOURCE_DIR" -name '*.zip' -print -exec mv -t "$TARGET_DIR"/ {} + | ||
|
|
||
| tree "$TARGET_DIR" | ||
| displayName: "Prepare Artifacts" | ||
| workingDirectory: $(ACN_DIR) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| parameters: | ||
| - name: platforms | ||
| type: object | ||
| default: [] | ||
|
|
||
|
|
||
| steps: | ||
| - bash: | | ||
| set -e | ||
| MANIFEST_DATA=$(echo "$IMAGE_PLATFORM_DATA" | \ | ||
| jq -r '.[] | | ||
| .args = [ (.platform | split("/")[0]), (.platform | split("/")[1]) ] | | ||
| .args = [ ("--os " + .args[0] ), ("--arch " + .args[1] ) ] | | ||
| if .osVersion then .args += ["--os-version " + .osVersion] else . end | | ||
| { image: .imageReference, annotate: .args }' | \ | ||
| jq -rcs) | ||
| echo >&2 "##vso[task.setvariable variable=MANIFEST_JSON;isOutput=true]$MANIFEST_DATA" | ||
| echo "$MANIFEST_DATA" | jq -r . | ||
| displayName: "Populate Image Manifest Data" | ||
| name: data | ||
| env: | ||
| IMAGE_PLATFORM_DATA: '${{ convertToJson(parameters.platforms) }}' | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| parameters: | ||
jpayne3506 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: arch | ||
| type: string | ||
| default: "" | ||
|
|
||
| - name: name | ||
| type: string | ||
| default: "" | ||
|
|
||
| - name: os | ||
| type: string | ||
| default: "" | ||
|
|
||
| - name: build_tag | ||
| type: string | ||
| default: "" | ||
|
|
||
| - name: dockerfile_path | ||
| type: string | ||
| default: "" | ||
|
|
||
| - name: archive_file | ||
| type: string | ||
| default: '$(name)-$(os)-$(platform)-$(Tag)' | ||
|
|
||
| - name: source | ||
| type: string | ||
| default: drop_setup_env_source | ||
|
|
||
| - name: extra_args | ||
| type: string | ||
| default: '' | ||
|
|
||
|
|
||
| - name: default_args | ||
| type: object | ||
| default: | ||
| - "--target $(os) " | ||
| - "--platform $(os)/$(arch) " | ||
|
|
||
| - name: common_build_args | ||
| type: object | ||
| default: | ||
| - "PLATFORM=$(os)/$(arch) " | ||
| - "ARCH=$(arch) " | ||
| - "OS=$(os) " | ||
| - "VERSION=$(Tag) " | ||
|
|
||
|
|
||
| steps: | ||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| targetPath: $(Build.SourcesDirectory)/dst/${{ parameters.source }} | ||
| artifact: '${{ parameters.source }}' | ||
|
|
||
| - task: onebranch.pipeline.containercontrol@1 | ||
| displayName: "Login to ACR" | ||
| inputs: | ||
| command: login | ||
| endpoint: $(ACR_ARM_SERVICE_CONNECTION) | ||
|
|
||
| # Build and push the Docker image | ||
| - task: onebranch.pipeline.imagebuildinfo@1 | ||
| displayName: Image Build | ||
| retryCountOnTaskFailure: 3 | ||
| timeoutInMinutes: 30 | ||
| inputs: | ||
| endpoint: $(ACR_ARM_SERVICE_CONNECTION) | ||
| registry: $(ACR).azurecr.io | ||
| repositoryName: $(os)-$(arch)/${{ parameters.name }} | ||
| os: '${{ parameters.os }}' | ||
| buildkit: 1 | ||
| dockerFileRelPath: ${{ parameters.dockerfile_path }}/Dockerfile | ||
| dockerFileContextPath: ${{ parameters.source }} | ||
| enable_network: true | ||
| enable_pull: true | ||
| build_tag: ${{ parameters.build_tag }} | ||
| enable_acr_push: true | ||
|
|
||
| saveImageToPath: images/$(os)-$(arch)/${{ parameters.archive_file }}.tar.gz | ||
| #compress: true | ||
| #saveMetadataToPath: images/$(os)-$(arch)/metadata/${{ parameters.archive_file }}-metadata.json | ||
| #enable_isolated_acr_push: true | ||
|
|
||
| # Docker Build Arguments | ||
| ${{ if parameters.common_build_args }}: | ||
| arguments: --build-arg ${{ join('--build-arg ', parameters.common_build_args) }} ${{ parameters.extra_args }} ${{ join(' ', parameters.default_args) }} | ||
| ${{ else }}: | ||
| arguments: ${{ parameters.extra_args }} ${{ join(' ', parameters.default_args) }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| parameters: | ||
| - name: generate | ||
| type: jobList | ||
|
|
||
|
|
||
| jobs: | ||
| - ${{ each job_data in parameters.generate }}: | ||
| - job: ${{ job_data.job }}_generate_manifest | ||
| displayName: "Generate Image Manifest - ${{ job_data.job }}" | ||
| pool: | ||
| type: linux | ||
| variables: | ||
| ob_outputDirectory: $(Build.SourcesDirectory)/out | ||
| ob_git_checkout: false | ||
| steps: | ||
| - template: /.pipelines/build/generate-manifest.steps.yaml | ||
| parameters: | ||
| platforms: ${{ job_data.templateContext.platforms }} | ||
|
|
||
| - job: ${{ job_data.job }}_publish_manifest | ||
| displayName: "Publish Image Manifest - ${{ job_data.job }}" | ||
| dependsOn: | ||
| - ${{ job_data.job }}_generate_manifest | ||
| pool: | ||
| type: docker | ||
| os: linux | ||
| variables: | ||
| LinuxContainerImage: 'mcr.microsoft.com/onebranch/azurelinux/build:3.0' | ||
| ob_outputDirectory: $(Build.SourcesDirectory)/out | ||
| ob_git_checkout: false | ||
|
|
||
| MANIFEST_JSON: $[ dependencies.${{ job_data.job }}_generate_manifest.outputs['data.MANIFEST_JSON'] ] | ||
| steps: | ||
| - template: /.pipelines/build/publish-manifest.steps.yaml | ||
| parameters: | ||
| image_repository: ${{ job_data.templateContext.name }} | ||
| image_tag: ${{ job_data.templateContext.image_tag }} | ||
| manifest_data: $(MANIFEST_JSON) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.