Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
a6c2ac2b
Unverified
Commit
a6c2ac2b
authored
Feb 19, 2019
by
chicm-ms
Committed by
GitHub
Feb 19, 2019
Browse files
NNI release build pipeline (#747)
Add azure pipeline to build and upload nni release
parent
3afe882a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
1 deletion
+106
-1
deployment/deployment-pipelines.yml
deployment/deployment-pipelines.yml
+98
-0
deployment/pypi/Makefile
deployment/pypi/Makefile
+8
-1
No files found.
deployment/deployment-pipelines.yml
0 → 100644
View file @
a6c2ac2b
jobs
:
-
job
:
'
Build_upload_nni_ubuntu'
pool
:
vmImage
:
'
Ubuntu
16.04'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
script
:
|
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install twine --user
displayName
:
'
Install
twine'
-
script
:
|
# NNI build scripts (Makefile) uses branch tag as package version number
# To test this pipeline without impacting nni testpypi/pypi packages, uncomment following git tag command
# git tag v0.0.1
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
echo 'building prerelease package...'
make version_ts=true build
else
echo 'building release package...'
make build
fi
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
echo 'uploading prerelease package to testpypi...'
python3 -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
else
echo 'uploading release package to pypi...'
python3 -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
fi
displayName
:
'
upload
nni
package
to
pypi/testpypi'
-
script
:
|
export IMG_TAG=`git describe --tags --abbrev=0`
cd deployment/docker
docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
if [ $(build_type) = 'prerelease' ]
then
echo 'updating docker file for testpyi...'
sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/RUN python3 -m pip install --user --no-cache-dir --index-url https:\/\/test.pypi.org\/simple\/ --extra-index-url https:\/\/pypi.org\/simple nni/' Dockerfile
fi
echo $IMG_TAG
docker build -f Dockerfile -t msranni/nni:$IMG_TAG .
docker push msranni/nni:$IMG_TAG
displayName
:
'
build
and
upload
nni
docker
image'
-
job
:
'
Build_upload_nni_macos'
pool
:
vmImage
:
'
macOS
10.13'
strategy
:
matrix
:
Python36
:
PYTHON_VERSION
:
'
3.6'
steps
:
-
script
:
|
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install twine --user
displayName
:
'
Install
twine'
-
script
:
|
make install-dependencies
displayName
:
'
Install
nni
dependencies'
-
script
:
|
# NNI build scripts (Makefile) uses branch tag as package version number
# To test this pipeline without impacting nni testpypi/pypi packages, uncomment following git tag command
# git tag v0.0.1
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
echo 'building prerelease package...'
PATH=$HOME/Library/Python/3.7/bin:$PATH make version_ts=true build
else
echo 'building release package...'
PATH=$HOME/Library/Python/3.7/bin:$PATH make build
fi
displayName
:
'
build
nni
bdsit_wheel'
-
script
:
|
cd deployment/pypi
if [ $(build_type) = 'prerelease' ]
then
echo 'uploading prerelease package to testpypi...'
python3 -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
else
echo 'uploading release package to pypi...'
python3 -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
fi
displayName
:
'
upload
nni
package
to
pypi/testpypi'
deployment/pypi/Makefile
View file @
a6c2ac2b
...
...
@@ -11,7 +11,14 @@ else
$(error
platform
$(UNAME_S)
not
supported)
endif
NNI_VERSION_VALUE
=
$(
shell
git describe
--tags
)
TIME_STAMP
=
$(
shell
date
"+%y%m%d%H%M"
)
NNI_VERSION_VALUE
=
$(
shell
git describe
--tags
--abbrev
=
0
)
# To include time stamp in version value, run:
# make version_ts=true build
ifeq
($(version_ts), true)
NNI_VERSION_VALUE
:=
$(NNI_VERSION_VALUE)
.
$(TIME_STAMP)
endif
NNI_VERSION_TEMPLATE
=
999.0.0-developing
.PHONY
:
build
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment