From f240d47240dff5c89c2c1b9f2f73721df914b15b Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Thu, 4 Oct 2018 20:45:11 -0400 Subject: [PATCH 01/46] Add nvs --- packer-assets/windows-server-2016-ci-onion-packages.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-2016-ci-onion-packages.txt index 8b9f49c57..d4ee8de57 100644 --- a/packer-assets/windows-server-2016-ci-onion-packages.txt +++ b/packer-assets/windows-server-2016-ci-onion-packages.txt @@ -12,6 +12,7 @@ jq lein maven mysql +nvs phantomjs postgresql python From 0421c488a4ac8faabca7cbe4ad825c71c749e3af Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Thu, 4 Oct 2018 20:46:44 -0400 Subject: [PATCH 02/46] Make it easier to initiate debug builds --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 4d74986ea..8894eb965 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,13 @@ TRAVIS_PACKER_BUILD ?= travis-packer-build UNZIP ?= unzip %: %.yml $(META_FILES) + $(PACKER) --version $(PACKER) build -only=$(BUILDER) <(bin/yml2json < $<) +%-debug: %.yml $(META_FILES) + $(PACKER) --version + $(PACKER) build -only=$(BUILDER) -debug <(bin/yml2json < $<) + .PHONY: all all: $(META_FILES) $(PHP_PACKAGES_FILE) $(SYSTEM_INFO_COMMANDS_FILES) From dc0616ce21d4aa38242642c8a42b5e75f80538a4 Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Thu, 4 Oct 2018 20:47:59 -0400 Subject: [PATCH 03/46] Drop purge file provisioner Seems to cause problems locally --- ci-onion.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index 32fc04d90..4b3ff5902 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -33,9 +33,9 @@ provisioners: - type: file source: tmp/git-meta destination: c:/windows/temp/ -- type: file - source: packer-assets/windows-server-2016-normal-purge.txt - destination: c:/windows/temp/purge.txt +# - type: file +# source: packer-assets/windows-server-2016-normal-purge.txt +# destination: c:/windows/temp/purge.txt - type: file source: packer-assets/windows-server-2016-ci-onion-packages.txt destination: c:/windows/temp/packages.txt From 53cb427dde0eebd286df3732a2219fb02c439663 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 4 Oct 2018 21:03:17 -0700 Subject: [PATCH 04/46] this fixes issues with execute_command stalling --- ci-onion.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index 4b3ff5902..da497a626 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -58,7 +58,7 @@ provisioners: - PACKER_ENV_DIR=/c/.packer-env - TRAVIS_COOKBOOKS_BRANCH={{ user `travis_cookbooks_branch` }} - TRAVIS_COOKBOOKS_SHA={{ user `travis_cookbooks_sha` }} - execute_command: "{{ .Vars }} c:/windows/temp/Run-BashScript.ps1 -bashscript '{{ .Path }}'" + execute_command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; & c:/windows/temp/Run-BashScript.ps1 -bashscript '{{.Path}}'; exit $LastExitCode }" # TODO: use chef to do things (???) # - type: chef-solo # guest_os_type: windows @@ -82,7 +82,11 @@ provisioners: - PACKER_ENV_DIR=/c/.packer-env - SYSTEM_INFO_JSON=/c/travis_system_info.json - TMPDIR=/c/windows/temp - execute_command: "{{ .Vars }} c:/windows/temp/Run-BashScript.ps1 -bashscript '{{ .Path }}'" + - NODE_ATTRIBUTES_YML=/c/.node-attributes.yml + - RSPEC_JSON_DIR=/c/Users/travis + - DPKG_MANIFEST_JSON=/c/.dpkg-manifest.json + - BIN_LIB_CHECKSUMS=/c/.bin-lib.SHA256SUMS + execute_command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; & c:/windows/temp/Run-BashScript.ps1 -bashscript '{{.Path}}'; exit $LastExitCode }" - type: file source: "c:/windows/temp/image-metadata-{{ user `image_name` }}.tar.bz2" destination: tmp/image-metadata-{{ user `image_name` }}.tar.bz2 From e4486ab30997e12276f9c614637514894d62a3e5 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 4 Oct 2018 22:01:54 -0700 Subject: [PATCH 05/46] simplify the onion chocolately packages --- .../windows-server-2016-ci-onion-packages.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-2016-ci-onion-packages.txt index d4ee8de57..9b77cf66f 100644 --- a/packer-assets/windows-server-2016-ci-onion-packages.txt +++ b/packer-assets/windows-server-2016-ci-onion-packages.txt @@ -1,24 +1,9 @@ 7zip.install -ant -chromedriver cmake curl -firefox git.install -gradle -jdk10 -jdk8 jq -lein -maven -mysql nvs -phantomjs -postgresql -python -python2 ruby -sbt visualstudio2017buildtools wget -yarn From 34700665b501099577e642bbaf46e8d49fd57f6a Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 4 Oct 2018 22:29:12 -0700 Subject: [PATCH 06/46] add some more language tags to onion --- packer-scripts/create-windows-job-board-data | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 55b4555d3..05d0308b5 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -19,8 +19,12 @@ tags: os: windows packer_chef_time: "${nowtime}" language_powershell: true + language_sh: true + language_bash: true + language_shell: true + language_script: true feature_dotnet: true -tags_string: "dist:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell:true,feature_dotnet:true" +tags_string: "dist:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,feature_dotnet:true" EOF } From c3cff9221cc4c9414165ee07c15bfa4fe3cebdc4 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 4 Oct 2018 22:49:43 -0700 Subject: [PATCH 07/46] add winscp to chocolately onion --- packer-assets/windows-server-2016-ci-onion-packages.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-2016-ci-onion-packages.txt index 9b77cf66f..19670797e 100644 --- a/packer-assets/windows-server-2016-ci-onion-packages.txt +++ b/packer-assets/windows-server-2016-ci-onion-packages.txt @@ -7,3 +7,4 @@ nvs ruby visualstudio2017buildtools wget +winscp From 6ba984884c8642a24b39da3005afc27eb4476b13 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 5 Oct 2018 13:54:15 -0700 Subject: [PATCH 08/46] use nvm instead of nvs --- packer-assets/windows-server-2016-ci-onion-packages.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-2016-ci-onion-packages.txt index 19670797e..ec7eeb2ed 100644 --- a/packer-assets/windows-server-2016-ci-onion-packages.txt +++ b/packer-assets/windows-server-2016-ci-onion-packages.txt @@ -3,7 +3,7 @@ cmake curl git.install jq -nvs +nvm ruby visualstudio2017buildtools wget From 4a59908d52c5a0a1c5c46b640b1742493e865611 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 5 Oct 2018 18:46:21 -0700 Subject: [PATCH 09/46] don't install nvm --- packer-assets/windows-server-2016-ci-onion-packages.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-2016-ci-onion-packages.txt index ec7eeb2ed..b27c33fed 100644 --- a/packer-assets/windows-server-2016-ci-onion-packages.txt +++ b/packer-assets/windows-server-2016-ci-onion-packages.txt @@ -3,7 +3,6 @@ cmake curl git.install jq -nvm ruby visualstudio2017buildtools wget From 491ddc62a5bce95fb141a09ce65fd4ac30160681 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sun, 7 Oct 2018 20:48:33 -0700 Subject: [PATCH 10/46] support node js on windows --- packer-scripts/create-windows-job-board-data | 1 + 1 file changed, 1 insertion(+) diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 05d0308b5..41c0302bf 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -23,6 +23,7 @@ tags: language_bash: true language_shell: true language_script: true + language_node_js: true feature_dotnet: true tags_string: "dist:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,feature_dotnet:true" EOF From 3b8c85e507de690e53dacf2c3533a04621ed1e79 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sun, 7 Oct 2018 22:27:47 -0700 Subject: [PATCH 11/46] an extra newline to kick off a build --- ci-onion.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-onion.yml b/ci-onion.yml index da497a626..1a55ff4de 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -100,3 +100,5 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + + \ No newline at end of file From 3b04fd1f5d8c8763eb2559f6a4cdfc4ae7aa749c Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 8 Oct 2018 14:47:46 -0700 Subject: [PATCH 12/46] update the onion tags string --- ci-onion.yml | 3 +-- packer-scripts/create-windows-job-board-data | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index 1a55ff4de..9c1ab47c8 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -100,5 +100,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - - \ No newline at end of file + \ No newline at end of file diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 41c0302bf..57610f019 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -25,7 +25,7 @@ tags: language_script: true language_node_js: true feature_dotnet: true -tags_string: "dist:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,feature_dotnet:true" +tags_string: "dist:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,feature_dotnet:true" EOF } From 00aaad88f66e10412e445fdad1dc8fb2f1092366 Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Mon, 8 Oct 2018 18:00:18 -0400 Subject: [PATCH 13/46] Install hashdeep for Windows hashdeep = md5deep https://chocolatey.org/packages/hashdeep --- packer-assets/windows-server-2016-ci-onion-packages.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-2016-ci-onion-packages.txt index b27c33fed..3be29cc6a 100644 --- a/packer-assets/windows-server-2016-ci-onion-packages.txt +++ b/packer-assets/windows-server-2016-ci-onion-packages.txt @@ -2,6 +2,7 @@ cmake curl git.install +hashdeep jq ruby visualstudio2017buildtools From 12d0efeb55eeba1a52a8e0341d5d081cc619883a Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Tue, 9 Oct 2018 15:35:32 -0700 Subject: [PATCH 14/46] some tweaks to the windows image building --- ci-onion.yml | 9 ++++++--- ...packages.txt => windows-server-ci-onion-packages.txt} | 0 ...-normal-purge.txt => windows-server-normal-purge.txt} | 0 packer-scripts/create-windows-job-board-data | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) rename packer-assets/{windows-server-2016-ci-onion-packages.txt => windows-server-ci-onion-packages.txt} (100%) rename packer-assets/{windows-server-2016-normal-purge.txt => windows-server-normal-purge.txt} (100%) diff --git a/ci-onion.yml b/ci-onion.yml index 9c1ab47c8..51d498c5a 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -3,7 +3,9 @@ description: Travis CI onion build env template variables: gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}" gce_project_id: "{{ env `GCE_PROJECT_ID` }}" - image_name: travis-ci-onion-2016-{{ timestamp }}-<%= git_desc %> + gce_image_name: "windows-server-1803-dc-core-for-containers-v20180920" + image_name: travis-ci-onion-1803-containers-{{ timestamp }}-<%= git_desc %> + dist_name: 1803-containers travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" travis_cookbooks_edge_branch: master travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" @@ -18,7 +20,7 @@ builders: image_description: Travis CI Onion account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: windows-server-2016-dc-v20180911 + source_image: "{{ user `gce_image_name` }}" zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n1-standard-4 @@ -37,7 +39,7 @@ provisioners: # source: packer-assets/windows-server-2016-normal-purge.txt # destination: c:/windows/temp/purge.txt - type: file - source: packer-assets/windows-server-2016-ci-onion-packages.txt + source: packer-assets/windows-server-ci-onion-packages.txt destination: c:/windows/temp/packages.txt - type: file source: packer-scripts/Run-BashScript.ps1 @@ -79,6 +81,7 @@ provisioners: environment_vars: - "IMAGE_METADATA_TARBALL=/c/windows/temp/image-metadata-{{ user `image_name` }}.tar.bz2" - JOB_BOARD_REGISTER_FILE=/c/travis-job-board-register.yml + - JOB_BOARD_IMAGE_DIST={{ user `dist_name` }} - PACKER_ENV_DIR=/c/.packer-env - SYSTEM_INFO_JSON=/c/travis_system_info.json - TMPDIR=/c/windows/temp diff --git a/packer-assets/windows-server-2016-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt similarity index 100% rename from packer-assets/windows-server-2016-ci-onion-packages.txt rename to packer-assets/windows-server-ci-onion-packages.txt diff --git a/packer-assets/windows-server-2016-normal-purge.txt b/packer-assets/windows-server-normal-purge.txt similarity index 100% rename from packer-assets/windows-server-2016-normal-purge.txt rename to packer-assets/windows-server-normal-purge.txt diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 57610f019..3078674e0 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -15,7 +15,7 @@ languages: features: - dotnet tags: - dist: server-2016 + dist: $IMAGE_DIST os: windows packer_chef_time: "${nowtime}" language_powershell: true @@ -25,7 +25,7 @@ tags: language_script: true language_node_js: true feature_dotnet: true -tags_string: "dist:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,feature_dotnet:true" +tags_string: "dist:$IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,feature_dotnet:true" EOF } From 3b459b7ccded6e6f071b6a01427e35165844aa91 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Tue, 9 Oct 2018 16:16:30 -0700 Subject: [PATCH 15/46] correct the env var --- packer-scripts/create-windows-job-board-data | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 3078674e0..185085116 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -15,7 +15,7 @@ languages: features: - dotnet tags: - dist: $IMAGE_DIST + dist: $JOB_BOARD_IMAGE_DIST os: windows packer_chef_time: "${nowtime}" language_powershell: true @@ -25,7 +25,7 @@ tags: language_script: true language_node_js: true feature_dotnet: true -tags_string: "dist:$IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,feature_dotnet:true" +tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,feature_dotnet:true" EOF } From 340196d18304af31119b7307f28d3dc0a143cc54 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Tue, 9 Oct 2018 21:45:02 -0700 Subject: [PATCH 16/46] onion packages and job board data --- packer-assets/windows-server-ci-onion-packages.txt | 1 + packer-scripts/create-windows-job-board-data | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 3be29cc6a..05eb2306d 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -5,6 +5,7 @@ git.install hashdeep jq ruby +vcredist140 visualstudio2017buildtools wget winscp diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 185085116..ff269c56a 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -24,8 +24,10 @@ tags: language_shell: true language_script: true language_node_js: true + language_go: true + language_rust: true feature_dotnet: true -tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,feature_dotnet:true" +tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,language_go:truelanguage_rust:true,feature_dotnet:true" EOF } From 5324329f04078e247d1723d7acf7d0228f3cc5c3 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Tue, 9 Oct 2018 22:32:13 -0700 Subject: [PATCH 17/46] fix the tags for onion --- packer-scripts/create-windows-job-board-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index ff269c56a..185a552ab 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -27,7 +27,7 @@ tags: language_go: true language_rust: true feature_dotnet: true -tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,language_go:truelanguage_rust:true,feature_dotnet:true" +tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,language_go:true,language_rust:true,feature_dotnet:true" EOF } From e646b25e28a86a9b29fa3ebf4f10ecf6b9f698a6 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Tue, 9 Oct 2018 22:32:27 -0700 Subject: [PATCH 18/46] let packer create the travis user --- ci-onion.yml | 4 ++-- packer-scripts/Bootstrap-Windows.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index 51d498c5a..e21e261ab 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -14,7 +14,7 @@ builders: - type: googlecompute name: googlecompute communicator: winrm - winrm_username: packer_user + winrm_username: travis winrm_use_ssl: true winrm_insecure: true image_description: Travis CI Onion @@ -26,7 +26,7 @@ builders: machine_type: n1-standard-4 disk_size: 50 metadata: - windows-startup-script-cmd: "winrm quickconfig -quiet & net user /add packer_user & net localgroup administrators packer_user /add & winrm set winrm/config/service/auth @{Basic=\"true\"} & powershell -Command \"& {Set-ExecutionPolicy AllSigned -Force}\"" + windows-startup-script-cmd: "winrm quickconfig -quiet & net user /add travis & net localgroup administrators travis /add & winrm set winrm/config/service/auth @{Basic=\"true\"} & powershell -Command \"& {Set-ExecutionPolicy AllSigned -Force}\"" tags: - ci - onion diff --git a/packer-scripts/Bootstrap-Windows.ps1 b/packer-scripts/Bootstrap-Windows.ps1 index e845c14fd..8d33dcc67 100644 --- a/packer-scripts/Bootstrap-Windows.ps1 +++ b/packer-scripts/Bootstrap-Windows.ps1 @@ -3,7 +3,7 @@ Set-StrictMode -Version 1.0 function Main { Install-Chocolatey Install-Packages - Create-TravisUser + #Create-TravisUser Create-StubFiles } From ef12314e181cc2e00873d60fca1da8622125e579 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 09:43:08 -0700 Subject: [PATCH 19/46] more onion packages --- ci-onion.yml | 2 +- packer-assets/windows-server-ci-onion-packages.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index e21e261ab..2f175a7f1 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,4 +103,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - \ No newline at end of file + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 05eb2306d..339caa4a5 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -5,7 +5,9 @@ git.install hashdeep jq ruby -vcredist140 +vcredist2017 visualstudio2017buildtools +visualcpp-build-tools +microsoft-build-tools wget winscp From 0d4a6857e8263c9e174b306dcd08970e46a26598 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 11:24:39 -0700 Subject: [PATCH 20/46] make sure link.exe is installed --- ci-onion.yml | 1 - packer-assets/windows-server-ci-onion-packages.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index 2f175a7f1..8d3eb17db 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,4 +103,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 339caa4a5..9d1d6df0a 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -6,7 +6,7 @@ hashdeep jq ruby vcredist2017 -visualstudio2017buildtools +visualstudio2017buildtools --package-parameters "--allWorkloads" visualcpp-build-tools microsoft-build-tools wget From 1d6f0a59f334aa677d49fbfd427c30ed784555be Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 11:55:58 -0700 Subject: [PATCH 21/46] more onion tweaks --- packer-assets/windows-server-ci-onion-packages.txt | 2 +- packer-scripts/Bootstrap-Windows.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 9d1d6df0a..85c4d1f0d 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -6,7 +6,7 @@ hashdeep jq ruby vcredist2017 -visualstudio2017buildtools --package-parameters "--allWorkloads" +visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" visualcpp-build-tools microsoft-build-tools wget diff --git a/packer-scripts/Bootstrap-Windows.ps1 b/packer-scripts/Bootstrap-Windows.ps1 index 8d33dcc67..00359056a 100644 --- a/packer-scripts/Bootstrap-Windows.ps1 +++ b/packer-scripts/Bootstrap-Windows.ps1 @@ -19,7 +19,7 @@ function Install-Packages { | Select-String -NotMatch "^(#.*|)$") { $package = $package.Line.Trim() if ($package -ne "") { - choco install $package + invoke-expression "choco install $package" } } } From de498631a9502bcb1a1ebb67e4e93b5801d735ee Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 16:51:43 -0700 Subject: [PATCH 22/46] update the languages for onion --- packer-scripts/create-windows-job-board-data | 30 +++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/packer-scripts/create-windows-job-board-data b/packer-scripts/create-windows-job-board-data index 185a552ab..c7f81bede 100755 --- a/packer-scripts/create-windows-job-board-data +++ b/packer-scripts/create-windows-job-board-data @@ -18,16 +18,44 @@ tags: dist: $JOB_BOARD_IMAGE_DIST os: windows packer_chef_time: "${nowtime}" + language_default: true + language_none: true language_powershell: true language_sh: true language_bash: true language_shell: true language_script: true language_node_js: true + language_javascript: true language_go: true language_rust: true + language_ruby: true + language_python: true + language_php: true + language_d: true + language_r: true + language_dart: true + language_haxe: true + language_perl: true + language_julia: true + language_elixir: true + language_erlang: true + language_crystal: true + language_haskell: true + language_java: true + language_pure_java: true + language_clojurescript: true + language_groovy: true + language_kotlin: true + language_scala: true + language_java: true + language_c: true + language_cplusplus: true + language_c++: true + language_cpp: true + language_csharp: true feature_dotnet: true -tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,language_go:true,language_rust:true,feature_dotnet:true" +tags_string: "dist:$JOB_BOARD_IMAGE_DIST,os:windows,packer_chef_time:${nowtime},language_default:true,language_none:true,language_powershell:true,language_sh:true,language_bash:true,language_shell:true,language_script:true,language_node_js:true,language_javascript:true,language_go:true,language_rust:true,language_ruby:true,language_python:true,language_php:true,language_d:true,language_r:true,language_dart:true,language_haxe:true,language_perl:true,language_julia:true,language_elixir:true,language_erlang:true,language_crystal:true,language_haskell:true,language_java:true,language_pure_java:true,language_clojurescript:true,language_groovy:true,language_kotlin:true,language_scala:true,language_java:true,language_c:true,language_cplusplus:true,language_c++:true,language_cpp:true,language_csharp:true,feature_dotnet:true" EOF } From f3860418cc010e0d3545d674aadef747586aff47 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 17:17:59 -0700 Subject: [PATCH 23/46] a newline for a new build --- ci-onion.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-onion.yml b/ci-onion.yml index 8d3eb17db..cad02a59b 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,3 +103,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + From 28c6d4b1c222bc8e0a8377859b4b51c20c09a1b0 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 20:28:21 -0700 Subject: [PATCH 24/46] some onion package tweaks --- ci-onion.yml | 1 - packer-assets/windows-server-ci-onion-packages.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index cad02a59b..8d3eb17db 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,4 +103,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 85c4d1f0d..339caa4a5 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -6,7 +6,7 @@ hashdeep jq ruby vcredist2017 -visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" +visualstudio2017buildtools visualcpp-build-tools microsoft-build-tools wget From 0d85ed5e25f60a78141addddb501bfc9023f65ad Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 10 Oct 2018 22:03:09 -0700 Subject: [PATCH 25/46] Revert "some onion package tweaks" This reverts commit 28c6d4b1c222bc8e0a8377859b4b51c20c09a1b0. --- ci-onion.yml | 1 + packer-assets/windows-server-ci-onion-packages.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-onion.yml b/ci-onion.yml index 8d3eb17db..cad02a59b 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,3 +103,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 339caa4a5..85c4d1f0d 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -6,7 +6,7 @@ hashdeep jq ruby vcredist2017 -visualstudio2017buildtools +visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" visualcpp-build-tools microsoft-build-tools wget From a133fa559a5c230ddb57a1db3b6f81b7b1d3b36f Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 11 Oct 2018 00:31:56 -0700 Subject: [PATCH 26/46] getting the build tools to work is hard --- ci-onion.yml | 1 - packer-assets/windows-server-ci-onion-packages.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index cad02a59b..8d3eb17db 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,4 +103,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 85c4d1f0d..9d1d6df0a 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -6,7 +6,7 @@ hashdeep jq ruby vcredist2017 -visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" +visualstudio2017buildtools --package-parameters "--allWorkloads" visualcpp-build-tools microsoft-build-tools wget From c25d830b5b7285a1b3aeba869d36a89897714596 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 11 Oct 2018 01:00:06 -0700 Subject: [PATCH 27/46] change the build tools package --- ci-onion.yml | 1 + packer-assets/windows-server-ci-onion-packages.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-onion.yml b/ci-onion.yml index 8d3eb17db..cad02a59b 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,3 +103,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 9d1d6df0a..eaa9e4b22 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -7,7 +7,7 @@ jq ruby vcredist2017 visualstudio2017buildtools --package-parameters "--allWorkloads" -visualcpp-build-tools +visualstudio2017-workload-vctools microsoft-build-tools wget winscp From 585957aa186afcd192cf31721e141621383d4cc2 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 11 Oct 2018 09:10:44 -0700 Subject: [PATCH 28/46] disable windows defender --- ci-onion.yml | 1 - packer-assets/windows-server-ci-onion-packages.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-onion.yml b/ci-onion.yml index cad02a59b..8d3eb17db 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,4 +103,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index eaa9e4b22..0f821bba2 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -1,3 +1,4 @@ +disabledefender-winconfig 7zip.install cmake curl From 7f6c4266c71fdbbd711886cb21d1131962d3a87f Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 11 Oct 2018 10:52:48 -0700 Subject: [PATCH 29/46] add rsync to onion --- ci-onion.yml | 1 + packer-assets/windows-server-ci-onion-packages.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/ci-onion.yml b/ci-onion.yml index 8d3eb17db..cad02a59b 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,3 +103,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 0f821bba2..f153baa3a 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -5,6 +5,7 @@ curl git.install hashdeep jq +rsync ruby vcredist2017 visualstudio2017buildtools --package-parameters "--allWorkloads" From 6c03d72269222351eb161ec66510c27705983d0b Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 11 Oct 2018 14:43:33 -0700 Subject: [PATCH 30/46] lets see if this fixes linker issues --- ci-onion.yml | 1 - packer-assets/windows-server-ci-onion-packages.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index cad02a59b..8d3eb17db 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -103,4 +103,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index f153baa3a..89bad83f4 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -8,7 +8,7 @@ jq rsync ruby vcredist2017 -visualstudio2017buildtools --package-parameters "--allWorkloads" +visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" visualstudio2017-workload-vctools microsoft-build-tools wget From e46e92f7565e25b8af4d190810f9b5b9c850f0ea Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 12 Oct 2018 15:04:04 -0700 Subject: [PATCH 31/46] bump the image timeout to 10m --- ci-onion.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-onion.yml b/ci-onion.yml index 8d3eb17db..e0dd2b1eb 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -31,6 +31,7 @@ builders: - ci - onion - travis-ci-packer-templates + state_timeout: 10m provisioners: - type: file source: tmp/git-meta From 97ba999422113d514da3f7bbf6e2d8cc2e62c1ff Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 12 Oct 2018 18:20:33 -0700 Subject: [PATCH 32/46] tweak the ms build tools --- ci-onion.yml | 1 + packer-assets/windows-server-ci-onion-packages.txt | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index e0dd2b1eb..f8f8771ee 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -104,3 +104,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 89bad83f4..d8a0ae87a 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -1,4 +1,3 @@ -disabledefender-winconfig 7zip.install cmake curl @@ -7,9 +6,12 @@ hashdeep jq rsync ruby -vcredist2017 -visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" -visualstudio2017-workload-vctools -microsoft-build-tools wget winscp +visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.ATLMFC" +visualstudio2017-workload-netcorebuildtools +visualstudio2017-workload-vctools +visualstudio2017-workload-webbuildtools +windows-sdk-10.0 +microsoft-build-tools +vcredist2017 \ No newline at end of file From 58af04f6bc69f0677e9916868b9d076c70dac651 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 12 Oct 2018 19:44:37 -0700 Subject: [PATCH 33/46] optimize and print the log --- ci-onion.yml | 1 - packer-scripts/Bootstrap-Windows.ps1 | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index f8f8771ee..e0dd2b1eb 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -104,4 +104,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-scripts/Bootstrap-Windows.ps1 b/packer-scripts/Bootstrap-Windows.ps1 index 00359056a..e22cceabc 100644 --- a/packer-scripts/Bootstrap-Windows.ps1 +++ b/packer-scripts/Bootstrap-Windows.ps1 @@ -10,7 +10,9 @@ function Main { function Install-Chocolatey { $webClient = New-Object System.Net.WebClient $installScript = $webClient.DownloadString('https://chocolatey.org/install.ps1') - iex "$installScript" + + invoke-expression "$installScript" + choco feature enable -n allowGlobalConfirmation } @@ -22,6 +24,10 @@ function Install-Packages { invoke-expression "choco install $package" } } + + choco optimize + + cat "C:\ProgramData\chocolatey\logs\chocolatey.log" } function Create-TravisUser { From d331a548c0ff57470c3975469698752cdc0b476e Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 12 Oct 2018 22:13:48 -0700 Subject: [PATCH 34/46] remove some noise, remove optimize --- ci-onion.yml | 1 + packer-assets/windows-server-ci-onion-packages.txt | 2 +- packer-scripts/Bootstrap-Windows.ps1 | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index e0dd2b1eb..f8f8771ee 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -104,3 +104,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index d8a0ae87a..9e9fc3296 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -8,7 +8,7 @@ rsync ruby wget winscp -visualstudio2017buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.ATLMFC" +visualstudio2017buildtools --package-parameters "--quiet --wait --norestart --locale en-US --allWorkloads --includeRecommended --includeOptional --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.ATLMFC" visualstudio2017-workload-netcorebuildtools visualstudio2017-workload-vctools visualstudio2017-workload-webbuildtools diff --git a/packer-scripts/Bootstrap-Windows.ps1 b/packer-scripts/Bootstrap-Windows.ps1 index e22cceabc..104c5f6f6 100644 --- a/packer-scripts/Bootstrap-Windows.ps1 +++ b/packer-scripts/Bootstrap-Windows.ps1 @@ -25,9 +25,11 @@ function Install-Packages { } } - choco optimize + # we don't have a paid version so we can't call this + # choco optimize - cat "C:\ProgramData\chocolatey\logs\chocolatey.log" + # too much output + # cat "C:\ProgramData\chocolatey\logs\chocolatey.log" } function Create-TravisUser { From a44782eb7dafe362cb84e0d79e344a289b57afba Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sat, 13 Oct 2018 08:57:36 -0700 Subject: [PATCH 35/46] lets try cleaning up some of the image --- ci-onion.yml | 1 - packer-scripts/Bootstrap-Windows.ps1 | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index f8f8771ee..e0dd2b1eb 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -104,4 +104,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-scripts/Bootstrap-Windows.ps1 b/packer-scripts/Bootstrap-Windows.ps1 index 104c5f6f6..4dbdfc77e 100644 --- a/packer-scripts/Bootstrap-Windows.ps1 +++ b/packer-scripts/Bootstrap-Windows.ps1 @@ -3,6 +3,7 @@ Set-StrictMode -Version 1.0 function Main { Install-Chocolatey Install-Packages + Clean-Up #Create-TravisUser Create-StubFiles } @@ -24,12 +25,12 @@ function Install-Packages { invoke-expression "choco install $package" } } - - # we don't have a paid version so we can't call this - # choco optimize - - # too much output - # cat "C:\ProgramData\chocolatey\logs\chocolatey.log" +} + +function Clean-Up { + choco install choco-cleaner + & C:\ProgramData\chocolatey\bin\choco-cleaner.ps1 + choco uninstall choco-cleaner } function Create-TravisUser { From 9d1b63409d2fdcfa4371e542058f3a0dd385e962 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 15 Oct 2018 23:42:14 -0700 Subject: [PATCH 36/46] more packages, bigger disk --- ci-onion.yml | 2 +- packer-assets/windows-server-ci-onion-packages.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index e0dd2b1eb..ec4151008 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -24,7 +24,7 @@ builders: zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n1-standard-4 - disk_size: 50 + disk_size: 70 metadata: windows-startup-script-cmd: "winrm quickconfig -quiet & net user /add travis & net localgroup administrators travis /add & winrm set winrm/config/service/auth @{Basic=\"true\"} & powershell -Command \"& {Set-ExecutionPolicy AllSigned -Force}\"" tags: diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 9e9fc3296..ec4a679ec 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -4,6 +4,8 @@ curl git.install hashdeep jq +llvm +mingw rsync ruby wget @@ -12,6 +14,6 @@ visualstudio2017buildtools --package-parameters "--quiet --wait --norestart --lo visualstudio2017-workload-netcorebuildtools visualstudio2017-workload-vctools visualstudio2017-workload-webbuildtools -windows-sdk-10.0 +windows-sdk-10.1 microsoft-build-tools vcredist2017 \ No newline at end of file From 52c6c3064e0b6bc8b24c83bae0d8acfe92330ef0 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 22 Oct 2018 14:24:25 -0700 Subject: [PATCH 37/46] add wsl, and cmake to path --- ci-onion.yml | 1 + packer-assets/windows-server-ci-onion-packages.txt | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index ec4151008..8a741b678 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -104,3 +104,4 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name + diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index ec4a679ec..89d2b369d 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -1,5 +1,5 @@ 7zip.install -cmake +cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' curl git.install hashdeep @@ -16,4 +16,5 @@ visualstudio2017-workload-vctools visualstudio2017-workload-webbuildtools windows-sdk-10.1 microsoft-build-tools -vcredist2017 \ No newline at end of file +vcredist2017 +wsl From 3422326a79292616ab2388a997d28a64238eb8d5 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 22 Oct 2018 18:52:29 -0700 Subject: [PATCH 38/46] add gnuwin32-make --- ci-onion.yml | 1 - packer-assets/windows-server-ci-onion-packages.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-onion.yml b/ci-onion.yml index 8a741b678..ec4151008 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -104,4 +104,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-ci-onion-packages.txt index 89d2b369d..6be622247 100644 --- a/packer-assets/windows-server-ci-onion-packages.txt +++ b/packer-assets/windows-server-ci-onion-packages.txt @@ -2,6 +2,7 @@ cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' curl git.install +gnuwin32-make.portable hashdeep jq llvm From 3db67f6c3624fe96b84f6162e472df48829629cc Mon Sep 17 00:00:00 2001 From: Joep van Delft Date: Fri, 2 Nov 2018 22:27:29 +0100 Subject: [PATCH 39/46] Correct tfw binary uri --- packer-scripts/tfw-bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer-scripts/tfw-bootstrap b/packer-scripts/tfw-bootstrap index 52e14efde..8c9eac06e 100644 --- a/packer-scripts/tfw-bootstrap +++ b/packer-scripts/tfw-bootstrap @@ -9,7 +9,7 @@ main() { apt-get install -yqq curl curl -sSL \ -o "${TMPDIR}/tfw" \ - 'https://raw.githubusercontent.com/travis-ci/tfw/master/tfw' + 'https://raw.githubusercontent.com/travis-ci/tfw/master/bin/tfw' chmod +x "${TMPDIR}/tfw" mv -v "${TMPDIR}/tfw" "${USRLOCALDIR}/bin/tfw" From 1da25d6e3780d7d0e935664a2d862b28ccbb8dcb Mon Sep 17 00:00:00 2001 From: Joep van Delft Date: Mon, 11 Mar 2019 11:25:11 +0100 Subject: [PATCH 40/46] Bump php aliases --- cookbooks/travis_ci_sardonyx/attributes/default.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/travis_ci_sardonyx/attributes/default.rb b/cookbooks/travis_ci_sardonyx/attributes/default.rb index 3c070cd84..778d2a57d 100644 --- a/cookbooks/travis_ci_sardonyx/attributes/default.rb +++ b/cookbooks/travis_ci_sardonyx/attributes/default.rb @@ -14,9 +14,9 @@ '/var/tmp/sardonyx-system-info-commands.yml' php_aliases = { - '5.6' => '5.6.36', - '7.1' => '7.1.19', - '7.2' => '7.2.7' + '5.6' => '5.6.40', + '7.1' => '7.1.27', + '7.2' => '7.2.15' } override['travis_build_environment']['php_versions'] = php_aliases.values override['travis_build_environment']['php_default_version'] = php_aliases['7.2'] From 3cc76a4ce0e8072724a6ce1e2486688cd1b11382 Mon Sep 17 00:00:00 2001 From: Joep van Delft Date: Tue, 12 Mar 2019 14:41:58 +0100 Subject: [PATCH 41/46] Include perl6 --- cookbooks/travis_ci_opal/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_opal/attributes/default.rb b/cookbooks/travis_ci_opal/attributes/default.rb index 4043a61de..0b297ca3e 100644 --- a/cookbooks/travis_ci_opal/attributes/default.rb +++ b/cookbooks/travis_ci_opal/attributes/default.rb @@ -146,6 +146,7 @@ haxe julia perl + perl6 r rust ] From 3230cd74cd7ca7a949b4a386c96c76d4886a765a Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 29 May 2019 18:31:11 +0100 Subject: [PATCH 42/46] use gce image family and remove bits which are no longer used --- ci-onion.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/ci-onion.yml b/ci-onion.yml index ec4151008..b3b4c8fea 100644 --- a/ci-onion.yml +++ b/ci-onion.yml @@ -1,9 +1,9 @@ --- -description: Travis CI onion build env template +description: Travis CI Windows 1803 Core (for containers) build env template variables: gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}" gce_project_id: "{{ env `GCE_PROJECT_ID` }}" - gce_image_name: "windows-server-1803-dc-core-for-containers-v20180920" + gce_image_family: "windows-1803-core-for-containers" image_name: travis-ci-onion-1803-containers-{{ timestamp }}-<%= git_desc %> dist_name: 1803-containers travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" @@ -20,7 +20,7 @@ builders: image_description: Travis CI Onion account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: "{{ user `gce_image_name` }}" + source_image: "{{ user `gce_image_family` }}" zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n1-standard-4 @@ -36,9 +36,6 @@ provisioners: - type: file source: tmp/git-meta destination: c:/windows/temp/ -# - type: file -# source: packer-assets/windows-server-2016-normal-purge.txt -# destination: c:/windows/temp/purge.txt - type: file source: packer-assets/windows-server-ci-onion-packages.txt destination: c:/windows/temp/packages.txt @@ -62,18 +59,6 @@ provisioners: - TRAVIS_COOKBOOKS_BRANCH={{ user `travis_cookbooks_branch` }} - TRAVIS_COOKBOOKS_SHA={{ user `travis_cookbooks_sha` }} execute_command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; & c:/windows/temp/Run-BashScript.ps1 -bashscript '{{.Path}}'; exit $LastExitCode }" -# TODO: use chef to do things (???) -# - type: chef-solo -# guest_os_type: windows -# config_template: chef-solo.rb.tmpl -# cookbook_paths: -# - cookbooks -# remote_cookbook_paths: -# - c:/windows/temp/chef-stuff/travis-cookbooks/cookbooks -# - c:/windows/temp/chef-stuff/travis-cookbooks/community-cookbooks -# json: {} -# run_list: -# - recipe[travis_ci_onion] - type: powershell scripts: # TODO: write job board data via chef From 7d6237c1cc431c13035b3d4ae895761c4bcd7097 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 30 May 2019 15:44:15 +0100 Subject: [PATCH 43/46] pin to an earlier version of chefdk the newer versions dont have serverspec installed --- packer-scripts/run-serverspecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer-scripts/run-serverspecs b/packer-scripts/run-serverspecs index 357bd8c34..0840c185e 100755 --- a/packer-scripts/run-serverspecs +++ b/packer-scripts/run-serverspecs @@ -61,7 +61,7 @@ __install_chefdk() { >/etc/apt/sources.list.d/chef-stable.list __run_retry 2 30 apt-get update -y - __run_retry 2 30 apt-get install -y chefdk + __run_retry 2 30 apt-get install -y chefdk=3.10.1-1 } __run_retry() { From beecf2a6352fb79dc90c3aab081f78594d8b6808 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 30 May 2019 16:13:07 +0100 Subject: [PATCH 44/46] rename onion to windows-1803 --- ci-onion.yml => ci-windows-1803.yml | 9 +++++---- cookbooks/travis_ci_onion/README.md | 4 ---- .../{travis_ci_onion => travis_ci_windows_1803}/.rspec | 0 cookbooks/travis_ci_windows_1803/README.md | 4 ++++ .../attributes/default.rb | 2 +- .../metadata.rb | 6 +++--- .../recipes/default.rb | 2 +- ...ion-packages.txt => windows-server-1803-packages.txt} | 0 ...er-normal-purge.txt => windows-server-1803-purge.txt} | 0 9 files changed, 14 insertions(+), 13 deletions(-) rename ci-onion.yml => ci-windows-1803.yml (93%) delete mode 100644 cookbooks/travis_ci_onion/README.md rename cookbooks/{travis_ci_onion => travis_ci_windows_1803}/.rspec (100%) create mode 100644 cookbooks/travis_ci_windows_1803/README.md rename cookbooks/{travis_ci_onion => travis_ci_windows_1803}/attributes/default.rb (99%) rename cookbooks/{travis_ci_onion => travis_ci_windows_1803}/metadata.rb (77%) rename cookbooks/{travis_ci_onion => travis_ci_windows_1803}/recipes/default.rb (97%) rename packer-assets/{windows-server-ci-onion-packages.txt => windows-server-1803-packages.txt} (100%) rename packer-assets/{windows-server-normal-purge.txt => windows-server-1803-purge.txt} (100%) diff --git a/ci-onion.yml b/ci-windows-1803.yml similarity index 93% rename from ci-onion.yml rename to ci-windows-1803.yml index b3b4c8fea..112c96e9a 100644 --- a/ci-onion.yml +++ b/ci-windows-1803.yml @@ -4,7 +4,7 @@ variables: gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}" gce_project_id: "{{ env `GCE_PROJECT_ID` }}" gce_image_family: "windows-1803-core-for-containers" - image_name: travis-ci-onion-1803-containers-{{ timestamp }}-<%= git_desc %> + image_name: travis-ci-windows-1803-containers-{{ timestamp }}-<%= git_desc %> dist_name: 1803-containers travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" travis_cookbooks_edge_branch: master @@ -17,7 +17,7 @@ builders: winrm_username: travis winrm_use_ssl: true winrm_insecure: true - image_description: Travis CI Onion + image_description: Travis CI Windows 1803 Core (for containers) account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" source_image: "{{ user `gce_image_family` }}" @@ -29,7 +29,8 @@ builders: windows-startup-script-cmd: "winrm quickconfig -quiet & net user /add travis & net localgroup administrators travis /add & winrm set winrm/config/service/auth @{Basic=\"true\"} & powershell -Command \"& {Set-ExecutionPolicy AllSigned -Force}\"" tags: - ci - - onion + - windows + - windows-1803 - travis-ci-packer-templates state_timeout: 10m provisioners: @@ -37,7 +38,7 @@ provisioners: source: tmp/git-meta destination: c:/windows/temp/ - type: file - source: packer-assets/windows-server-ci-onion-packages.txt + source: packer-assets/windows-server-1803-packages.txt destination: c:/windows/temp/packages.txt - type: file source: packer-scripts/Run-BashScript.ps1 diff --git a/cookbooks/travis_ci_onion/README.md b/cookbooks/travis_ci_onion/README.md deleted file mode 100644 index ba76ada53..000000000 --- a/cookbooks/travis_ci_onion/README.md +++ /dev/null @@ -1,4 +0,0 @@ -travis_ci_onion Cookbook -======================== - -A wrapper cookbook for the onion CI image. diff --git a/cookbooks/travis_ci_onion/.rspec b/cookbooks/travis_ci_windows_1803/.rspec similarity index 100% rename from cookbooks/travis_ci_onion/.rspec rename to cookbooks/travis_ci_windows_1803/.rspec diff --git a/cookbooks/travis_ci_windows_1803/README.md b/cookbooks/travis_ci_windows_1803/README.md new file mode 100644 index 000000000..e7ea09b10 --- /dev/null +++ b/cookbooks/travis_ci_windows_1803/README.md @@ -0,0 +1,4 @@ +travis_ci_windows_1803 Cookbook +======================== + +A wrapper cookbook for the Windows 1803 CI image. diff --git a/cookbooks/travis_ci_onion/attributes/default.rb b/cookbooks/travis_ci_windows_1803/attributes/default.rb similarity index 99% rename from cookbooks/travis_ci_onion/attributes/default.rb rename to cookbooks/travis_ci_windows_1803/attributes/default.rb index 502fa2c0e..e361aa8bc 100644 --- a/cookbooks/travis_ci_onion/attributes/default.rb +++ b/cookbooks/travis_ci_windows_1803/attributes/default.rb @@ -62,7 +62,7 @@ ruby_interpreter ] override['travis_packer_templates']['job_board']['languages'] = %w[ - __onion__ + __windows_1803__ bash minimal sh diff --git a/cookbooks/travis_ci_onion/metadata.rb b/cookbooks/travis_ci_windows_1803/metadata.rb similarity index 77% rename from cookbooks/travis_ci_onion/metadata.rb rename to cookbooks/travis_ci_windows_1803/metadata.rb index 89731a989..2ae03ab16 100644 --- a/cookbooks/travis_ci_onion/metadata.rb +++ b/cookbooks/travis_ci_windows_1803/metadata.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -name 'travis_ci_onion' +name 'travis_ci_windows_1803' maintainer 'Travis CI GmbH' -maintainer_email 'contact+travis-ci-onion-cookbook@travis-ci.org' +maintainer_email 'contact+travis-ci-windows-cookbook@travis-ci.org' license 'MIT' -description 'Installs/Configures travis_ci_onion' +description 'Installs/Configures travis_ci_windows_1803' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.1.0' source_url 'https://github.com/travis-ci/packer-templates' diff --git a/cookbooks/travis_ci_onion/recipes/default.rb b/cookbooks/travis_ci_windows_1803/recipes/default.rb similarity index 97% rename from cookbooks/travis_ci_onion/recipes/default.rb rename to cookbooks/travis_ci_windows_1803/recipes/default.rb index 6cee12093..69f548352 100644 --- a/cookbooks/travis_ci_onion/recipes/default.rb +++ b/cookbooks/travis_ci_windows_1803/recipes/default.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Cookbook Name:: travis_ci_onion +# Cookbook Name:: travis_ci_2019 # Recipe:: default # # Copyright 2017, Travis CI GmbH diff --git a/packer-assets/windows-server-ci-onion-packages.txt b/packer-assets/windows-server-1803-packages.txt similarity index 100% rename from packer-assets/windows-server-ci-onion-packages.txt rename to packer-assets/windows-server-1803-packages.txt diff --git a/packer-assets/windows-server-normal-purge.txt b/packer-assets/windows-server-1803-purge.txt similarity index 100% rename from packer-assets/windows-server-normal-purge.txt rename to packer-assets/windows-server-1803-purge.txt From a83fcb1d346bfb96c45850642030197db3c88e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Szyma=C5=84ski?= Date: Thu, 8 Aug 2019 12:12:11 +0200 Subject: [PATCH 45/46] Update GCE image --- tfw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfw.yml b/tfw.yml index a35649b1b..498d0eeed 100644 --- a/tfw.yml +++ b/tfw.yml @@ -30,7 +30,7 @@ builders: image_description: Travis Tiny Floating Whale account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-1604-xenial-v20181023 + source_image: ubuntu-1604-xenial-v20190807 zone: us-central1-a image_name: "{{ user `gce_image_name` }}" machine_type: n1-standard-4 From d8ac0e1ce76d64d33ae10894d30cb36e80369e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Szyma=C5=84ski?= Date: Thu, 8 Aug 2019 13:36:10 +0200 Subject: [PATCH 46/46] Update tfw.yml --- tfw.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tfw.yml b/tfw.yml index 498d0eeed..4bf6c1e65 100644 --- a/tfw.yml +++ b/tfw.yml @@ -72,7 +72,6 @@ provisioners: scripts: - packer-scripts/packer-env-dump - packer-scripts/tfw-bootstrap - - packer-scripts/ensure-travis-user - packer-scripts/purge - packer-scripts/install-ubuntu-mainline-kernel - packer-scripts/cleanup