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

[Ubuntu 20] Add docker-moby, sbt, github-cli, prepare toolcache directory #1002

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
6 changes: 6 additions & 0 deletions images/linux/scripts/installers/configure-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ echo ImageOS=$IMAGE_OS | tee -a /etc/environment
# This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491)
mkdir -p /etc/skel/.config/configstore
echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc

# Prepare directory and env variable for toolcache
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
mkdir $AGENT_TOOLSDIRECTORY
echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment
chmod -R 777 $AGENT_TOOLSDIRECTORY
6 changes: 6 additions & 0 deletions images/linux/scripts/installers/docker-moby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@

source $HELPER_SCRIPTS/apt.sh
source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/os.sh

docker_package=moby

# There is no stable docker-moby for Ubuntu 20 at the moment
if isUbuntu20 ; then
add-apt-repository "deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod testing main"
fi

## Check to see if docker is already installed
echo "Determing if Docker ($docker_package) is installed"
if ! IsInstalled $docker_package; then
Expand Down
5 changes: 0 additions & 5 deletions images/linux/scripts/installers/hosted-tool-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ set -e

TOOLCACHE_REGISTRY="npm.pkg.github.com"

AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
mkdir $AGENT_TOOLSDIRECTORY
echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment
chmod -R 777 $AGENT_TOOLSDIRECTORY

echo "Configure npm to use github package registry for '@actions' scope"
npm config set @actions:registry "https://${TOOLCACHE_REGISTRY}"

Expand Down
28 changes: 16 additions & 12 deletions images/linux/ubuntu2004.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,14 @@
"{{template_dir}}/scripts/installers/cmake.sh",
"{{template_dir}}/scripts/installers/2004/containers.sh",
"{{template_dir}}/scripts/installers/docker-compose.sh",
"{{template_dir}}/scripts/installers/docker-moby.sh",
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
"{{template_dir}}/scripts/installers/erlang.sh",
"{{template_dir}}/scripts/installers/firefox.sh",
"{{template_dir}}/scripts/installers/gcc.sh",
"{{template_dir}}/scripts/installers/gfortran.sh",
"{{template_dir}}/scripts/installers/git.sh",
"{{template_dir}}/scripts/installers/github-cli.sh",
"{{template_dir}}/scripts/installers/google-chrome.sh",
"{{template_dir}}/scripts/installers/google-cloud-sdk.sh",
"{{template_dir}}/scripts/installers/haskell.sh",
Expand All @@ -224,6 +226,7 @@
"{{template_dir}}/scripts/installers/ruby.sh",
"{{template_dir}}/scripts/installers/rust.sh",
"{{template_dir}}/scripts/installers/julia.sh",
"{{template_dir}}/scripts/installers/sbt.sh",
"{{template_dir}}/scripts/installers/selenium.sh",
"{{template_dir}}/scripts/installers/sphinx.sh",
"{{template_dir}}/scripts/installers/subversion.sh",
Expand Down Expand Up @@ -255,31 +258,32 @@
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/go.sh"
"scripts":[
"{{template_dir}}/scripts/installers/2004/android.sh",
"{{template_dir}}/scripts/installers/azpowershell.sh",
"{{template_dir}}/scripts/helpers/containercache.sh",
"{{template_dir}}/scripts/installers/python.sh"
],
"environment_vars": [
"METADATA_FILE={{user `metadata_file`}}",
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
"GO_VERSIONS={{user `go_versions`}}",
"GO_DEFAULT={{user `go_default`}}"
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"GITHUB_FEED_TOKEN={{user `github_feed_token`}}"
],
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}"
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/2004/android.sh",
"{{template_dir}}/scripts/installers/azpowershell.sh",
"{{template_dir}}/scripts/installers/python.sh"
"scripts": [
"{{template_dir}}/scripts/installers/go.sh"
],
"environment_vars": [
"METADATA_FILE={{user `metadata_file`}}",
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"GITHUB_FEED_TOKEN={{user `github_feed_token`}}"
"GO_VERSIONS={{user `go_versions`}}",
"GO_DEFAULT={{user `go_default`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}"
},
{
"type": "shell",
Expand Down