-
Notifications
You must be signed in to change notification settings - Fork 212
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
fix: build cvm on cvm hardware #5643
Draft
zachary-bailey
wants to merge
53
commits into
master
Choose a base branch
from
zb/fixCVMBuildCVE
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+746
−29
Draft
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
8e759b4
fix: go dev container
afca2bb
revert
aa85e4c
feat: add cvm packer tempalte
30e2a62
feat: use cvm hardware for packer build
dfbfdec
feat: use cvm hardware for cvm build
e8f06e7
fix: replicate cvm images to blob storage
fff3b9b
fix: fix cvm kernel
d0fe202
fix: resolve vnet and vnet rg for cvm
6fb5dc2
fix: new image definition for cvm
16b4e20
fix: use cvm for scanning step
660c926
fix: scanning rg for cvm
f3fe319
Merge branch 'master' into zb/cvmKernelFix
0f1c36d
Merge branch 'zb/cvmKernelFix' into zb/fixCVMBuildCVE
dc39f15
fix: cvm build location
92a86c5
fix: set cvm packer build location for pro
3b063d1
fix: add cvm packer build location
b822f30
fix: provision cvm for testing step
e5e7459
fix: resolve azure location for cvm
4192ad5
fix: resolve location for converting to blob storage
9bcf631
fix: move vm options location
caa08c7
fix: location for standard skus
1703575
fix: dont use managed images for cvm
5eca9ab
Merge branch 'main' into zb/fixCVMBuildCVE
6f1858d
fix: cvm template
20f514f
fix: configure cvm packer template
0f4312e
fix: location issue for cvm
107453e
fix: use confidential vm sku
0e3961c
fix: vm sku
0d73b67
fix: cvm dist-upgrade
7262fc2
Merge branch 'main' into zb/fixCVMBuildCVE
a438ea0
fix: image definition
d986725
Merge branch 'main' into zb/fixCVMBuildCVE
328cba9
Merge branch 'main' into zb/fixCVMBuildCVE
f83dc3a
fix: test
fab3dc0
fix: re activate testing
d7bb220
Merge branch 'main' into zb/fixCVMBuildCVE
7af8cd2
Merge branch 'main' into zb/fixCVMBuildCVE
5d764ce
fix: typo fix
6c71814
fix: posix fix
07cfc03
Merge branch 'main' into zb/fixCVMBuildCVE
921a4a7
fix: posix standard
8f21f39
fix: simplify init variables
b6b366a
fix: bash syntax
dbd5dab
fix: cvm build location
3e478de
fix: resolving CVM_PACKER_BUILD_LOCATION var
8bcef29
fix: packer build location variable
a74fe0f
fix: bash steps
409bb6b
fix: separate steps
8a1e0e8
fix: bash
72cfc19
fix: ua token var
9965467
fix: PACKER_BUILD_LOCATION resolution
b7580de
fix: variable expansion
5763519
Merge branch 'main' into zb/fixCVMBuildCVE
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 contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -71,6 +71,13 @@ if [ "$MODE" == "linuxVhdMode" ] && [ -z "${PACKER_BUILD_LOCATION}" ]; then | |
exit 1 | ||
fi | ||
|
||
if [ "${IMG_SKU,,}" == "20_04-lts-cvm" ] && [ -n "${CVM_PACKER_BUILD_LOCATION}" ]; then | ||
PACKER_BUILD_LOCATION=${CVM_PACKER_BUILD_LOCATION} | ||
# Must persist new value of PACKER_BUILD_LOCATION for future pipeline steps, bash variable assignment is only scoped to this script | ||
echo "##vso[task.setvariable variable=PACKER_BUILD_LOCATION]${CVM_PACKER_BUILD_LOCATION}" | ||
echo "CVM: PACKER_BUILD_LOCATION is set to ${PACKER_BUILD_LOCATION}" | ||
fi | ||
|
||
# Currently only used for linux builds. This determines the environment in which the build is running (either prod or test). | ||
# Used to construct the name of the resource group in which the 1ES pool the build is running on lives in, which also happens. | ||
# to be the resource group in which the packer VNET lives in. | ||
|
@@ -111,6 +118,7 @@ if [ -z "${VNET_NAME}" ]; then | |
fi | ||
fi | ||
|
||
|
||
if [ -z "${SUBNET_NAME}" ]; then | ||
SUBNET_NAME="packer" | ||
fi | ||
|
@@ -167,6 +175,8 @@ if [[ "${MODE}" == "linuxVhdMode" ]]; then | |
elif [[ "${IMG_OFFER,,}" == "azure-linux-3" ]]; then | ||
# for Azure Linux 3.0, only use AzureLinux prefix | ||
SIG_IMAGE_NAME="AzureLinux${SIG_IMAGE_NAME}" | ||
elif [[ "${IMG_SKU,,}" == "20_04-lts-cvm" ]]; then | ||
SIG_IMAGE_NAME+="Specialized" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indenting seems weird here |
||
fi | ||
echo "No input for SIG_IMAGE_NAME was provided, defaulting to: ${SIG_IMAGE_NAME}" | ||
else | ||
|
@@ -259,7 +269,7 @@ if [[ "$MODE" == "linuxVhdMode" || "$MODE" == "windowsVhdMode" ]]; then | |
if [[ ${ARCHITECTURE,,} == "arm64" ]]; then | ||
TARGET_COMMAND_STRING+="--architecture Arm64" | ||
elif [[ ${IMG_SKU} == "20_04-lts-cvm" ]]; then | ||
TARGET_COMMAND_STRING+="--features SecurityType=ConfidentialVMSupported" | ||
TARGET_COMMAND_STRING+="--os-state Specialized --features SecurityType=ConfidentialVM" | ||
fi | ||
|
||
az sig image-definition create \ | ||
|
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make sure we have quota for this size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cameronmeissner I was actually going to bring this up in standup today. I attempted to check in TME yesterday, but for some reason every time I tried to switch the directory it was unsuccessful.