Initial commit
Drone CI steps, Dockerfile for ENV arguments and README.md
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build-host-redirect-image
|
||||
|
||||
steps:
|
||||
- name: build-and-tag-host-image
|
||||
image: docker:cli
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- echo "Building redirect image on host Docker daemon..."
|
||||
- docker build -t redirect:latest .
|
||||
- |
|
||||
if [ -n "$DRONE_COMMIT_SHA" ]; then
|
||||
SHORT_SHA=$(echo $DRONE_COMMIT_SHA | cut -c1-7)
|
||||
docker tag redirect:latest redirect:$SHORT_SHA
|
||||
echo "Tagged redirect:$SHORT_SHA"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DRONE_TAG" ]; then
|
||||
docker tag redirect:latest redirect:$DRONE_TAG
|
||||
echo "Tagged redirect:$DRONE_TAG"
|
||||
fi
|
||||
- echo "Build complete. Images registered on host Docker engine:"
|
||||
- docker images | grep redirect || true
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
Reference in New Issue
Block a user