Skip to content

Commit

Permalink
[CI] Do not double checkout macios-adr to keep the credentials. (#21807)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mandel-macaque authored Dec 17, 2024
1 parent 84cb6e7 commit 5e89d63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions mk/xamarin-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ if test -d "$DEPENDENCY_PATH"; then
fi

else
echo "*** [$DEPENDENCY_NAME] git $DEPENDENCY_AUTH clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
echo "*** [$DEPENDENCY_NAME] git" "${DEPENDENCY_AUTH[@]}" "clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
mkdir -p "$(dirname "$DEPENDENCY_PATH")"
cd "$(dirname "$DEPENDENCY_PATH")"
git $DEPENDANCY_AUTH clone "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
git "$DEPENDENCY_AUTH" "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
cd "$DEPENDENCY_DIRECTORY"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ parameters:
# build the source code (build.yml) and detect changes (the nested api-diff.yml)
steps:

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

- template: build.yml
parameters:
isPR: ${{ parameters.isPR }}
Expand Down

10 comments on commit 5e89d63

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.