clone into subdirectory
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Joseph Montanaro 2020-12-29 09:42:07 -08:00
parent 11d2585268
commit 92b679acb2

View File

@ -17,7 +17,8 @@ steps:
- echo 'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories - echo 'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
- apk update - apk update
- apk add git yq - apk add git yq
- git clone https://github.com/drone/drone.git . - git clone https://github.com/drone/drone.git
- cd drone
- LATEST_VERSION=$(git tag --sort v:refname | grep '^v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}$' | tail -n 1) - 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 - git checkout $LATEST_VERSION
- GOLANG_IMG=$(yq read .drone.yml 'steps[0].image') - GOLANG_IMG=$(yq read .drone.yml 'steps[0].image')
@ -31,6 +32,7 @@ steps:
GOARCH: amd64 GOARCH: amd64
GOOS: linux GOOS: linux
commands: commands:
- cd drone
- go build -ldflags "-extldflags \"-static\"" -tags nolimit -o release/linux/amd64/drone-server github.com/drone/drone/cmd/drone-server - go build -ldflags "-extldflags \"-static\"" -tags nolimit -o release/linux/amd64/drone-server github.com/drone/drone/cmd/drone-server
- name: docker-build - name: docker-build
@ -39,6 +41,7 @@ steps:
- name: docker-socket - name: docker-socket
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
- cd drone
- docker build -t registry.jfmonty2.com/drone:latest -f docker/Dockerfile.server.linux.amd64 . - docker build -t registry.jfmonty2.com/drone:latest -f docker/Dockerfile.server.linux.amd64 .