github.com/braveheart12/just@v0.8.7/ci/templates/pull-requests.yml.j2 (about) 1 groups: 2 {% for pull in pulls %} 3 - name: {{ pull.number }} 4 jobs: 5 - unit-{{ pull.number }} 6 {% endfor %} 7 8 resource_types: 9 - name: pull-request 10 type: docker-image 11 source: 12 repository: chemist/pull-request 13 tag: latest 14 - name: slack 15 type: docker-image 16 source: 17 repository: cfcommunity/slack-notification-resource 18 tag: latest 19 20 resources: 21 #- name: lock 22 # type: pool 23 # source: 24 # uri: git@github.com:insolar/locks.git 25 # branch: master 26 # pool: builds 27 # private_key: ((meta.github.lock_key)) 28 - name: master 29 type: git 30 source: 31 uri: https://github.com/insolar/insolar.git 32 - name: slack 33 type: slack 34 source: 35 url: ((meta.slack.url)) 36 37 {% for pull in pulls %} 38 - name: pull-request-{{ pull.number }} 39 type: pull-request 40 source: 41 smuggler_debug: false 42 owner: ((meta.github.owner)) 43 repo: ((meta.github.repo)) 44 access_token: ((meta.github.access_token)) 45 pull_request: {{ pull.number }} 46 #ssh_key: ((meta.github.private_key)) 47 {% endfor %} 48 49 jobs: 50 {% for pull in pulls %} 51 - name: unit-{{ pull.number }} 52 public: true 53 plan: 54 - put: pull-request-{{ pull.number }} 55 params: 56 state: pending 57 - get: master 58 trigger: true 59 # - put: lock 60 # params: {acquire: true} 61 - get: pull-request-{{ pull.number }} 62 trigger: true 63 - task: unit 64 timeout: 20m 65 config: 66 platform: linux 67 image_resource: 68 type: docker-image 69 source: 70 repository: registry.ins.world/builder 71 username: ((meta.registry.username)) 72 password: ((meta.registry.password)) 73 inputs: 74 - name: pull-request-{{ pull.number }} 75 path: /go/src/github.com/insolar/insolar 76 run: 77 path: sh 78 args: 79 - -exc 80 - | 81 echo tests 82 pwd 83 ls -alh go 84 export CGO_ENABLED=1 85 export GORACE="halt_on_error=1" 86 export GOMAXPROCS=2 87 export INSOLAR_LOG_LEVEL=debug 88 export GOPATH=$(pwd)/go 89 90 mkdir $GOPATH/bin 91 export PATH=$PATH:$GOPATH/bin 92 ls -alh 93 env 94 cd $GOPATH/src/github.com/insolar/insolar 95 #make install-deps 96 rm -Rf $GOPATH/src/github.com/insolar/insolar/vendor/* && mv /go/vendor $GOPATH/src/github.com/insolar/insolar/ 97 make pre-build 98 make build 99 make test_with_coverage 100 #CGO_ENABLED=1 go test -count 1 --coverprofile=coverage.txt --covermode=atomic ./... 101 make functest 102 on_success: 103 aggregate: 104 - put: pull-request-{{ pull.number }} 105 params: 106 state: success 107 - put: slack 108 params: 109 silent: true 110 text: ":sun_with_face: {{ pull.number }}, {{ pull.title }}, $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME" 111 on_failure: 112 aggregate: 113 - put: pull-request-{{ pull.number }} 114 params: 115 state: failure 116 - put: slack 117 params: 118 silent: true 119 text: ":new_moon_with_face: {{ pull.number }}, {{ pull.title }} $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME" 120 # ensure: 121 # put: lock 122 # params: {release: lock} 123 {% endfor %}