Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
39f96f9
CI: improve logging when reunning Pester specs
aramprice Jul 29, 2025
2bb5283
CI: place the packer key on disk via create-aws-stemcell/run
aramprice Jul 31, 2025
f78b22c
CI: remove `attempts: 3` from IaaS builds
aramprice Aug 1, 2025
cb25a84
CI: logging and organization in powershell tasks
aramprice Aug 12, 2025
6a2922c
Powershell: remove Enable-Hyper-V function
aramprice Jul 31, 2025
f7c7808
nit: cleanup comments, formatting, lint issues
aramprice Aug 5, 2025
27b7c88
stembuild: reorganize Makefile
aramprice Aug 6, 2025
1e20172
stembuild: replace mockgen with counterfeiter
aramprice Aug 6, 2025
c55e61c
stembuild: remove ginkgo from tools package
aramprice Aug 6, 2025
19a735c
stembuild: file name matches package name
aramprice Aug 7, 2025
f886d11
stembuild: simplify `version` package
aramprice Aug 5, 2025
a327487
stembuild: cleanup vmconstruct_test
aramprice Aug 5, 2025
e907a2d
stembuild: replace custom messangers
aramprice Aug 5, 2025
ef5d7f1
stembuild: messenger for HelpCommand
aramprice Aug 6, 2025
faf33cf
stembuild: simplify main()
aramprice Aug 7, 2025
a91192a
stembuild: vmconstruct tests assert on behavior
aramprice Aug 8, 2025
5e9f491
stembuild: vmconstruct extract ScriptExecutor
aramprice Aug 8, 2025
afb1300
stembuild: vmconstruct code cleanup
aramprice Aug 12, 2025
5bc8d2c
stembuild: reorganize VcenterClient
aramprice Aug 12, 2025
958ce3f
stembuild: move integration-ish iaas_cli tests to integration
aramprice Aug 9, 2025
13dcaa2
Remove static IPs for Windows 2019 on vSphere
Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.envrc
.vscode

stembuild/out/
stembuild/stembuild
stembuild/stembuild.exe
stembuild/StemcellAutomation.zip
Expand Down
2 changes: 2 additions & 0 deletions ci/common-scripts/setup-windows-container.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ function Set-TmpDir
$working_directory = Get-Location
$guid = $( New-Guid ).Guid
$temp_directory=Join-Path -Path $working_directory.path -ChildPath "temp-$guid"
Write-Host *** Creating and setting temp environment variables to $temp_directory ***
New-Item -Path $temp_directory -ItemType Directory
$env:TMP=$temp_directory
$env:TEMP=$temp_directory
$env:SystemTemp=$temp_directory
}

Expand Down
136 changes: 69 additions & 67 deletions ci/pipelines/stemcells-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ resources:
type: git
source:
uri: https://github.com/cloudfoundry/windows-utilities-release.git
- name: govmomi
type: git
source:
uri: https://github.com/vmware/govmomi.git

# type: docker-image
- name: bosh-windows-stemcell-builder-ci-docker-image
Expand Down Expand Up @@ -231,8 +227,8 @@ resources:
- name: lgpo-binary
type: file-url
source:
url: "https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip"
filename: "LGPO.zip"
url: https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip
filename: LGPO.zip

# type: semver
- name: aws-build-number
Expand Down Expand Up @@ -302,16 +298,6 @@ resources:
file: main
initial_version: "((BASE_OS_VERSION)).1.0"

# type: pool
- name: nimbus-ips
type: pool
tags: [*internal_worker_tag]
source:
branch: master
pool: nimbus-ips
private_key: ((github_deploy_key_Bosh-Windows-Locks.private_key))
uri: git@github.gwd.broadcom.net:TNZ/Bosh-Windows-Locks.git

# type: s3
- name: blobstore-s3-cli
type: s3
Expand Down Expand Up @@ -814,10 +800,6 @@ jobs:
- get: bosh-agent-release
passed: [build]
- get: ovftool
- put: nimbus-ips
inputs: detect
params: { acquire: true }
tags: [*internal_worker_tag]
- get: blobstore-dav-cli
- get: blobstore-s3-cli
- get: blobstore-gcs-cli
Expand Down Expand Up @@ -860,23 +842,47 @@ jobs:
- task: zip-files
file: bosh-windows-stemcell-builder-ci/ci/tasks/zip-files/task.yml
image: bosh-windows-stemcell-builder-ci-image
- load_var: integration-vm-name
file: integration-vm-name/name
format: trim
reveal: true
- task: fetch-integration-vm-ip
file: bosh-windows-stemcell-builder-ci/ci/tasks/fetch-vm-ip/task.yml
image: bosh-windows-stemcell-builder-ci-image
tags: [ windows-nimbus ]
params:
GOVC_URL: ((nimbus_windows-demo_auth_url))
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VM_NAME: ((.:integration-vm-name))
- load_var: integration-vm-ip
file: vm-ip/ip
format: trim
reveal: true
- task: integration
tags: [windows-nimbus]
file: bosh-windows-stemcell-builder-ci/ci/tasks/test-integration-stembuild-windows/task.yml
timeout: 3h
params:
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
CONTRACT_TEST_VM_NAME: stembuild_base_vm_2019_
CONTRACT_TEST_VM_PASSWORD: ((stembuild_vm_user.password))
CONTRACT_TEST_VM_USERNAME: ((stembuild_vm_user.username))

