Skip to content

Commit

Permalink
ci: Output AIB release notes and cgmanifest to customization.log (#263)
Browse files Browse the repository at this point in the history
* Output windows image builder containerd image pull notes and release notes

* Add linux release notes and cgmanifest

* Clean up

* Remove validation from release.yaml, use ADO instead
  • Loading branch information
christinalau0 authored Oct 19, 2024
1 parent ef71a7a commit 0b65001
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 77 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,8 @@ on:
paths:
- 'releases/CHANGELOG*.md'

env:
LINUX_NODE_IMAGE_SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
LINUX_NODE_IMAGE_RESOURCE_GROUP: ${{vars.LINUX_NODE_IMAGE_RESOURCE_GROUP}}
LINUX_NODE_IMAGE_GALLERY: ${{vars.LINUX_NODE_IMAGE_GALLERY}}
LINUX_NODE_IMAGE_NAME: ${{vars.LINUX_NODE_IMAGE_NAME}}
LINUX_NODE_IMAGE_VERSION: 2024.032.1
WINDOWS_NODE_IMAGE_SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
WINDOWS_NODE_IMAGE_RESOURCE_GROUP: ${{vars.WINDOWS_NODE_IMAGE_RESOURCE_GROUP}}
WINDOWS_NODE_IMAGE_GALLERY: ${{vars.WINDOWS_NODE_IMAGE_GALLERY}}
WINDOWS_NODE_IMAGE_NAME: ${{vars.WINDOWS_NODE_IMAGE_NAME}}
WINDOWS_NODE_IMAGE_VERSION: 2024.032.1

jobs:
sig_image_versions:
runs-on: ubuntu-latest
outputs:
LINUX_NODE_IMAGE_VERSION: ${{ env.LINUX_NODE_IMAGE_VERSION }}
WINDOWS_NODE_IMAGE_VERSION: ${{ env.WINDOWS_NODE_IMAGE_VERSION }}
steps:
- run: echo "Exposing sig image version variables"
validate-no-egress:
needs: sig_image_versions
uses: ./.github/workflows/test-vhd-no-egress.yaml
with:
from_branch: ''
LINUX_NODE_IMAGE_VERSION: ${{ needs.sig_image_versions.outputs.LINUX_NODE_IMAGE_VERSION }}
WINDOWS_NODE_IMAGE_VERSION: ${{ needs.sig_image_versions.outputs.WINDOWS_NODE_IMAGE_VERSION }}
secrets: inherit
build:
needs: validate-no-egress
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -80,54 +52,6 @@ jobs:
- name: print git status after build
run: |
git status
- name: Validate 1.27 + containerd E2E
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.27"
CLUSTER_DEFINITION: "examples/e2e-tests/kubernetes/release/default/definition.json"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "eastus"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
USE_MANAGED_IDENTITY: true
MSI_USER_ASSIGNED_ID: ${{ secrets.MSI_USER_ASSIGNED_ID_AKS_ENGINE_E2E }}
CREATE_VNET: true
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
GINKGO_SKIP: ""
STABILITY_ITERATIONS: "0"
RETAIN_SSH: false
CONTAINER_RUNTIME: "containerd"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: true
DISTRO: "aks-ubuntu-20.04"
run: make test-kubernetes
- name: Validate 1.28 + containerd E2E
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.28"
CLUSTER_DEFINITION: "examples/e2e-tests/kubernetes/release/default/definition.json"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "eastus"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
USE_MANAGED_IDENTITY: true
MSI_USER_ASSIGNED_ID: ${{ secrets.MSI_USER_ASSIGNED_ID_AKS_ENGINE_E2E }}
CREATE_VNET: true
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
GINKGO_SKIP: ""
STABILITY_ITERATIONS: "0"
RETAIN_SSH: false
CONTAINER_RUNTIME: "containerd"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: true
DISTRO: "aks-ubuntu-20.04"
run: make test-kubernetes
- name: Remove untracked files created during workflow steps
run: git ls-files --others --exclude-standard -z | xargs -0 -r rm
- name: Add local tag
Expand Down
8 changes: 7 additions & 1 deletion vhd/packer/configure-windows-vhd-phase2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ function Get-ContainerImages {
# CSE will configure and register containerd as a service at deployment time
Start-Job -Name containerd -ScriptBlock { containerd.exe }
foreach ($image in $imagesToPull) {
& ctr.exe -n k8s.io images pull $image > $containerdImagePullNotesFilePath
& ctr.exe -n k8s.io images pull $image >> $containerdImagePullNotesFilePath
}
Write-Log "Begin listing containerd images"
$imagesList = & ctr.exe -n k8s.io images list
foreach ($line in $imagesList) {
Write-Output $line
}
Write-Log "End listing containerd images"
Stop-Job -Name containerd
Remove-Job -Name containerd
}
Expand Down
14 changes: 14 additions & 0 deletions vhd/packer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,17 @@ apt list --installed \
}
))
}' > ${VHD_CG_MANIFEST}

output_file_contents() {
local filepath=$1

if [ -f "$filepath" ]; then
echo "===== Begin contents of $filepath ====="
cat "$filepath"
echo "===== End contents of $filepath ====="
else
echo "File not found: $filepath"
fi
}
output_file_contents "$VHD_LOGS_FILEPATH"
output_file_contents "$VHD_CG_MANIFEST"
11 changes: 11 additions & 0 deletions vhd/packer/write-release-notes-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,14 @@ Log ($displayObjects | Format-Table -Property File, Sha256, SizeBytes | Out-Stri

# Ensure proper encoding is set for release notes file
[IO.File]::ReadAllText($releaseNotesFilePath) | Out-File -Encoding utf8 $releaseNotesFilePath

if (Test-Path $releaseNotesFilePath) {
$fileContent = Get-Content $releaseNotesFilePath
Write-Output "===== Begin contents of $releaseNotesFilePath ====="
foreach ($line in $fileContent) {
Write-Output $line
}
Write-Output "===== End contents of $releaseNotesFilePath ====="
} else {
Write-Output "File not found: $releaseNotesFilePath"
}

0 comments on commit 0b65001

Please sign in to comment.