From 0a8bab60939015b32e3f9b7c259aefb8d177d432 Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Mon, 21 Sep 2020 15:37:02 +0100 Subject: [PATCH] Touch a file required to indicate to the toolcache that CodeQL is fully set up. --- images/linux/scripts/installers/codeql-bundle.sh | 3 +++ images/win/scripts/Installers/Install-CodeQLBundle.ps1 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/images/linux/scripts/installers/codeql-bundle.sh b/images/linux/scripts/installers/codeql-bundle.sh index 825ce0708..9de8a5e41 100644 --- a/images/linux/scripts/installers/codeql-bundle.sh +++ b/images/linux/scripts/installers/codeql-bundle.sh @@ -21,5 +21,8 @@ tar -xzf "/tmp/codeql-bundle.tar.gz" -C "$extraction_directory" # Touch a special file that indicates to the CodeQL Action that this bundle was baked-in to the hosted runner images. touch "$extraction_directory/pinned-version" +# Touch a file to indicate to the toolcache that setting up CodeQL is complete. +touch "$extraction_directory.complete" + # Test that the tool has been extracted successfully. "$AGENT_TOOLSDIRECTORY/CodeQL/$codeql_bundle_version/x64/codeql/codeql" version diff --git a/images/win/scripts/Installers/Install-CodeQLBundle.ps1 b/images/win/scripts/Installers/Install-CodeQLBundle.ps1 index d8f21f0df..d9f273775 100644 --- a/images/win/scripts/Installers/Install-CodeQLBundle.ps1 +++ b/images/win/scripts/Installers/Install-CodeQLBundle.ps1 @@ -21,5 +21,8 @@ Extract-7Zip -Path $UnGzipedCodeQLBundlePath -DestinationPath $ExtractionDirecto # Touch a special file that indicates to the CodeQL Action that this bundle was baked-in to the hosted runner images. New-Item -ItemType file (Join-Path $ExtractionDirectory -ChildPath "pinned-version") +# Touch a file to indicate to the toolcache that setting up CodeQL is complete. +New-Item -ItemType file "$ExtractionDirectory.complete" + # Test that the tool has been extracted successfully. Invoke-PesterTests -TestFile "Tools" -TestName "CodeQLBundle"