GOVC_DATASTORE: ((nimbus_windows-demo_ds))
GOVC_NETWORK: internal-network
GOVC_RESOURCE_POOL: /dc0/host/concourse_cluster/Resources

VCENTER_ADMIN_CREDENTIAL_URL: ((nimbus_windows-demo_auth_url))
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_USERNAME: ((nimbus_windows-demo_user.username))
VCENTER_PASSWORD: ((nimbus_windows-demo_user.password))

VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VM_USERNAME: ((stembuild_vm_user.username))
VM_PASSWORD: ((stembuild_vm_user.password))
PACKAGE_TEST_VM_NAME: stembuild-package-integration-tests-base-vm
OS_LINE: *windows_os_line
TARGET_VM_IP: ((.:integration-vm-ip))
- task: build
tags: [windows-nimbus]
file: bosh-windows-stemcell-builder-ci/ci/tasks/build-stembuild-windows/task.yml
Expand All @@ -894,11 +900,6 @@ jobs:
params:
CLONE_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VCENTER_ADMIN_CREDENTIAL_URL: ((nimbus_windows-demo_auth_url))
ensure:
put: nimbus-ips
inputs: detect
params: { release: nimbus-ips }
tags: [*internal_worker_tag]

- name: stembuild-linux
serial: true
Expand Down Expand Up @@ -927,16 +928,11 @@ jobs:
- get: bosh-agent-release
passed: [build]
- get: ovftool
- put: nimbus-ips
inputs: detect
params: { acquire: true }
tags: [*internal_worker_tag]
- get: blobstore-dav-cli
- get: blobstore-s3-cli
- get: blobstore-gcs-cli
- get: windows-bsdtar
- get: windows-winsw
- get: govmomi
- put: version
inputs: detect
resource: stembuild-linux-build-number
Expand All @@ -955,20 +951,6 @@ jobs:
- task: unit-test
file: bosh-windows-stemcell-builder-ci/ci/tasks/test-units-stembuild-linux/task.yml
image: bosh-windows-stemcell-builder-ci-image
- task: contract-test
file: bosh-windows-stemcell-builder-ci/ci/tasks/test-contract-stembuild-linux/task.yml
image: bosh-windows-stemcell-builder-ci-image
tags: [windows-nimbus]
params:
VCENTER_ADMIN_CREDENTIAL_URL: ((nimbus_windows-demo_auth_url))
VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
PACKAGE_TEST_VM_NAME: stembuild-package-integration-tests-base-vm
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_USERNAME: ((nimbus_windows-demo_user.username))
VCENTER_PASSWORD: ((nimbus_windows-demo_user.password))
CONTRACT_TEST_VM_NAME: stembuild_base_vm_2019_
CONTRACT_TEST_VM_PASSWORD: ((stembuild_vm_user.password))
CONTRACT_TEST_VM_USERNAME: ((stembuild_vm_user.username))
- task: setup-integration-test-vm
file: bosh-windows-stemcell-builder-ci/ci/tasks/setup-integration-test-vm/task.yml
image: bosh-windows-stemcell-builder-ci-image
Expand All @@ -988,24 +970,48 @@ jobs:
- task: zip-files
file: bosh-windows-stemcell-builder-ci/ci/tasks/zip-files/task.yml
image: bosh-windows-stemcell-builder-ci-image
- load_var: integration-vm-name
file: integration-vm-name/name
format: trim
reveal: true
- task: fetch-integration-vm-ip
file: bosh-windows-stemcell-builder-ci/ci/tasks/fetch-vm-ip/task.yml
image: bosh-windows-stemcell-builder-ci-image
tags: [ windows-nimbus ]
params:
GOVC_URL: ((nimbus_windows-demo_auth_url))
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VM_NAME: ((.:integration-vm-name))
- load_var: integration-vm-ip
file: vm-ip/ip
format: trim
reveal: true
- task: integration
file: bosh-windows-stemcell-builder-ci/ci/tasks/test-integration-stembuild-linux/task.yml
image: bosh-windows-stemcell-builder-ci-image
tags: [windows-nimbus]
timeout: 3h
params:
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
CONTRACT_TEST_VM_NAME: stembuild_base_vm_2019_
CONTRACT_TEST_VM_PASSWORD: ((stembuild_vm_user.password))
CONTRACT_TEST_VM_USERNAME: ((stembuild_vm_user.username))

