Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging master into lxd-18.04 branch #711

Open
wants to merge 59 commits into
base: lxd-18.04
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f240d47
Add nvs
BanzaiMan Oct 5, 2018
0421c48
Make it easier to initiate debug builds
BanzaiMan Oct 5, 2018
dc0616c
Drop purge file provisioner
BanzaiMan Oct 5, 2018
53cb427
this fixes issues with execute_command stalling
joshk Oct 5, 2018
e4486ab
simplify the onion chocolately packages
joshk Oct 5, 2018
3470066
add some more language tags to onion
joshk Oct 5, 2018
c3cff92
add winscp to chocolately onion
joshk Oct 5, 2018
6ba9848
use nvm instead of nvs
joshk Oct 5, 2018
4a59908
don't install nvm
joshk Oct 6, 2018
491ddc6
support node js on windows
joshk Oct 8, 2018
3b8c85e
an extra newline to kick off a build
joshk Oct 8, 2018
3b04fd1
update the onion tags string
joshk Oct 8, 2018
00aaad8
Install hashdeep for Windows
BanzaiMan Oct 8, 2018
12d0efe
some tweaks to the windows image building
joshk Oct 9, 2018
3b459b7
correct the env var
joshk Oct 9, 2018
340196d
onion packages and job board data
joshk Oct 10, 2018
5324329
fix the tags for onion
joshk Oct 10, 2018
e646b25
let packer create the travis user
joshk Oct 10, 2018
ef12314
more onion packages
joshk Oct 10, 2018
0d4a685
make sure link.exe is installed
joshk Oct 10, 2018
1d6f0a5
more onion tweaks
joshk Oct 10, 2018
de49863
update the languages for onion
joshk Oct 10, 2018
f386041
a newline for a new build
joshk Oct 11, 2018
28c6d4b
some onion package tweaks
joshk Oct 11, 2018
0d85ed5
Revert "some onion package tweaks"
joshk Oct 11, 2018
a133fa5
getting the build tools to work is hard
joshk Oct 11, 2018
c25d830
change the build tools package
joshk Oct 11, 2018
585957a
disable windows defender
joshk Oct 11, 2018
7f6c426
add rsync to onion
joshk Oct 11, 2018
6c03d72
lets see if this fixes linker issues
joshk Oct 11, 2018
e46e92f
bump the image timeout to 10m
joshk Oct 12, 2018
97ba999
tweak the ms build tools
joshk Oct 13, 2018
58af04f
optimize and print the log
joshk Oct 13, 2018
d331a54
remove some noise, remove optimize
joshk Oct 13, 2018
a44782e
lets try cleaning up some of the image
joshk Oct 13, 2018
9d1b634
more packages, bigger disk
joshk Oct 16, 2018
52c6c30
add wsl, and cmake to path
joshk Oct 22, 2018
3422326
add gnuwin32-make
joshk Oct 23, 2018
3db67f6
Correct tfw binary uri
Nov 2, 2018
ab32580
Merge branch 'master' into jvd-tfw
joepvd Nov 2, 2018
342804f
Merge branch 'master' into ha-local-builds
meatballhat Nov 14, 2018
81f8fd2
Merge branch 'master' into jvd-tfw
meatballhat Nov 15, 2018
1da25d6
Bump php aliases
Mar 11, 2019
3cc76a4
Include perl6
Mar 12, 2019
28da0cf
Merge pull request #686 from travis-ci/jvd-perl6
joepvd Mar 12, 2019
b1197fb
Merge branch 'master' into jvd-bump-php
joepvd Mar 12, 2019
f909ac5
Merge pull request #685 from travis-ci/jvd-bump-php
joepvd Mar 14, 2019
7667bd8
Merge branch 'master' into ha-local-builds
May 29, 2019
3230cd7
use gce image family
joshk May 29, 2019
7d6237c
pin to an earlier version of chefdk
joshk May 30, 2019
beecf2a
rename onion to windows-1803
joshk May 30, 2019
58cd76f
Merge pull request #648 from travis-ci/ha-local-builds
May 30, 2019
a83fcb1
Update GCE image
DamianSzymanski Aug 8, 2019
e90d5e8
Merge pull request #705 from travis-ci/DamianSzymanski-patch-1
DamianSzymanski Aug 8, 2019
2d530c6
Merge branch 'master' into jvd-tfw
DamianSzymanski Aug 8, 2019
5666018
Merge pull request #653 from travis-ci/jvd-tfw
DamianSzymanski Aug 8, 2019
d8ac0e1
Update tfw.yml
DamianSzymanski Aug 8, 2019
1bac6a7
Merge pull request #706 from travis-ci/DamianSzymanski-patch-2
DamianSzymanski Aug 8, 2019
dea687b
Merge branch 'master' into lxd-18.04
ghatwala Aug 27, 2019
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
46 changes: 20 additions & 26 deletions ci-onion.yml → ci-windows-1803.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
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` }}"
image_name: travis-ci-onion-2016-{{ timestamp }}-<%= git_desc %>
gce_image_family: "windows-1803-core-for-containers"
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
travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}"
Expand All @@ -12,32 +14,31 @@ 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
image_description: Travis CI Windows 1803 Core (for containers)
account_file: "{{ user `gce_account_file` }}"
project_id: "{{ user `gce_project_id` }}"
source_image: windows-server-2016-dc-v20180911
source_image: "{{ user `gce_image_family` }}"
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 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
- windows
- windows-1803
- travis-ci-packer-templates
state_timeout: 10m
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-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
Expand All @@ -58,19 +59,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 }}'"
# 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]
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: powershell
scripts:
# TODO: write job board data via chef
Expand All @@ -79,10 +68,15 @@ 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
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
Expand Down
4 changes: 0 additions & 4 deletions cookbooks/travis_ci_onion/README.md

This file was deleted.

1 change: 1 addition & 0 deletions cookbooks/travis_ci_opal/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
haxe
julia
perl
perl6
r
rust
]
6 changes: 3 additions & 3 deletions cookbooks/travis_ci_sardonyx/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 4 additions & 0 deletions cookbooks/travis_ci_windows_1803/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
travis_ci_windows_1803 Cookbook
========================

A wrapper cookbook for the Windows 1803 CI image.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
ruby_interpreter
]
override['travis_packer_templates']['job_board']['languages'] = %w[
__onion__
__windows_1803__
bash
minimal
sh
Expand Down
Original file line number Diff line number Diff line change
@@ -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[email protected]'
maintainer_email 'contact+travis-ci-windows[email protected]'
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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 21 additions & 0 deletions packer-assets/windows-server-1803-packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
7zip.install
cmake.install --installargs 'ADD_CMAKE_TO_PATH=System'
curl
git.install
gnuwin32-make.portable
hashdeep
jq
llvm
mingw
rsync
ruby
wget
winscp
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
windows-sdk-10.1
microsoft-build-tools
vcredist2017
wsl
23 changes: 0 additions & 23 deletions packer-assets/windows-server-2016-ci-onion-packages.txt

This file was deleted.

15 changes: 12 additions & 3 deletions packer-scripts/Bootstrap-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ Set-StrictMode -Version 1.0
function Main {
Install-Chocolatey
Install-Packages
Create-TravisUser
Clean-Up
#Create-TravisUser
Create-StubFiles
}

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
}

Expand All @@ -19,11 +22,17 @@ function Install-Packages {
| Select-String -NotMatch "^(#.*|)$") {
$package = $package.Line.Trim()
if ($package -ne "") {
choco install $package
invoke-expression "choco install $package"
}
}
}

function Clean-Up {
choco install choco-cleaner
& C:\ProgramData\chocolatey\bin\choco-cleaner.ps1
choco uninstall choco-cleaner
}

function Create-TravisUser {
$randChars = (35..122) | Get-Random -Count 32
$pwPlain = -join ($randChars | % {[char]$_})
Expand Down
39 changes: 37 additions & 2 deletions packer-scripts/create-windows-job-board-data
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,47 @@ languages:
features:
- dotnet
tags:
dist: server-2016
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:server-2016,os:windows,packer_chef_time:${nowtime},language_powershell: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
}

Expand Down
2 changes: 1 addition & 1 deletion packer-scripts/run-serverspecs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion packer-scripts/tfw-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 1 addition & 2 deletions tfw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down