Skip to content

Commit 7b98397

Browse files
add branches info to buildinfo file
1 parent f2e9cea commit 7b98397

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.drone.jsonnet

+8
Original file line numberDiff line numberDiff line change
@@ -830,11 +830,19 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
830830
status: ['success', 'failure'],
831831
},
832832
volumes: [pipeline._volumes.mdb],
833+
environment: {
834+
SERVER_REF: '${SERVER_REF:-' + server + '}',
835+
SERVER_REMOTE: '${SERVER_REMOTE:-' + server_remote + '}',
836+
},
833837
commands: [
834838
'cd /mdb/' + builddir,
835839
'echo "engine: $DRONE_COMMIT" > buildinfo.txt',
836840
'echo "server: $$(git rev-parse HEAD)" >> buildinfo.txt',
837841
'echo "buildNo: $DRONE_BUILD_NUMBER" >> buildinfo.txt',
842+
'echo "serverBranch: $$SERVER_REF" >> buildinfo.txt',
843+
'echo "serverRepo: $$SERVER_REMOTE" >> buildinfo.txt',
844+
'echo "engineBranch: $DRONE_SOURCE_BRANCH" >> buildinfo.txt',
845+
'echo "engineRepo: https://github.com/$DRONE_REPO" >> buildinfo.txt',
838846
'mv buildinfo.txt ./%s/' % result,
839847
'yes | cp -vr ./%s/. /drone/src/%s/' % [result, result],
840848
'ls -l /drone/src/' + result,

0 commit comments

Comments
 (0)