diff --git a/docs/create-image-and-azure-resources.md b/docs/create-image-and-azure-resources.md index d9a4dacec187..342670d9cb04 100644 --- a/docs/create-image-and-azure-resources.md +++ b/docs/create-image-and-azure-resources.md @@ -105,7 +105,6 @@ The Packer template includes `variables` section containing user variables used - `virtual_network_resource_group_name` - If `virtual_network_name` is set, this value may also be set. If `virtual_network_name` is set, and this value is not set the builder attempts to determine the resource group containing the virtual network. If the resource group cannot be found, or it cannot be disambiguated, this value should be set. - `virtual_network_subnet_name` - If `virtual_network_name` is set, this value may also be set. If `virtual_network_name` is set, and this value is not set the builder attempts to determine the subnet to use with the virtual network. If the subnet cannot be found, or it cannot be disambiguated, this value should be set. - `capture_name_prefix` - VHD prefix. The final artifacts will be named PREFIX-osDisk.UUID and PREFIX-vmTemplate.UUID. -- `github_feed_token` - Github PAT. Required for NPM toolcache installation. Will be depricated soon. ### Builder variables The `builders` section contains variables for the `azure-arm` builder used in the project. Most of the builder variables are inherited from the `user variables` section, however, the variables can be overwritten to adjust image-generation performance. @@ -123,7 +122,6 @@ Generated tool versions and details can be found in related projects: - [Python](https://github.com/actions/python-versions/) - [Go](https://github.com/actions/go-versions) - [Node](https://github.com/actions/node-versions) -- [Boost](https://github.com/actions/boost-versions) ### Post-generation scripts The user, created during the image generation, does not exist in the result VHD hence some configuration files related to the user's home directory need to be changed as well as the file permissions for some directories. Scripts for that are located in the `post-generation` folder in the repository: diff --git a/helpers/GenerateResourcesAndImage.ps1 b/helpers/GenerateResourcesAndImage.ps1 index d9693c516eb1..681ff3877628 100644 --- a/helpers/GenerateResourcesAndImage.ps1 +++ b/helpers/GenerateResourcesAndImage.ps1 @@ -80,9 +80,6 @@ Function GenerateResourcesAndImage { .PARAMETER Force Delete the resource group if it exists without user confirmation. - .PARAMETER GithubFeedToken - GitHub PAT to download tool packages from GitHub Package Registry - .PARAMETER AzureClientId Client id needs to be provided for optional authentication via service principal. Example: "11111111-1111-1111-1111-111111111111" @@ -109,8 +106,6 @@ Function GenerateResourcesAndImage { [Parameter(Mandatory = $False)] [int] $SecondsToWaitForServicePrincipalSetup = 30, [Parameter(Mandatory = $False)] - [string] $GithubFeedToken, - [Parameter(Mandatory = $False)] [string] $AzureClientId, [Parameter(Mandatory = $False)] [string] $AzureClientSecret, @@ -120,12 +115,6 @@ Function GenerateResourcesAndImage { [Switch] $Force ) - if ([string]::IsNullOrEmpty($GithubFeedToken)) - { - Write-Error "'-GithubFeedToken' parameter is not specified. You have to specify valid GitHub PAT to download tool packages from GitHub Package Registry" - exit 1 - } - $builderScriptPath = Get-PackerTemplatePath -RepositoryRoot $ImageGenerationRepositoryRoot -ImageType $ImageType $ServicePrincipalClientSecret = $env:UserName + [System.GUID]::NewGuid().ToString().ToUpper(); $InstallPassword = $env:UserName + [System.GUID]::NewGuid().ToString().ToUpper(); @@ -235,6 +224,5 @@ Function GenerateResourcesAndImage { -var "resource_group=$($ResourceGroupName)" ` -var "storage_account=$($storageAccountName)" ` -var "install_password=$($InstallPassword)" ` - -var "github_feed_token=$($GithubFeedToken)" ` $builderScriptPath } diff --git a/images.CI/linux-and-win/azure-pipelines/image-generation.yml b/images.CI/linux-and-win/azure-pipelines/image-generation.yml index 8de6e036f0c2..2b4aae4f8dd0 100644 --- a/images.CI/linux-and-win/azure-pipelines/image-generation.yml +++ b/images.CI/linux-and-win/azure-pipelines/image-generation.yml @@ -52,7 +52,7 @@ jobs: -VirtualNetworkName $(BUILD_AGENT_VNET_NAME) ` -VirtualNetworkRG $(BUILD_AGENT_VNET_RESOURCE_GROUP) ` -VirtualNetworkSubnet $(BUILD_AGENT_SUBNET_NAME) ` - -GitHubFeedToken $(GITHUB_TOKEN) + env: PACKER_LOG: 1 PACKER_LOG_PATH: $(Build.ArtifactStagingDirectory)/packer-log.txt diff --git a/images.CI/linux-and-win/build-image.ps1 b/images.CI/linux-and-win/build-image.ps1 index 6203ec61693d..1ea82791c337 100644 --- a/images.CI/linux-and-win/build-image.ps1 +++ b/images.CI/linux-and-win/build-image.ps1 @@ -2,7 +2,6 @@ param( [String] [Parameter (Mandatory=$true)] $TemplatePath, [String] [Parameter (Mandatory=$true)] $ClientId, [String] [Parameter (Mandatory=$true)] $ClientSecret, - [String] [Parameter (Mandatory=$true)] $GitHubFeedToken, [String] [Parameter (Mandatory=$true)] $ResourcesNamePrefix, [String] [Parameter (Mandatory=$true)] $Location, [String] [Parameter (Mandatory=$true)] $ResourceGroup, @@ -44,7 +43,6 @@ packer build -var "capture_name_prefix=$ResourcesNamePrefix" ` -var "client_id=$ClientId" ` -var "client_secret=$ClientSecret" ` -var "install_password=$InstallPassword" ` - -var "github_feed_token=$GitHubFeedToken" ` -var "location=$Location" ` -var "resource_group=$ResourceGroup" ` -var "storage_account=$StorageAccount" ` diff --git a/images.CI/macos/azure-pipelines/image-generation.yml b/images.CI/macos/azure-pipelines/image-generation.yml index 1615116e7844..8c53af415c7a 100644 --- a/images.CI/macos/azure-pipelines/image-generation.yml +++ b/images.CI/macos/azure-pipelines/image-generation.yml @@ -75,7 +75,6 @@ jobs: -var="vm_password=$(vm-password)" ` -var="build_id=$(VirtualMachineName)" ` -var="baseimage_name=${{ parameters.base_image_name }}" ` - -var="github_feed_token=$(github-feed-token)" ` -var="xcode_install_user=$(xcode-installation-user)" ` -var="xcode_install_password=$(xcode-installation-password)" ` -color=false `