-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yaml
64 lines (58 loc) · 1.73 KB
/
bitbucket-pipelines.yaml
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
# ref https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/
image: bufbuild/buf:1.17.0
pipelines:
default:
- step:
name: Linting
caches:
- .cache
script:
- buf format -d --exit-code
- buf lint
- step:
name: Generate
caches:
- .cache
script:
- buf generate
artifacts:
- lib
branches:
main:
- parallel:
- step:
name: Build Java library
caches:
- gradle
script:
- cd lib/java
- bash ./gradlew build
artifacts:
- lib/java/build/libs/*.jar
- step:
name: Run Python build
script:
- cd lib/python
- pip install -r requirements.txt
- find sanctumlabs -type d -exec touch {}/__init__.py \;
- touch sanctumlabs/py.typed
- python -m build
artifacts:
- lib/python/dist/*
- parallel:
- step:
name: Package PyPi package
script:
- pipe: atlassian/bitbucket-upload-file:0.3.4
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "lib/python/dist/*"
- step:
name: Package Java Package
script:
- pipe: atlassian/bitbucket-upload-file:0.3.4
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "lib/java/build/libs/*.jar"