Skip to content

Commit

Permalink
(maint) Clear Azure source directory on builds
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
Iristyle committed Aug 14, 2019
1 parent 1a503b5 commit 3696f2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pool:
variables:
COMPOSE_PROJECT_NAME: pupperware

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
Expand Down

0 comments on commit 3696f2d

Please sign in to comment.