mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
31
images/ubuntu/scripts/build/install-codeql-bundle.sh
Normal file
31
images/ubuntu/scripts/build/install-codeql-bundle.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-codeql-bundle.sh
|
||||
## Desc: Install CodeQL CLI Bundle to the toolcache.
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Retrieve the CLI version of the latest CodeQL bundle.
|
||||
base_url="$(curl -fsSL https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json)"
|
||||
bundle_version="$(echo "$base_url" | jq -r '.cliVersion')"
|
||||
bundle_tag_name="codeql-bundle-v$bundle_version"
|
||||
|
||||
echo "Downloading CodeQL bundle $bundle_version..."
|
||||
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
||||
# different operating systems within containers.
|
||||
download_with_retries "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz" "/tmp" "codeql-bundle.tar.gz"
|
||||
codeql_archive="/tmp/codeql-bundle.tar.gz"
|
||||
|
||||
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
|
||||
mkdir -p "$codeql_toolcache_path"
|
||||
|
||||
echo "Unpacking the downloaded CodeQL bundle archive..."
|
||||
tar -xzf "$codeql_archive" -C "$codeql_toolcache_path"
|
||||
|
||||
# Touch a file to indicate to the CodeQL Action that this bundle shipped with the toolcache. This is
|
||||
# to support overriding the CodeQL version specified in defaults.json on GitHub Enterprise.
|
||||
touch "$codeql_toolcache_path/pinned-version"
|
||||
|
||||
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
|
||||
touch "$codeql_toolcache_path.complete"
|
||||
Reference in New Issue
Block a user