GOVC_DATASTORE: ((nimbus_windows-demo_ds))
GOVC_NETWORK: internal-network
GOVC_RESOURCE_POOL: /dc0/host/concourse_cluster/Resources

VCENTER_ADMIN_CREDENTIAL_URL: ((nimbus_windows-demo_auth_url))
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_USERNAME: ((nimbus_windows-demo_user.username))
VCENTER_PASSWORD: ((nimbus_windows-demo_user.password))

VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VM_USERNAME: ((stembuild_vm_user.username))
VM_PASSWORD: ((stembuild_vm_user.password))
PACKAGE_TEST_VM_NAME: stembuild-package-integration-tests-base-vm
OS_LINE: *windows_os_line
TARGET_VM_IP: ((.:integration-vm-ip))
- task: build
file: bosh-windows-stemcell-builder-ci/ci/tasks/build-stembuild-linux/task.yml
image: bosh-windows-stemcell-builder-ci-image
Expand All @@ -1023,11 +1029,6 @@ jobs:
params:
CLONE_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VCENTER_ADMIN_CREDENTIAL_URL: ((nimbus_windows-demo_auth_url))
ensure:
put: nimbus-ips
inputs: detect
params: { release: nimbus-ips }
tags: [*internal_worker_tag]

- name: create-stembuild-linux-stemcell
serial: true
Expand Down Expand Up @@ -1081,12 +1082,12 @@ jobs:
image: bosh-windows-stemcell-builder-ci-image
tags: [windows-nimbus]
params:
GOVC_URL: ((nimbus_windows-demo_auth_url))
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_USERNAME: ((nimbus_windows-demo_user.username))
VCENTER_PASSWORD: ((nimbus_windows-demo_user.password))
VCENTER_VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
STEMBUILD_BASE_VM_NAME: windows-server-2019-base-vm-linux
STEMBUILD_BASE_VM_IP: 192.168.111.31
STEMBUILD_BASE_VM_USERNAME: ((stembuild_vm_user.username))
STEMBUILD_BASE_VM_PASSWORD: ((stembuild_vm_user.password))
- task: run-stembuild-package
Expand Down Expand Up @@ -1239,6 +1240,19 @@ jobs:
DATACENTER: dc0
VM_TO_SNAPSHOT: /dc0/vm/bosh-windows-ci-vms-and-templates/windows-server-2019-base-vm-windows
SNAPSHOT_NAME: "stembuild-ready-power-on"
- task: fetch-vm-ip
file: bosh-windows-stemcell-builder-ci/ci/tasks/fetch-vm-ip/task.yml
image: bosh-windows-stemcell-builder-ci-image
tags: [ windows-nimbus ]
params:
GOVC_URL: ((nimbus_windows-demo_auth_url))
VCENTER_BASE_URL: ((nimbus_windows-demo_base_url))
VCENTER_VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
VM_NAME: windows-server-2019-base-vm-windows
- load_var: ip
file: vm-ip/ip
format: trim
reveal: true
- task: run-stembuild-construct
file: bosh-windows-stemcell-builder-ci/ci/tasks/run-construct-stembuild-windows/task.yml
tags: [windows-nimbus]
Expand All @@ -1248,7 +1262,7 @@ jobs:
VCENTER_PASSWORD: ((nimbus_windows-demo_user.password))
VCENTER_VM_FOLDER: /dc0/vm/bosh-windows-ci-vms-and-templates
STEMBUILD_BASE_VM_NAME: windows-server-2019-base-vm-windows
STEMBUILD_BASE_VM_IP: 192.168.111.32
STEMBUILD_BASE_VM_IP: ((.:ip))
STEMBUILD_BASE_VM_USERNAME: ((stembuild_vm_user.username))
STEMBUILD_BASE_VM_PASSWORD: ((stembuild_vm_user.password))
- task: run-stembuild-package
Expand Down Expand Up @@ -1384,13 +1398,7 @@ jobs:
params:
pre: build
tags: [*worker_tag]
- task: create-packer-ci-key
image: bosh-windows-stemcell-builder-ci-image
file: bosh-windows-stemcell-builder-ci/ci/tasks/create-packer-ci-key/task.yml
params:
PACKER_CI: ((bosh_windows_aws_packer_ci_private_key.private_key))
- task: create-aws-stemcell
attempts: 3
timeout: 2h
file: bosh-windows-stemcell-builder-ci/ci/tasks/create-aws-stemcell/task.yml
image: bosh-windows-stemcell-builder-ci-image
Expand All @@ -1400,6 +1408,7 @@ jobs:
PACKER_AWS_ACCESS_KEY: ((aws-stemcells_aws_access_key.username))
PACKER_AWS_SECRET_KEY: ((aws-stemcells_aws_access_key.password))
PACKER_REGION: ((AWS_PACKER_REGION))
PACKER_CI_PRIVATE_KEY: ((bosh_windows_aws_packer_ci_private_key.private_key))
OS_VERSION: windows((BASE_OS_VERSION))
OUTPUT_BUCKET_NAME: aws-regional-stemcells-((BASE_OS_VERSION))
VM_PREFIX: packer-prod-((BASE_OS_VERSION))
Expand Down Expand Up @@ -1564,13 +1573,7 @@ jobs:
- get: blobstore-gcs-cli
- get: windows-bsdtar
- get: windows-winsw
- task: create-packer-ci-key
image: bosh-windows-stemcell-builder-ci-image
file: bosh-windows-stemcell-builder-ci/ci/tasks/create-packer-ci-key/task.yml
params:
PACKER_CI: ((bosh_windows_aws_govcloud_packer_ci_private_key.private_key))
- task: create-aws-govcloud-stemcell
attempts: 3
timeout: 1h30m
file: bosh-windows-stemcell-builder-ci/ci/tasks/create-aws-stemcell/task.yml
image: bosh-windows-stemcell-builder-ci-image
Expand All @@ -1579,6 +1582,7 @@ jobs:
AWS_REGION: us-gov-west-1
PACKER_AWS_SECRET_KEY: ((packer_user_gov_aws_access_key.password))
PACKER_REGION: ((AWS_GOVCLOUD_PACKER_REGION))
PACKER_CI_PRIVATE_KEY: ((bosh_windows_aws_govcloud_packer_ci_private_key.private_key))
OS_VERSION: windows((BASE_OS_VERSION))
OUTPUT_BUCKET_NAME: aws-regional-stemcells-((BASE_OS_VERSION))
VM_PREFIX: packer-prod-((BASE_OS_VERSION))
Expand Down Expand Up @@ -1737,7 +1741,6 @@ jobs:
pre: build
tags: [*worker_tag]
- task: create-azure-stemcell
attempts: 3
file: bosh-windows-stemcell-builder-ci/ci/tasks/create-azure-stemcell/task.yml
image: bosh-windows-stemcell-builder-ci-image
params:
Expand Down Expand Up @@ -1935,7 +1938,6 @@ jobs:
pre: build
tags: [*worker_tag]
- task: create-gcp-stemcell
attempts: 3
file: bosh-windows-stemcell-builder-ci/ci/tasks/create-gcp-stemcell/task.yml
image: bosh-windows-stemcell-builder-ci-image
params:
Expand Down
8 changes: 6 additions & 2 deletions ci/tasks/create-aws-stemcell/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
set -eu -o pipefail
set -x

