-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbitbucket-pipelines.yml
42 lines (38 loc) · 1.79 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
39
40
41
42
# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: atlassian/default-image:2
clone:
enabled: false
pipelines:
default:
- step:
name: 'generate server go code'
image: golang:1.15
script:
- pwd
- uname -a
- git clone --depth=1 --branch $BITBUCKET_BRANCH https://$BITBUCKET_USERNAME:[email protected]/east-eden/proto.git
- git clone --depth=1 --branch $BITBUCKET_BRANCH https://$BITBUCKET_USERNAME:[email protected]/east-eden/server.git
- git clone --depth=1 --branch $BITBUCKET_BRANCH https://$BITBUCKET_USERNAME:[email protected]/east-eden/ee_client.git
- ls -al
- cd proto
- COMMIT_SHORT_HASH=`git rev-parse --short HEAD`
- COMMIT_MESSAGE=`git log --format=%B -n 1`
- go get google.golang.org/protobuf/cmd/protoc-gen-go
- go get github.com/micro/protoc-gen-micro/v2
- protoc-gen-go --version
- make linux_proto
- cd ../server
- git status
- git add proto/* || true
- git config --global user.email "[email protected]"
- git config --global user.name "bitbucket-pipelines"
- git commit -am "[proto-pipeline] hash_id:$COMMIT_SHORT_HASH commit_msg:$COMMIT_MESSAGE ..." || true
- git push origin $BITBUCKET_BRANCH || true
- cd ../ee_client
- git status
- git add proto/*.cs || true
- git commit -am "[proto-pipeline] hash_id:$COMMIT_SHORT_HASH commit_msg:$COMMIT_MESSAGE ..." || true
- git push origin $BITBUCKET_BRANCH || true