├── .dockerignore ├── .drone.yml ├── .gitignore ├── Dockerfile ├── FILEPATH ├── LICENSE ├── Makefile ├── README.md └── VERSION /.dockerignore: -------------------------------------------------------------------------------- 1 | *~ 2 | Makefile 3 | .git 4 | .gitignore 5 | README.md -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | image: registry.hypriot.com/armbuildchain/dockerindocker 2 | docker: 3 | volumes: 4 | - /var/run/docker.sock:/var/run/docker.sock 5 | git: 6 | path: github.com/hypriot/rpi-drone 7 | script: 8 | - echo "+++++ start docker daemon +++++" 9 | - wrapdocker & 10 | - sleep 5 11 | - docker login --username=$$REGISTRY_USER --password=$$REGISTRY_PASSWORD --email=$$REGISTRY_USER_EMAIL $$REGISTRY_URL 12 | - echo "+++++ build docker image +++++" 13 | - make 14 | - echo "+++++ stop docker daemon +++++" 15 | - start-stop-daemon --stop --pidfile "/var/run/docker.pid" 16 | - echo -e "#####################\n***** COMPLETED *****\n#####################" 17 | 18 | notify: 19 | slack: 20 | webhook_url: $$SLACK_WEBHOOK_URL 21 | on_started: false 22 | on_success: true 23 | on_failure: true 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | gogs.tar.gz 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM resin/rpi-raspbian:jessie 2 | 3 | MAINTAINER Andreas Eiermann 4 | 5 | RUN apt-get update && \ 6 | apt-get install -y libc6 && \ 7 | apt-get clean 8 | # && rm -rf /var/lib/apt/lists/* 9 | 10 | COPY content/drone_static /usr/local/bin/drone 11 | COPY content/etc / 12 | #COPY content/lib /lib 13 | 14 | ENV DRONE_SERVER_PORT 0.0.0.0:80 15 | ENV DRONE_DATABASE_DATASOURCE /var/lib/drone/drone.sqlite 16 | ENV DRONE_SERVER_PORT :80 17 | #VOLUME ["/var/lib/drone"] 18 | 19 | EXPOSE 80 20 | ENTRYPOINT ["/usr/local/bin/drone"] 21 | -------------------------------------------------------------------------------- /FILEPATH: -------------------------------------------------------------------------------- 1 | arm-binaries/drone__0.4.0.tar.gz -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Hypriot 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | IMAGENAME := $(shell basename `git rev-parse --show-toplevel`) 2 | SHA := $(shell git rev-parse --short HEAD) 3 | targz_file := $(shell cat FILEPATH) 4 | timestamp := $(shell date +"%Y%m%d%H%M") 5 | REL :=$(shell cat VERSION) 6 | 7 | default: loadS3_and_extract dockerbuild push 8 | 9 | loadS3_and_extract: 10 | aws s3 cp s3://$(AWS_BUCKET)/$(targz_file) ./binary.tar.gz 11 | mkdir content/ 12 | tar xzf binary.tar.gz -C content/ 13 | ls -la content/ 14 | 15 | dockerbuild: 16 | docker rmi -f $(NAMESPACE)/$(IMAGENAME):bak || true 17 | docker tag $(NAMESPACE)/$(IMAGENAME) $(NAMESPACE)/$(IMAGENAME):bak || true 18 | docker rmi -f $(NAMESPACE)/$(IMAGENAME) || true 19 | docker build -t $(NAMESPACE)/$(IMAGENAME) . 20 | 21 | testimg: 22 | docker rm -f new-$(IMAGENAME) || true 23 | docker run -d --name new-$(IMAGENAME) $(NAMESPACE)/$(IMAGENAME):latest 24 | docker inspect -f '{{.NetworkSettings.IPAddress}}' new-$(IMAGENAME) 25 | docker logs -f new-$(IMAGENAME) 26 | 27 | push: 28 | # push VERSION 29 | docker tag -f $(NAMESPACE)/$(IMAGENAME):latest $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(VERSION) 30 | docker push $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(VERSION) 31 | docker rmi $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(VERSION) || true 32 | # push commit SHA 33 | docker tag -f $(NAMESPACE)/$(IMAGENAME):latest $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(SHA) 34 | docker push $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(SHA) 35 | docker rmi $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(SHA) || true 36 | # push timestamp 37 | docker tag -f $(NAMESPACE)/$(IMAGENAME):latest $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(timestamp) 38 | docker push $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(timestamp) 39 | docker rmi $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):$(timestamp) || true 40 | # push latest 41 | docker tag -f $(NAMESPACE)/$(IMAGENAME):latest $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):latest 42 | # docker push $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):latest 43 | docker rmi $(REGISTRY_URL)/$(NAMESPACE)/$(IMAGENAME):latest || true 44 | 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED 2 | 3 | was used to build drone 0.3.x alpha 4 | 5 | # rpi-drone [![Build Status](http://armbuilder2.hypriot.com/api/badge/github.com/hypriot/rpi-drone/status.svg?branch=master)](http://armbuilder.hypriot.com/github.com/hypriot/rpi-drone) 6 | 7 | Raspberry Pi compatible Docker Image with drone CI server. 8 | 9 | ## Details 10 | - [Source Project Page](https://github.com/hypriot) 11 | - [Source Repository](https://github.com/hypriot/rpi-drone) 12 | - [drone.io](https://github.com/drone/drone) 13 | 14 | ## Start a drone.io CI server 15 | ```bash 16 | touch drone.sqlite 17 | docker run --detach --name my-drone-server --publish 8080:80 --volume `pwd`/drone.sqlite:/drone.sqlite \ 18 | --volume /var/run/docker.sock:/var/run/docker.sock \ 19 | --env DRONE_GOGS_URL=http://: \ 20 | --env DRONE_GOGS_SECRET= hypriot/rpi-drone 21 | ``` 22 | Now you can access the new drone installation by opening `http://< IP of your Raspberry Pi>:8080` in your browser 23 | 24 | ## How to create this image 25 | 26 | Run all the commands from within the project root directory. 27 | 28 | ### Build the Docker Image 29 | ```bash 30 | make dockerbuild 31 | ``` 32 | 33 | #### Push the Docker Image to the Docker Hub 34 | * First use a `docker login` with username, password and email address 35 | * Second push the Docker Image to the official Docker Hub 36 | 37 | ```bash 38 | make push 39 | ``` 40 | 41 | ## License 42 | 43 | The MIT License (MIT) 44 | 45 | Copyright (c) 2015 Hypriot 46 | 47 | Permission is hereby granted, free of charge, to any person obtaining a copy 48 | of this software and associated documentation files (the "Software"), to deal 49 | in the Software without restriction, including without limitation the rights 50 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 51 | copies of the Software, and to permit persons to whom the Software is 52 | furnished to do so, subject to the following conditions: 53 | 54 | The above copyright notice and this permission notice shall be included in all 55 | copies or substantial portions of the Software. 56 | 57 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 58 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 59 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 60 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 61 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 62 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 63 | SOFTWARE. 64 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.4.0 2 | --------------------------------------------------------------------------------