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

feat: add yq on all platforms #277

Merged
merged 1 commit into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 provisioning/tools-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ maven_version: "3.8.6"
openssh_authorized_keys_url: "https://raw.githubusercontent.com/jenkins-infra/aws/main/ec2_agents_authorized_keys"
ruby_version: "2.6.10"
vagrant_version: "2.2.19"
yq_version: "4.25.3"
13 changes: 12 additions & 1 deletion provisioning/ubuntu-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ function install_vagrant() {
fi
}


## Install Ruby with asdf
function install_ruby() {
# Ensure that ASDF is installed
Expand All @@ -347,6 +346,16 @@ function install_ruby() {
install_asdf_package ruby "${RUBY_VERSION}"
}

## Install Yq with asdf
function install_yq() {
# Ensure that ASDF is installed
install_asdf

# Install Yq with ASDF and set it as default installation
install_asdf_plugin yq https://github.com/sudermanjr/asdf-yq.git
install_asdf_package yq "${YQ_VERSION}"
}

## Ensure that the VM is cleaned up
function cleanup() {
export HISTSIZE=0
Expand Down Expand Up @@ -377,6 +386,7 @@ function sanity_check() {
&& ruby -v \
&& unzip -v \
&& vagrant -v \
&& yq --version \
&& zip -v \
"
echo "== End of sanity check"
Expand Down Expand Up @@ -405,6 +415,7 @@ function main() {
install_gh
install_vagrant
install_ruby
install_yq
cleanup
}

Expand Down
5 changes: 5 additions & 0 deletions provisioning/windows-provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ Write-Host '- Sanity check for ruby tooling'
& C:\tools\ruby26\bin\ruby -v
& C:\tools\ruby26\bin\bundle -v

Write-Output "= Installing Yq..."
Invoke-Command {& "choco.exe" install yq --yes --no-progress --limit-output --fail-on-error-output --version "${env:YQ_VERSION}";}
Write-Host '- Sanity check for yq CLI'
& yq --version

## Add a set of pre-defined SSH keys to allow faster agent startups
$temp_authorized_keys_file = 'C:\custom_auth_keys'
DownloadFile "$env:OPENSSH_AUTHORIZED_KEYS_URL" "$temp_authorized_keys_file"
Expand Down