Skip to content

Commit 7ee599a

Browse files
committed
ci: Fix release
Signed-off-by: oliver könig <okoenig@nvidia.com>
1 parent 47f3c0b commit 7ee599a

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

.gitlab/stages/03.publish.yml

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PUBLISH == "yes" && $PUBLISH_SCOPE == "code-freeze"
55
when: manual
66
- when: never
7-
7+
88
.publish_common_release:
99
stage: publish
1010
rules:
@@ -13,7 +13,7 @@
1313
- if: $PUBLISH == "yes" && $PUBLISH_SCOPE == "release"
1414
when: manual
1515
variables:
16-
PUBLISH_DRYRUN: "yes"
16+
PUBLISH_DRYRUN: 'yes'
1717
- when: never
1818

1919
publish:release_branch:
@@ -22,13 +22,13 @@ publish:release_branch:
2222
needs: [test:build_image]
2323
tags: [mcore-docker-node-small]
2424
variables:
25-
GIT_STRATEGY: "none"
25+
GIT_STRATEGY: 'none'
2626
script:
2727
- git fetch origin $CI_DEFAULT_BRANCH
2828
- git config --global user.email "mcore-bot@nvidia.com"
2929
- git config --global user.name "Mcore Bot"
3030
- git remote set-url origin "https://gitlab-ci-token:${PAT}@${GITLAB_ENDPOINT}/$CI_PROJECT_NAMESPACE/megatron-lm.git"
31-
- sed -i "/^PRE_RELEASE/c\PRE_RELEASE = ''" megatron/core/package_info.py
31+
- sed -i "/^PRE_RELEASE/c\PRE_RELEASE = ''" megatron/core/package_info.py
3232
- VERSION=$(python -c "from megatron import core; print(core.__version__)")
3333
- RELEASE_BRANCH=core_r$VERSION
3434
- git switch --force-create $RELEASE_BRANCH origin/$CI_DEFAULT_BRANCH
@@ -46,11 +46,15 @@ publish:release_branch:
4646
}'
4747
- >
4848
curl -X POST -H "Content-type: application/json" --data "$MESSAGE" ${MCORE_NOTIFICATION_HOOK_MAIN}
49-
- git switch --force-create bot/chore/bump-version
50-
- git add megatron/core/package_info.py
49+
50+
51+
- git switch --force-create bot/chore/bump-version
52+
- git add megatron/core/package_info.py
5153
- >
5254
git commit -m "chore: adjust version version"
53-
- git push -u origin bot/chore/bump-version
55+
56+
57+
- git push -u origin bot/chore/bump-version
5458
- >
5559
curl \
5660
--header "PRIVATE-TOKEN: $PAT" \
@@ -64,28 +68,47 @@ publish:pypi_build_wheel:
6468
extends: [test:pypi_build_wheel, .publish_common_release]
6569
dependencies: []
6670
variables:
67-
PUBLISH_DRYRUN: "no"
68-
71+
PUBLISH_DRYRUN: 'no'
72+
6973
publish:pypi_test_wheel:
7074
extends: [test:pypi_test_wheel, .publish_common_release]
7175
needs: [publish:pypi_build_wheel]
7276
variables:
73-
PUBLISH_DRYRUN: "no"
74-
77+
PUBLISH_DRYRUN: 'no'
78+
7579
publish:pypi_push_wheel:
7680
extends: [test:pypi_push_wheel, .publish_common_release]
7781
needs: [publish:pypi_test_wheel]
82+
dependencies: [publish:pypi_test_wheel]
7883
variables:
79-
PUBLISH_DRYRUN: "no"
84+
PUBLISH_DRYRUN: 'no'
8085

8186
publish:gh_release:
8287
extends: [test:gh_release, .publish_common_release]
83-
dependencies: []
88+
dependencies: [publish:pypi_test_wheel]
89+
needs: [publish:pypi_test_wheel]
8490
variables:
85-
PUBLISH_DRYRUN: "no"
86-
91+
PUBLISH_DRYRUN: 'no'
92+
8793
publish:notify_release:
8894
needs: [publish:pypi_push_wheel, publish:gh_release]
8995
extends: [test:notify_release, .publish_common_release]
9096
variables:
91-
PUBLISH_DRYRUN: "no"
97+
PUBLISH_DRYRUN: 'no'
98+
99+
publish:docs:
100+
extends: [.publish_common_release]
101+
image: ${UTILITY_IMAGE}:${CI_PIPELINE_ID}
102+
tags: [mcore-docker-node-small]
103+
script:
104+
- cd ..
105+
- rm -rf documentation && git clone https://gitlab-ci-token:${PROJECT_ACCESS_TOKEN_MCORE}@${GITLAB_ENDPOINT}/nemo-megatron-core-tme/documentation.git
106+
- cd documentation/megatron-lm
107+
- git fetch
108+
- git checkout $CI_COMMIT_SHA
109+
- cd ..
110+
- git add megatron-lm
111+
- >
112+
git commit -m 'feat: Bump mcore'
113+
114+
- git push

0 commit comments

Comments
 (0)