diff --git a/containers/agent-windows-buildkite/Dockerfile b/containers/agent-windows-buildkite/Dockerfile index e4c7517..0c6a771 100644 --- a/containers/agent-windows-buildkite/Dockerfile +++ b/containers/agent-windows-buildkite/Dockerfile @@ -7,4 +7,5 @@ FROM gcr.io/llvm-premerge-checks/agent-windows-vs2019:${agent_windows_version} RUN choco install -y handle --checksum 524E61547C8E26608CDA1B11B6E9471616CCCC48530F6E7EC9131EABF839357E COPY start_agent.ps1 C:\scripts\ COPY pre-checkout.bat c:\buildkite-agent\hooks\ -CMD "powershell C:\scripts\start_agent.ps1" \ No newline at end of file +COPY post-checkout.bat c:\buildkite-agent\hooks\ +CMD "powershell C:\scripts\start_agent.ps1" diff --git a/containers/agent-windows-buildkite/post-checkout.bat b/containers/agent-windows-buildkite/post-checkout.bat new file mode 100644 index 0000000..1825249 --- /dev/null +++ b/containers/agent-windows-buildkite/post-checkout.bat @@ -0,0 +1,2 @@ +echo "post-checkout" +powershell c:\llvm-premerge-checks\scripts\windows\post-checkout.ps1 diff --git a/scripts/windows/post-checkout.ps1 b/scripts/windows/post-checkout.ps1 new file mode 100644 index 0000000..9bce638 --- /dev/null +++ b/scripts/windows/post-checkout.ps1 @@ -0,0 +1,17 @@ +# Copyright 2021 Google LLC + +# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# https://llvm.org/LICENSE.txt + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +echo "running git gc" +pwd +git gc