File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ git remote add origin
[email protected] :<slug>/example-get-started.git
49
49
# close open PRs
50
50
gh pr close try-large-dataset
51
51
gh pr close tune-hyperparams
52
+ # remove existing tags, branches, experiments
53
+ git ls-remote origin | awk ' {print $2}' | xargs -n 1 git push --delete origin || true
52
54
# force push branches
53
55
git push --force origin main
54
56
git push --force origin try-large-dataset
Original file line number Diff line number Diff line change 1
- report :
1
+ report :
2
+ rules :
3
+ - if : $CI_PIPELINE_SOURCE == 'merge_request_event'
4
+ - if : $CI_COMMIT_BRANCH == 'main'
2
5
image : dvcorg/cml:0-dvc3-base1
3
6
before_script :
4
- - cml ci
7
+ - cml ci && cml --version
5
8
- npm install -g json5
6
9
script : |
7
- if [ $CI_COMMIT_BRANCH = main ]; then
10
+ if [ $CI_COMMIT_REF_NAME = main ]; then
8
11
PREVIOUS_REF=HEAD~1
12
+ COMMIT_HASH1=$CI_COMMIT_BEFORE_SHA
13
+ COMMIT_HASH2=$CI_COMMIT_SHA
9
14
else
10
15
PREVIOUS_REF=main
11
16
git fetch --depth=1 origin main:main
17
+ COMMIT_HASH1=$CI_MERGE_REQUEST_DIFF_BASE_SHA
18
+ COMMIT_HASH2=$CI_COMMIT_SHA
12
19
fi
13
20
14
21
dvc pull eval
@@ -33,6 +40,7 @@ report:
33
40
34
41
cat <<EOF > report.md
35
42
# CML Report
43
+ [](https://studio.iterative.ai/team/Iterative/views/example-get-started-2gpv7kdqx2?panels=plots%2C%3Bcompare%2C&commits=${COMMIT_HASH2}%3B${COMMIT_HASH1}&activeCommits=${COMMIT_HASH1}%3Aprimary%3B${COMMIT_HASH2}%3Apurple)
36
44
## Plots
37
45

38
46

@@ -47,4 +55,8 @@ report:
47
55
${dvc_report}
48
56
EOF
49
57
50
- cml comment create --publish --pr=false report.md
58
+ if [ $CI_COMMIT_REF_NAME = main ]; then
59
+ cml comment create --target=commit report.md
60
+ else
61
+ cml comment update --target=pr report.md
62
+ fi
You can’t perform that action at this time.
0 commit comments