Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
vicamo committed Apr 25, 2024
2 parents ee1e813 + cb3f115 commit 801b7a8
Show file tree
Hide file tree
Showing 78 changed files with 1,196 additions and 1,004 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create_sbom_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
}
- name: Install SYFT tool on Windows
if: ${{ runner.os == 'Windows' }}
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft v0.100.0
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft
- name: Install SYFT tool on Ubuntu or macOS
if: ${{ runner.os != 'Windows' }}
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin v0.100.0
Expand All @@ -74,7 +74,7 @@ jobs:
- name: Compress SBOM file
run: Compress-Archive sbom.json sbom.json.zip
#Upload artifact action
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sbom-${{ github.event.client_payload.agentSpec }}-${{ github.event.client_payload.imageVersion }}
path: sbom.json.zip
Expand Down
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ To build a VM machine from this repo's source, see the [instructions](docs/creat

## Available Images

| Image | YAML Label | Included Software |
| --------------------|---------------------|--------------------|
| Ubuntu 22.04 | `ubuntu-latest` or `ubuntu-22.04` | [ubuntu-22.04] |
| Ubuntu 20.04 | `ubuntu-20.04` | [ubuntu-20.04] |
| macOS 14 [beta] | `macos-14-large`| [macOS-14] |
| macOS 14 Arm64 [beta] | `macos-14` or `macos-14-xlarge`| [macOS-14-arm64] |
| macOS 13 | `macos-13`, `macos-13-large` or `macos-latest-large` | [macOS-13] |
| macOS 13 Arm64 | `macos-13-xlarge` | [macOS-13-arm64] |
| macOS 12 | `macos-latest`,`macos-12` or`macos-12-large`| [macOS-12] |
| macOS 11 [deprecated] | `macos-11`| [macOS-11] |
| Windows Server 2022 | `windows-latest` or `windows-2022` | [windows-2022] |
| Windows Server 2019 | `windows-2019` | [windows-2019] |
| Image | YAML Label | Included Software | Rollout Status of Latest Image Release |
| --------------------|---------------------|--------------------|--------------------|
| Ubuntu 22.04 | `ubuntu-latest` or `ubuntu-22.04` | [ubuntu-22.04] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fubuntu22.json) |
| Ubuntu 20.04 | `ubuntu-20.04` | [ubuntu-20.04] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fubuntu20.json) |
| macOS 14 | `macos-latest-large` or `macos-14-large`| [macOS-14] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fmacos-14.json) |
| macOS 14 Arm64 |`macos-latest`, `macos-14`, `macos-latest-xlarge` or `macos-14-xlarge`| [macOS-14-arm64] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fmacos-14-arm64.json) |
| macOS 13 | `macos-13` or `macos-13-large` | [macOS-13] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fmacos-13.json) |
| macOS 13 Arm64 | `macos-13-xlarge` | [macOS-13-arm64] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fmacos-13-arm64.json) |
| macOS 12 | `macos-12` or `macos-12-large`| [macOS-12] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2FmacOS-12.json) |
| macOS 11 [deprecated] | `macos-11`| [macOS-11] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2FmacOS-11.json) |
| Windows Server 2022 | `windows-latest` or `windows-2022` | [windows-2022] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fwin22.json) |
| Windows Server 2019 | `windows-2019` | [windows-2019] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fmikhailkoliada%2F35b243dd6e217d041fe3dfa5b4e2e2ed%2Fraw%2Fwin19.json) |

### Label scheme

