-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitbucket-pipelines.yml
38 lines (36 loc) · 1.44 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Upload a package to a private devpi server
# and push to github mirror
# We must use python2 as mercurial only works with
# python2 and i'm too lazy to actually fix this
# The package itself should work with python 2 and 3
# We should use an image qith both version if we want to
# build binary packages.
image: python:2
pipelines:
branches:
default:
- step:
script: # Modify the commands below to build your repository.
- python -m pip install -U pip
- pip install -U devpi-client
- pip install -U Cython
- PYPI_URL="https://$PYPI_SERVER_LOGIN@$PYPI_SERVER/"
- echo "${PYPI_URL}"
- devpi use "${PYPI_URL}"
- devpi login $DEVPI_USER --password "$DEVPI_PASS"
- devpi use $DEVPI_INDEX
- devpi upload --no-vcs
- echo "Push to git repo"
- echo "[extensions]" >> .hg/hgrc
- echo "hgext.bookmarks =" >> .hg/hgrc
- echo "hggit =" >> .hg/hgrc
- pip install -U mercurial hg-git
- mkdir -p ~/.ssh
- echo $OTHER_REPO_FINGERPRINTS_b64 | base64 -d >> ~/.ssh/known_hosts
- echo >> ~/.ssh/known_hosts
- chmod 600 ~/.ssh/known_hosts
- echo $SSH_GIT_KEY_b64 | base64 -d > ~/.ssh/id_rsa
- echo >> ~/.ssh/id_rsa
- cat ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- hg push -f git+ssh://$OTHER_REPO