forked from upciti/wheel2deb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
78 lines (71 loc) · 1.54 KB
/
.gitlab-ci.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
stages:
- build
- test
- deploy
services:
- name: docker:dind
Build Wheel:
image: $CI_REGISTRY/tools/bdist-builder
stage: build
script:
- python3 setup.py bdist_wheel
artifacts:
paths:
- dist/*
expire_in: 3 week
Unit Tests:
tags:
- docker
stage: test
script:
- apk add --update make
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- IMAGE_NAME=$CI_REGISTRY_IMAGE make tests
Push to Registry:
tags:
- docker
stage: deploy
script:
- apk add --update make
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- for i in jessie stretch buster; do docker pull $CI_REGISTRY_IMAGE:$i || true; done
- IMAGE_NAME=$CI_REGISTRY_IMAGE make images
- docker push $CI_REGISTRY_IMAGE
only:
- /^v.*$/
except:
- branches
Publish on Gitlab:
stage: deploy
image: $CI_REGISTRY/tools/gitlab-release
script:
- gitlab-release -k dist/*.whl
only:
- /^v.*$/
except:
- branches
Push to Docker Hub:
tags:
- docker
stage: deploy
when: manual
only:
- /^v.*$/
except:
- branches
script:
- apk add --update make
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- for i in jessie stretch buster; do docker pull parkoview/wheel2deb:$i || true; done
- IMAGE_NAME=parkoview/wheel2deb make images
- docker push parkoview/wheel2deb
Publish on PyPi:
stage: deploy
image: $CI_REGISTRY/tools/twine
when: manual
only:
- /^v.*$/
except:
- branches
script:
- twine upload dist/*.whl