From 38ff5d05fbe15010ce8805f4723f1b665cb7f83d Mon Sep 17 00:00:00 2001 From: Iristyle Date: Tue, 13 Aug 2019 16:50:26 -0700 Subject: [PATCH] (maint) Clear Azure source directory on builds - Occasionally files intended to live in containers get written on Windows with the wrong line endings. Linux containers need LF line endings for executable scripts and config files (for instance), but the default checkout on Windows is CRLF, unless explicitly configured to be different. Unfortunately a subsequent pull of the code will not reset local line endings on Windows, even when .gitattributes is set properly. This typically results in RDPing into an Azure DevOps builder and manually trashing the source code, so that when the code is next checked out, the appropriate LF line endings will be set. Instead of doing that, have the `s` (source) subdirectory purged on each build. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index baab7f8bf4..0a318032d4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,6 +19,9 @@ variables: CONTAINER_NAME2: puppet-agent-alpine LINT_IGNORES: DL3008 DL3018 DL4000 DL4001 DL3028 +workspace: + clean: resources + steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found clean: true # whether to fetch clean each time