File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
template/v2/dirs/etc/sagemaker-ui Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ dataZoneDomainId=$(jq -r '.AdditionalMetadata.DataZoneDomainId' < $sourceMetaDat
8
8
dataZoneUserId=$( jq -r ' .AdditionalMetadata.DataZoneUserId' < $sourceMetaData )
9
9
dataZoneEndPoint=$( jq -r ' .AdditionalMetadata.DataZoneEndpoint' < $sourceMetaData )
10
10
dataZoneProjectId=$( jq -r ' .AdditionalMetadata.DataZoneProjectId' < $sourceMetaData )
11
- dataZoneDomainRegion=$( jq -r ' .AdditionalMetadata.DataZoneDomainRegion' < $sourceMetaData )
12
11
13
12
DEFAULT_DESTINATION_PATH=$HOME /src
14
13
DESTINATION_PATH=${1:- $DEFAULT_DESTINATION_PATH }
@@ -48,10 +47,8 @@ if [[ -n "$cloneUrl" ]]; then
48
47
if [[ " $cloneUrl " == * " codeconnections" * ]] || [[ " $cloneUrl " == * " codestar-connections" * ]]; then
49
48
# Check if the DomainExecutionRoleCreds profile exists in the AWS config file
50
49
if grep -q ' DomainExecutionRoleCreds' /home/sagemaker-user/.aws/config; then
51
- # Configure Git to use the AWS CodeCommit credential helper with profile DomainExecutionRoleCreds
52
- git config --global credential.helper " !aws --profile DomainExecutionRoleCreds --region $dataZoneDomainRegion codecommit credential-helper --ignore-host-check $@ "
53
- git config --global credential.UseHttpPath true
54
- # Clone the repository using the cloneUrl and gitBranchName
50
+ /bin/bash /etc/sagemaker-ui/git_config.sh
51
+ # Clone the repository using the cloneUrl and gitBranchName
55
52
git clone " $cloneUrl " $DESTINATION_PATH -b " $gitBranchName "
56
53
fi
57
54
else
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eux
3
+
4
+ sourceMetaData=/opt/ml/metadata/resource-metadata.json
5
+ dataZoneDomainRegion=$( jq -r ' .AdditionalMetadata.DataZoneDomainRegion' < $sourceMetaData )
6
+
7
+ # Configure Git to use the AWS CodeCommit credential helper with profile DomainExecutionRoleCreds
8
+ git config --global credential.helper " !aws --profile DomainExecutionRoleCreds --region $dataZoneDomainRegion codecommit credential-helper --ignore-host-check $@ "
9
+ git config --global credential.UseHttpPath true
You can’t perform that action at this time.
0 commit comments