FF
Drone is a modern continuous integration platform that empowers automated build, test and release workflows using a powerful, cloud native pipeline engine.
Drone has joined Harness. The product page has moved to Continuous Integration and the project moved repomoved to harness/drone.
This container generally connects to GitHub to pull other container's code-base down and builds the container image via Podman and then pushes the image to Docker Hub to be used in a Kubernetes cluster.
docker-compose.yml
or drone.yml
files.The exec runner executes pipelines directly on the host machine. This runner is intended for workloads that are not suitable for running inside containers. This requires Drone server 1.2.3 or higher.
The kubernetes runner executes pipelines inside Kubernetes pods. This runner is an alternative to the docker runner and is optimize for teams running Drone on Kubernetes. This requires Drone server 1.6.0 or higher.
Being a bootstrap container you may need to push the image to the repository.
Parameters:
{DOCKER_PASSWORD}: Docker Hub Password
On the desktop credentials are usually handled by the desktop app, check ~/.docker/config.json
to confirm. This should eliminate the need for docker login --username={DOCKER_USERNAME} --password={DOCKER_PASSWORD} docker.io
Integration Script
docker tag drone:dev docker.io/gautada/drone:{DRONE_SERVER_VERSION}
docker push docker.io/gautada/drone:{DRONE_SERVER_VERSION}
The official to list is kept in a GitHub Issue List
--format
to build like docker. This needed if the VOLUME
command is used in the container file. To remove the subsequent warning user --format docker
.orgsecrets
function. Tokens are stored in password management. Token management is in https://hub.docker.com/settings/security
.Just to record somewhere the mechanism to build a multi-architecture container image distribution.
Build and push architecture 1
podman build --file Containerfile --no-cache --tag img:dev .
podman tag img:dev docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH1}
podman login --username=$DOCKER_USERNAME --password=$DOCKER_PASSWORD docker.io
podman push docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH1}
Build and push architecture 2
podman --remote --connection x86 build --file Containerfile --no-cache --tag img:dev .
podman --remote --connection x86 tag drone:dev docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH2}
podman --remote --connection x86 login --username=$DOCKER_USERNAME --password=$DOCKER_PASSWORD docker.io
podman --remote --connection x86 push docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH2}
Build and push manifest
podman manifest create img:man
podman manifest add img:man docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH1}
podman manifest add img:man docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH2}
podman tag img:man docker.io/$DOCKER_USERNAME/img:{VERSION}
podman push docker.io/$DOCKER_USERNAME/img:{VERSION}
Clean-up
podman docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH1}
podman rmi drone:dev
podman --remote --connection x86 rmi docker.io/$DOCKER_USERNAME/img:{VERSION}-{ARCH2}
podman --remote --connection x86 rmi drone:dev
podman rmi drone:man