Expand Down Expand Up @@ -81,6 +81,10 @@ GitHub Actions and Azure DevOps use the `-latest` YAML label (ex: `ubuntu-latest

The `-latest` migration process is gradual and happens over 1-2 months in order to allow customers to adapt their workflows to the newest OS version. During this process, any workflow using the `-latest` label, may see changes in the OS version in their workflows or pipelines. To avoid unwanted migration, users can specify a specific OS version in the yaml file (ex: macos-12, windows-2022, ubuntu-22.04).

#### Planned & ongoing migration(s)

We are currently in the process of `macos-14` to `macos-latest` migration, details can be found [here](https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image).


## Image Releases

Expand Down
26 changes: 0 additions & 26 deletions docs/debugging-failed-builds.md

This file was deleted.

Binary file removed docs/resources/askOnError.png
Binary file not shown.
Binary file removed docs/resources/packerResourceGroup.png
Binary file not shown.
Binary file removed docs/resources/resourceGroupName.png
Binary file not shown.
Binary file removed docs/resources/vmCredentials.png
Binary file not shown.
10 changes: 5 additions & 5 deletions helpers/software-report-base/SoftwareReport.BaseNodes.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ class BaseNode {
}

[String] ToMarkdown([Int32] $Level) {
throw "Abtract method 'ToMarkdown(level)' is not implemented for '$($this.GetType().Name)'"
throw "Abstract method 'ToMarkdown(level)' is not implemented for '$($this.GetType().Name)'"
}

[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
throw "Abtract method 'IsSimilarTo' is not implemented for '$($this.GetType().Name)'"
throw "Abstract method 'IsSimilarTo' is not implemented for '$($this.GetType().Name)'"
}

[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
throw "Abtract method 'IsIdenticalTo' is not implemented for '$($this.GetType().Name)'"
throw "Abstract method 'IsIdenticalTo' is not implemented for '$($this.GetType().Name)'"
}
}

Expand All @@ -39,7 +39,7 @@ class BaseToolNode: BaseNode {
}

[String] GetValue() {
throw "Abtract method 'GetValue' is not implemented for '$($this.GetType().Name)'"
throw "Abstract method 'GetValue' is not implemented for '$($this.GetType().Name)'"
}

[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
Expand All @@ -53,4 +53,4 @@ class BaseToolNode: BaseNode {
[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
return $this.IsSimilarTo($OtherNode) -and ($this.GetValue() -eq $OtherNode.GetValue())
}
}
}
15 changes: 10 additions & 5 deletions images.CI/linux-and-win/azure-pipelines/image-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ jobs:
arguments: -RepoUrl $(CUSTOM_REPOSITORY_URL) `
-RepoBranch $(CUSTOM_REPOSITORY_BRANCH)

- task: PowerShell@2
- task: AzurePowerShell@5
displayName: 'Set variables'
inputs:
targetType: 'inline'
script: |
TargetAzurePs: LatestVersion
azureSubscription: 'spn-hosted-runners'
ScriptType: 'InlineScript'
Inline: |
$ImageType = "${{ parameters.image_type }}"
$TemplateDirectoryName = if ($ImageType.StartsWith("ubuntu")) { "ubuntu/templates" } else { "windows/templates" }
$TemplateDirectoryPath = Join-Path "images" $TemplateDirectoryName | Resolve-Path
Expand All @@ -79,13 +81,16 @@ jobs:
$TempResourceGroupName = "packer-temp-$ManagedImageName"
Write-Host "##vso[task.setvariable variable=TempResourceGroupName;]$TempResourceGroupName"
$clientSecret = $(az keyvault secret show --name "spnhostedrunners" --vault-name "gh-imagegeneration" --query value -o tsv)
Write-Host "##vso[task.setvariable variable=ClientSecret;issecret=true]$clientSecret"
- task: PowerShell@2
displayName: 'Build VM'
inputs:
targetType: filePath
filePath: ./images.CI/linux-and-win/build-image.ps1
arguments: -ClientId $(CLIENT_ID) `
-ClientSecret $(CLIENT_SECRET) `
-ClientSecret "$(ClientSecret)" `
-TemplatePath $(TemplatePath) `
-ImageName "$(ManagedImageName)" `
-ImageResourceGroupName $(AZURE_RESOURCE_GROUP) `
Expand Down Expand Up @@ -172,5 +177,5 @@ jobs:
arguments: -TempResourceGroupName "$(TempResourceGroupName)" `
-SubscriptionId $(AZURE_SUBSCRIPTION) `
-ClientId $(CLIENT_ID) `
-ClientSecret $(CLIENT_SECRET) `
-ClientSecret "$(ClientSecret)" `
-TenantId $(AZURE_TENANT)
2 changes: 1 addition & 1 deletion images.CI/macos/anka/Anka.Helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Push-AnkaTemplateToRegistry {
[string] $TemplateName
)

# if registry uuid doesn't match than delete an image in registry
# if registry uuid doesn't match then delete an image in registry
$AnkaCaCrtPath="$HOME/.config/anka/certs/anka-ca-crt.pem"
$images = anka --machine-readable registry --cacert $AnkaCaCrtPath --registry-path $RegistryUrl list | ConvertFrom-Json | ForEach-Object body
$images | Where-Object name -eq $TemplateName | ForEach-Object {
Expand Down
2 changes: 1 addition & 1 deletion images.CI/macos/anka/CreateCleanAnkaTemplate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function Invoke-SoftwareUpdate {
$ipAddress = Get-AnkaVMIPAddress -VMName $TemplateName

# Unenroll Seed
Write-Host "`t[*] Reseting the seed before requesting stable versions"
Write-Host "`t[*] Resetting the seed before requesting stable versions"
Remove-CurrentBetaSeed -HostName $ipAddress | Show-StringWithFormat

# Install Software Updates
Expand Down
4 changes: 2 additions & 2 deletions images.CI/macos/anka/Service.Helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ function Get-MacOSInstaller {
Write-Host "`t[*] Beta Version requested. Enrolling machine to DeveloperSeed"
sudo $seedutil enroll DeveloperSeed | Out-Null
} else {
Write-Host "`t[*] Reseting the seed before requesting stable versions"
Write-Host "`t[*] Resetting the seed before requesting stable versions"
sudo $seedutil unenroll | Out-Null
}

# Validate there is no softwareupdate at the moment
# Validate there is no software update at the moment
Test-SoftwareUpdate

# Validate availability OSVersion
Expand Down
Loading

0 comments on commit 801b7a8

Please sign in to comment.