save git hash to file during prepare step
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
abc3c4d752
commit
ccd779e931
@ -68,6 +68,7 @@ steps:
|
||||
- cd drone
|
||||
- LATEST_VERSION=$(git tag --sort v:refname | grep '^v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}$' | tail -n 1)
|
||||
- git checkout $LATEST_VERSION
|
||||
- printf $(git log -n 1 --pretty=%H) > ../commit_hash # we'll need this for the docker build
|
||||
- GOLANG_IMG=$(yq read .drone.yml 'steps[0].image')
|
||||
- docker pull $GOLANG_IMG
|
||||
- docker tag $GOLANG_IMG drone-builder:latest
|
||||
@ -95,12 +96,11 @@ steps:
|
||||
commands:
|
||||
- cd drone
|
||||
- rm .dockerignore
|
||||
- COMMIT_HASH=$(git log -n 1 --pretty=%H)
|
||||
- >
|
||||
docker build
|
||||
-f docker/Dockerfile.server.linux.amd64
|
||||
-t registry.jfmonty2.com/drone-server:latest
|
||||
--label drone_commit_hash=$COMMIT_HASH
|
||||
--label drone_commit_hash=$(cat ../commit_hash)
|
||||
.
|
||||
|
||||
- name: deploy
|
||||
|
Loading…
x
Reference in New Issue
Block a user