Skip to content

Commit 365b4f9

Browse files
Add sm-debugger-rules tests to run on sm-debugger CI (#41)
* changes for new ci * name change
1 parent 9fe192c commit 365b4f9

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

config/buildspec.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ phases:
2727
build:
2828
commands:
2929
- cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
30+
- cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
3031
- cd $CODEBUILD_SRC_DIR && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd ..
31-
#if [ "$CODEBUILD_GIT_BRANCH" = "master" ] && [ "$CODEBUILD_WEBHOOK_EVENT" = "PUSH" ] ; then
32+
- cd $RULES_CODEBUILD_SRC_DIR && chmod +x config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && ./config/tests.sh && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd ..
33+
3234
post_build:
3335
commands:
3436
- . $CODEBUILD_SRC_DIR/config/upload_on_end.sh
3537
- rm -rf $CODEBUILD_SRC_DIR/upload/$CURRENT_COMMIT_PATH
38+
- rm -rf $RULES_CODEBUILD_SRC_DIR/upload/$CURRENT_COMMIT_PATH

config/change_branch.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ export CURRENT_REPO_NAME=$(basename `git rev-parse --show-toplevel`) ;
1212
export CURRENT_COMMIT_PATH="$CURRENT_DATETIME/$CURRENT_COMMIT_HASH"
1313
cd ..
1414

15+
cd $CODEBUILD_SRC_DIR_RULES
16+
export CODEBUILD_GIT_BRANCH_RULES="$(git symbolic-ref HEAD --short 2>/dev/null)"
17+
if [ "$CODEBUILD_SRC_DIR_RULES" = "" ] ; then
18+
CODEBUILD_GIT_BRANCH_RULES="$(git branch -a --contains HEAD | sed -n 2p | awk '{ printf $1 }')";
19+
export CODEBUILD_GIT_BRANCH_RULES=${CODEBUILD_GIT_BRANCH_RULES#remotes/origin/};
20+
fi
21+
22+
cd $CODEBUILD_SRC_DIR_RULES && git checkout $CODEBUILD_GIT_BRANCH_RULES
23+
export RULES_CODEBUILD_SRC_DIR="$CODEBUILD_SRC_DIR_RULES"
24+
export CURRENT_COMMIT_HASH_RULES=$(git log -1 --pretty=%h);
25+
export CURRENT_REPO_NAME_RULES=$(basename `git rev-parse --show-toplevel`) ;
26+
cd ..
27+
1528

1629
export CODEBUILD_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
1730
export CODEBUILD_PROJECT=${CODEBUILD_BUILD_ID%:$CODEBUILD_LOG_PATH}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def build_package(version):
4343
version=version,
4444
author="AWS DeepLearning Team",
4545
description="Automated debugging for machine learning",
46-
url="https://github.com/awslabs/tornasole_core",
46+
url="https://github.com/awslabs/sagemaker-debugger",
4747
packages=packages,
4848
classifiers=[
4949
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)