Skip to content

updated the file GenerateResourcesAndImage and commented out debug flag #14

updated the file GenerateResourcesAndImage and commented out debug flag

updated the file GenerateResourcesAndImage and commented out debug flag #14

name: Build Window Packer Image
on:
push:
branches:
- cem/EDODSO-979
jobs:
install-coverity:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Download AzCopy
run: |
$url = "https://aka.ms/downloadazcopy-v10-windows"
$output = "azcopy.zip"
Invoke-WebRequest -Uri $url -OutFile $output -UseBasicParsing
- name: Extract AzCopy
run: |
Expand-Archive -Path "azcopy.zip" -DestinationPath "$env:USERPROFILE\azcopy" -Force
- name: Add AzCopy to PATH
run: |
$azcopyPath = "$env:USERPROFILE\azcopy\*"
$env:PATH += ";$azcopyPath"
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Machine)
- name: Verify AzCopy installation
run: azcopy --version
- name: Create Temp Directory
run: |
if (-Not (Test-Path -Path "C:\temp")) {
New-Item -ItemType Directory -Path "C:\temp" -Force
}
- name: Write license to file
run: |
Set-Content -Path 'C:\temp\license.dat' -Value $env:COVERITY_LICENSE -Force
cd 'C:\temp'
Get-ChildItem -Force | Select-Object -Property Mode, LastWriteTime, Length, Name
env:
COVERITY_LICENSE: ${{ secrets.COVERITY_LICENSE }}
# - name: Copy Coverity Client from Azure Blob Storage
# env:
# AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
# AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
# DEVOPS_ST_SAS_TOKEN: ${{ secrets.DEVOPS_ST_SAS_TOKEN }}
# run: |
# azcopy copy "https://stsmpdevopsimages.blob.core.windows.net/armimagelayeraddons/synopsys/coverity/cov-analysis-win64-2024.3.1.exe?sp=r&st=2024-07-29T23:07:35Z&se=2024-07-30T07:07:35Z&spr=https&sv=2022-11-02&sr=b&sig=lI0J8oEXWyHu3RBrrbEfnwpRG4ooGBgFksl%2BHPWUG6o%3D" "C:\temp/cov-analysis-win64-2024.3.1.exe" --recursive
- name: Install Coverity Client
env:
# DEVOPS_ST_URL: ${{ vars.DEVOPS_ST_URL }}
DEVOPS_ST_SAS_TOKEN: ${{ secrets.DEVOPS_ST_SAS_TOKEN }}
#COV_LICENSE=${{ secrets.COVERITY_LICENSE }}
run: |
# Start-Process -FilePath "C:\temp/cov-analysis-win64-2024.3.1.exe" -ArgumentList "/S" -
./gen.ps1
# ./images\windows\scripts\build\Install-CoverityClient.ps1
#------------------------------------------------
# - name: Checkout License Agreement Repository
# uses: actions/checkout@v2
# with:
# repository: catelleEMpei-Eaton/your-license-repo (etn-utilities/devsecops-cicdimage-ubuntu)
# path: license-repo (etn-utilities/devsecops-cicdimage-ubuntu)
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Read and Display License Agreement
# run: |
# Get-Content "license-repo\path\to\license\agreement.txt" | Out-String