Skip to content

Commit 5e89d63

Browse files
[CI] Do not double checkout macios-adr to keep the credentials. (#21807)
Doing a second checkout is error prone. One of the reason is that there is no guarantee that any of our other scripts is not going to remove a random temp directory (actually, the API diff make does remove it). If the checkout directory is removed, the post checkout action from VSTS will fail with something of the kind: ``` [error]An error occurred trying to start process '/usr/local/bin/git' with working directory '/Users/builder/azdo/_work/22/a/change-detection/tmp/src/macios-adr'. No such file or directory ``` The reset script was doing the right thing by setting the http extra headers but it had a typo in the variable name.
1 parent 84cb6e7 commit 5e89d63

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

mk/xamarin-reset.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ if test -d "$DEPENDENCY_PATH"; then
3939
fi
4040

4141
else
42-
echo "*** [$DEPENDENCY_NAME] git $DEPENDENCY_AUTH clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
42+
echo "*** [$DEPENDENCY_NAME] git" "${DEPENDENCY_AUTH[@]}" "clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
4343
mkdir -p "$(dirname "$DEPENDENCY_PATH")"
4444
cd "$(dirname "$DEPENDENCY_PATH")"
45-
git $DEPENDANCY_AUTH clone "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
45+
git "$DEPENDENCY_AUTH" "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
4646
cd "$DEPENDENCY_DIRECTORY"
4747
fi
4848

tools/devops/automation/templates/build/api-diff-build-and-detect.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ parameters:
3535
# build the source code (build.yml) and detect changes (the nested api-diff.yml)
3636
steps:
3737

38-
# The following checkout(s) are needed due in order to get the proper set of credentials stored in the git config.
39-
# Without this, then when the `make reset` command is run, any modules that aren't configured already as submodules
40-
# will be cloned again. This is fine for all GitHub repos, but falls over for AzDo repos.
41-
- checkout: macios-adr-tmp
42-
clean: true
43-
persistCredentials: true
44-
fetchTags: false
45-
path: a/change-detection/tmp/src/macios-adr # Path is rooted from $(Pipeline.Workspace) e.g./Users/builder/azdo/_work/18
46-
4738
- template: build.yml
4839
parameters:
4940
isPR: ${{ parameters.isPR }}

0 commit comments

Comments
 (0)