forked from east-eden/server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbitbucket-pipelines.yml
47 lines (43 loc) · 1.83 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
43
44
45
46
47
# 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:
custom:
server_bin:
- step:
name: 'generate server go code'
image: golang:1.18
script:
- pwd
- 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/server_bin.git
- cd server
# - apt-get update
# - apt-get -y install python3-minimal python3-pip
# - pip3 install docker-compose
# - docker-compose run --service-ports -d mongo
# - docker-compose run --service-ports -d rejson
# - make test
- make docker
- make push
- echo "$GITHUB_ACCESS" | docker login docker.pkg.github.com -u $GITHUB_USERNAME --password-stdin
- make push_github
- make build_win
- cp -r ./apps/* ../server_bin/apps/
- cp -r ./config/* ../server_bin/config/
- cd ../server_bin
- git add -f apps/*
- git add -f config/*
- git status
- git config --global user.email "[email protected]"
- git config --global user.name "bitbucket-pipelines"
- git commit -am "[server-pipeline] hash_id:$COMMIT_SHORT_HASH commit_msg:$COMMIT_MESSAGE ..." || true
- git push origin $BITBUCKET_BRANCH || true
services:
- docker
caches:
- docker