mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Remove sensitive data from logs
This commit is contained in:
@@ -28,7 +28,12 @@ jobs:
|
|||||||
SourceFolder: 'images/macos/provision/log/'
|
SourceFolder: 'images/macos/provision/log/'
|
||||||
RemoveSourceFolder: true
|
RemoveSourceFolder: true
|
||||||
|
|
||||||
- bash: |
|
- pwsh: |
|
||||||
|
$SensitiveData = @(
|
||||||
|
'IP address:',
|
||||||
|
'Using ssh communicator to connect:'
|
||||||
|
)
|
||||||
|
|
||||||
packer build -on-error=abort \
|
packer build -on-error=abort \
|
||||||
-var="vcenter_server=$(vcenter_server_v2)" \
|
-var="vcenter_server=$(vcenter_server_v2)" \
|
||||||
-var="vcenter_username=$(vcenter_username_v2)" \
|
-var="vcenter_username=$(vcenter_username_v2)" \
|
||||||
@@ -45,7 +50,13 @@ jobs:
|
|||||||
-var="xcode_install_user=$(xcode-installation-user)" \
|
-var="xcode_install_user=$(xcode-installation-user)" \
|
||||||
-var="xcode_install_password=$(xcode-installation-password)" \
|
-var="xcode_install_password=$(xcode-installation-password)" \
|
||||||
-color=false \
|
-color=false \
|
||||||
${{ parameters.template_path }}
|
${{ parameters.template_path }} `
|
||||||
|
| Where-Object {
|
||||||
|
#Filter sensitive data from Packer logs
|
||||||
|
$currentString = $_
|
||||||
|
$sensitiveString = $SensitiveData | Where-Object { $currentString -match $_ }
|
||||||
|
$sensitiveString -eq $null
|
||||||
|
}
|
||||||
displayName: 'Build VM'
|
displayName: 'Build VM'
|
||||||
env:
|
env:
|
||||||
PACKER_LOG: 0
|
PACKER_LOG: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user