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.
-
-
- Note: All of the features are distributed seperately and therfore needs to have their versions updated in the
docker-compose.yml
ordrone.yml
files. - podman: OCI/Open Source replacement for docker
- CLI: command line interface
- Runners:
- Docker: runner in a container (dind)
- Exec: runner within the server container
- Kube: runner within a pod in the k8s cluster
- Note: All of the features are distributed seperately and therfore needs to have their versions updated in the
- ### podman
- [podman](https://podman.io) is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. Containers can either be run as root or in rootless mode.
-
- Command line client for the Drone continuous integration server.
- #### Docker
- The [docker runner](https://github.com/drone-runners/drone-runner-docker) executes pipelines inside Docker containers. This runner is intended for linux workloads that are suitable for execution inside containers. This requires Drone server 1.6.0 or higher. Need to figureout the relationship to [harness/harness-docker-runner](https://github.com/harness/harness-docker-runner).
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:
-
{DRONE_SERVER_VERSION}: Version from the build script
-
{DOCKER_USERNAME}: Docker Hub User Name
-
{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 fordocker 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
-
The podman environment needs to use the
--format
to build like docker. This needed if theVOLUME
command is used in the container file. To remove the subsequent warning user--format docker
. -
Access tokens are used for docker.io image repository and stored in the
orgsecrets
function. Tokens are stored in password management. Token management is inhttps://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