Skip to content

Commit

Permalink
Merge pull request #3 from actions/master
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
dibir-magomedsaygitov authored May 11, 2020
2 parents 89e3748 + ceef6d4 commit 2196587
Show file tree
Hide file tree
Showing 35 changed files with 468 additions and 543 deletions.
6 changes: 4 additions & 2 deletions images/linux/scripts/installers/1604/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ apt-fast install -y --no-install-recommends \
zip \
zstd

# Electron / VSCode / GitHub Desktop prereqs
# Electron / VSCode / GitHub Desktop / kubectl prereqs
apt-fast install -y --no-install-recommends \
libxkbfile-dev \
pkg-config \
Expand All @@ -57,7 +57,8 @@ apt-fast install -y --no-install-recommends \
rpm \
xz-utils \
xorriso \
zsync
zsync \
gnupg2

# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
Expand Down Expand Up @@ -99,3 +100,4 @@ DocumentInstalledItemIndent "upx"
DocumentInstalledItemIndent "wget"
DocumentInstalledItemIndent "zip"
DocumentInstalledItemIndent "zstd"
DocumentInstalledItemIndent "gnupg2"
40 changes: 0 additions & 40 deletions images/linux/scripts/installers/1604/kubernetes-tools.sh

This file was deleted.

4 changes: 4 additions & 0 deletions images/linux/scripts/installers/1804/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ apt-get install -y --no-install-recommends curl
echo "Install parallel"
apt-get install -y --no-install-recommends parallel

echo "Install gnupg2"
apt-get install -y --no-install-recommends gnupg2

# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet time unzip wget zip; do
Expand Down Expand Up @@ -168,3 +171,4 @@ DocumentInstalledItemIndent "upx"
DocumentInstalledItemIndent "wget"
DocumentInstalledItemIndent "zip"
DocumentInstalledItemIndent "zstd"
DocumentInstalledItemIndent "gnupg2"
3 changes: 2 additions & 1 deletion images/linux/scripts/installers/Install-Toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ foreach ($tool in $tools) {
}
}

chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/node
5 changes: 4 additions & 1 deletion images/linux/scripts/installers/Validate-Toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ function Run-ExecutableTests {
$ErrorActionPreference = "Stop"

# Define executables for cached tools
$toolsExecutables = @{ Python = @("python", "bin/pip") }
$toolsExecutables = @{
Python = @("python", "bin/pip");
node = @("bin/node", "bin/npm")
}

# Get toolset content
$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw
Expand Down
8 changes: 7 additions & 1 deletion images/linux/scripts/installers/dpkg-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ Dpkg::Options {
"--force-confdef";
"--force-confold";
}
EOF
EOF

# hide information about packages that are no longer required
cat <<EOF >> /etc/apt/apt.conf.d/10apt-autoremove
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
EOF
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/apt.sh

## Install kubectl
apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
touch /etc/apt/sources.list.d/kubernetes.list

# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is still called xenial
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is xenial for both OS versions.
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install -y kubectl

Expand All @@ -33,10 +32,7 @@ if ! command -v helm; then
exit 1
fi

echo "Initializing helm"
helm init --client-only

# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))"
DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))"
DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
12 changes: 12 additions & 0 deletions images/linux/toolset-1604.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"3.7.*",
"3.8.*"
]
},
{
"name": "node",
"url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
"platform" : "linux",
"arch": "x64",
"versions": [
"8.*",
"10.*",
"12.*",
"14.*"
]
}
]
}
12 changes: 12 additions & 0 deletions images/linux/toolset-1804.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"3.7.*",
"3.8.*"
]
},
{
"name": "node",
"url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
"platform" : "linux",
"arch": "x64",
"versions": [
"8.*",
"10.*",
"12.*",
"14.*"
]
}
]
}
14 changes: 7 additions & 7 deletions images/linux/ubuntu1604.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kind.sh",
"{{template_dir}}/scripts/installers/1604/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/leiningen.sh",
"{{template_dir}}/scripts/installers/1604/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
Expand Down Expand Up @@ -324,12 +324,6 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{
"type": "file",
"source": "{{user `metadata_file`}}",
Expand All @@ -345,6 +339,12 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu1604.conf",
Expand Down
14 changes: 7 additions & 7 deletions images/linux/ubuntu1804.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kind.sh",
"{{template_dir}}/scripts/installers/1804/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/leiningen.sh",
"{{template_dir}}/scripts/installers/1804/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
Expand Down Expand Up @@ -328,12 +328,6 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{
"type": "file",
"source": "{{user `metadata_file`}}",
Expand All @@ -349,6 +343,12 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu1804.conf",
Expand Down
Loading

0 comments on commit 2196587

Please sign in to comment.