CONCOURSE_ROOT="$(pwd)"

if [ -n "${AWS_ROLE_ARN}" ]; then
aws configure --profile creds_account set aws_access_key_id "${PACKER_AWS_ACCESS_KEY}"
set +x
Expand All @@ -18,13 +20,15 @@ else
export AWS_SECRET_KEY="${PACKER_AWS_SECRET_KEY}"
set -x
fi
export PACKER_CI_PRIVATE_KEY_LOCATION="${CONCOURSE_ROOT}/packer-ci-private-key/packer_key"
mkdir -p "$(dirname "${PACKER_CI_PRIVATE_KEY_LOCATION}")"
echo "${PACKER_CI_PRIVATE_KEY}" > "${PACKER_CI_PRIVATE_KEY_LOCATION}"
chmod 600 "${PACKER_CI_PRIVATE_KEY_LOCATION}"

pushd lgpo-binary
unzip LGPO.zip
popd

CONCOURSE_ROOT="$(pwd)"

"${CONCOURSE_ROOT}/bosh-windows-stemcell-builder-ci/ci/tasks/build-agent-zip/run.sh"
"${CONCOURSE_ROOT}/bosh-windows-stemcell-builder-ci/ci/tasks/build-psmodules-zip/run.sh"

Expand Down
2 changes: 1 addition & 1 deletion ci/tasks/create-aws-stemcell/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ inputs:
- name: version
- name: lgpo-binary
- name: sshd
- name: packer-ci-private-key
- name: bosh-agent-release
- name: blobstore-dav-cli
- name: blobstore-s3-cli
Expand All @@ -31,6 +30,7 @@ params:
AWS_ROLE_ARN:
PACKER_AWS_ACCESS_KEY:
PACKER_AWS_SECRET_KEY:
PACKER_CI_PRIVATE_KEY:
PACKER_REGION:
VM_PREFIX:

Expand Down
13 changes: 0 additions & 13 deletions ci/tasks/create-packer-ci-key/task.yml

This file was deleted.

Loading
Loading