add drone dev pipe
This commit is contained in:
		
							
								
								
									
										45
									
								
								.drone.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								.drone.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| kind: pipeline | ||||
| name: default | ||||
|  | ||||
| trigger: | ||||
|   event: | ||||
|     - push | ||||
|  | ||||
| steps: | ||||
|   - name: docker-login | ||||
|     image: docker:20.10.16-dind | ||||
|     privileged: true | ||||
|     environment: | ||||
|       DOCKER_BUILDKIT: 1 | ||||
|       DOCKER_USERNAME: | ||||
|         from_secret: docker_username | ||||
|       DOCKER_PASSWORD: | ||||
|         from_secret: docker_password | ||||
|     commands: | ||||
|       - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||||
|  | ||||
|   - name: create-builder | ||||
|     image: docker:20.10.16-dind | ||||
|     privileged: true | ||||
|     environment: | ||||
|       DOCKER_BUILDKIT: 1 | ||||
|     commands: | ||||
|       - docker buildx create --use --name multi-builder || docker buildx use multi-builder | ||||
|  | ||||
|   - name: bootstrap | ||||
|     image: docker:20.10.16-dind | ||||
|     privileged: true | ||||
|     environment: | ||||
|       DOCKER_BUILDKIT: 1 | ||||
|     commands: | ||||
|       - docker buildx inspect --bootstrap | ||||
|  | ||||
|   - name: build-push | ||||
|     image: docker:20.10.16-dind | ||||
|     privileged: true | ||||
|     environment: | ||||
|       DOCKER_BUILDKIT: 1 | ||||
|       DOCKER_USERNAME: | ||||
|         from_secret: docker_username | ||||
|     commands: | ||||
|       - docker buildx build --platform linux/amd64,linux/arm64 -t ${DOCKER_USERNAME}/deluge-openvpn:dev --push . | ||||
| @@ -26,8 +26,10 @@ RUN arch=$(dpkg --print-architecture) && \ | ||||
|     if [ "$arch" = "amd64" ]; then \ | ||||
|       dpkg-deb -x /tmp/dumb-init /tmp/dumb-init-dir && \ | ||||
|       cp /tmp/dumb-init-dir/usr/bin/dumb-init /usr/local/bin/dumb-init; \ | ||||
|     else \ | ||||
|     elif [ "$arch" = "amd64" ]; then \ | ||||
|       cp /tmp/dumb-init /usr/local/bin/dumb-init; \ | ||||
|     else \ | ||||
|       echo "Unsupported architecture: $arch" && exit 1; \ | ||||
|     fi && \ | ||||
|     chmod +x /usr/local/bin/dumb-init && \ | ||||
|     rm -rf /tmp/dumb-init /tmp/dumb-init-dir | ||||
|   | ||||
		Reference in New Issue
	
	Block a user