diff --git a/.github/ACKNOWLEDGMENTS.md b/.github/ACKNOWLEDGMENTS.md new file mode 100644 index 0000000..cd40c6a --- /dev/null +++ b/.github/ACKNOWLEDGMENTS.md @@ -0,0 +1,18 @@ +## I would like to thank every one making this possible. + +### People making Blender better every day. + +### Special thank to + +### Donators + +### People of xxx +For kindness, support, inspiration, testing, reporting errors and general help. + + +### People of xxx +Working to provide a dedicated material library. + + +_Hope i don't forget anyone involved in the effort, if so, don't take offence and drop me a line._ + diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 4dc79fa..f273889 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,38 +1,46 @@ -Contributor Covenant Code of Conduct -Our Pledge +# Contributor Covenant Code of Conduct + +## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. -Our Standards + +## Our Standards Examples of behavior that contributes to creating a positive environment include: - Using welcoming and inclusive language - Being respectful of differing viewpoints and experiences - Gracefully accepting constructive criticism - Focusing on what is best for the community - Showing empathy towards other community members +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: - The use of sexualized language or imagery and unwelcome sexual attention or advances - Trolling, insulting/derogatory comments, and personal or political attacks - Public or private harassment - Publishing others' private information, such as a physical or electronic address, without explicit permission - Other conduct which could reasonably be considered inappropriate in a professional setting +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting -Our Responsibilities +## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -Scope + +## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. -Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at TEAM_EMAIL. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at `phoenix.grey0108@gmail.com`. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. -Attribution -This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4 +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e69de29..83c6ebf 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,5 @@ +## Expected behavior + +## Actual behavior + +## Step to reproduce diff --git a/.travis.yml b/.travis.yml index a5815bc..f174517 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,45 +1,20 @@ language: generic sudo: required dist: trusty - -env: - matrix: - - ARCH=armv6 - - ARCH=x86 - -services: - - docker - branches: only: - - master - - develop - - "/^\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/" - + - "/^\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/" install: true - -script: - - make mk-image ARCH=$ARCH - - make mk-deployment VERSION=$TRAVIS_TAG - +script: +- make build VERSION=$TRAVIS_TAG deploy: - - provider: script - script: make pushtohub USER=$DOCKER_USER PASS=$DOCKER_PASS ARCH=$ARCH TAG=$TRAVIS_BRANCH - on: - all_branches: true - condition: "$TRAVIS_BRANCH =~ ^master|develop$" - - - provider: script - script: make pushtohub USER=$DOCKER_USER PASS=$DOCKER_PASS ARCH=$ARCH TAG=$TRAVIS_TAG - on: - tags: true - all_branches: true - - - provider: releases - prerelease: true - skip_cleanup: true - file_glob: true - file: "./*.zip" - on: - tags: true - all_branches: true +- provider: releases + prerelease: true + skip_cleanup: true + file_glob: true + file: "./*.zip" + on: + tags: true + all_branches: true + api_key: + secure: bOaoJIWQzT5Vd2WyIkSNM3oBDnZM27WRnIsLLUTp4XscQ3G4PGwZ6OfpjvIGb9zXbv3uLSQ63A1NiulVVryMZWSVDr0awzxcYjY1p8hMztuav2CPYUOgkTWtuWAsIbsNOFw+A3dsWfCHJs+jOuIiSnD21ic8ppcjyaag43cfrJYV1ERLP1PLqC2Sk1GEoJi9NpbcmE7jLr1VDec1PJ5NENt7Ot68+a218nSCMyGZFQ67lNDgcxKF+53xMEJXZ4lxmqsOklhUqmhLIn72BuzgrNcLo7Stc/sBHqKqeJSheWZ1qWEfcxcKzlTaW3uJwjtAey+01FU2QeI8dgLzXa0dKH9/a5MC5c5isqjBpKgBzlWl4hHvOxWV+ElpJg6UNwVwjzSReTNscFdOxiI5lgcZ2H43kRYjS+y+SkGPmtyt7d1NXUjPu3SNl8LNQwUtb8w6cm74B5+Rd2ME9ADNI8EyDJL27I/q7MaZ8egcaGJ2duW9zMNJ+2KMhg6M2RLsh+SAz7ya68KlsFqTHUfbIu0IszsTVfF1TJ8CXhhNCpknQ8dhS5yu9E2RermOmtwDAlbzzLzEZr7kovFasUIGzK7eBuatJ+Ph7Vo28f1birQ1mpcRqJOJwzlWG04b+5ZXc4HzcdDmCH4G+TM51S4gSw9TasuY2XuAhLeRIepoULva/sI= diff --git a/LICENSE.md b/LICENSE.md index e94469a..fb6ad90 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,12 +1,22 @@ - - The MIT License (MIT) Copyright (c) 2017 MatchboxLab -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index 8761857..09e1b5e 100644 --- a/Makefile +++ b/Makefile @@ -1,55 +1,10 @@ -GITBOOK = $(CURDIR)/gitbook -DOCS = $(CURDIR)/docs -IMAGE_ENV = $(CURDIR)/image -DF = $(IMAGE_ENV)/Dockerfile -DEPLOYMENT = $(CURDIR)/deployment -OWNER = [OWNER] -REPO = [REPO] +SRC = proj VERSION = test +ARTS = $(SRC)-$(VERSION).zip -.PHONY: mk-book clean-book -mk-book: $(GITBOOK) - gitbook build $(GITBOOK) $(DOCS) +build: $(SRC) + zip -r $(ARTS) $(SRC) + unzip -l $(ARTS) -clean-book: - rm -rf $(DOCS)/* - -.PHONY: mk-image clean-image -mk-image: - docker run --rm --privileged multiarch/qemu-user-static:register --reset - docker build -t $(OWNER)/$(REPO)-$(ARCH):$(VERSION) -f $(DF)-$(ARCH) $(IMAGE_ENV) - -clean-image: - docker rmi $(OWNER)/$(REPO)-$(ARCH):$(VERSION) - - -.PHONY: mk-deployment clean-deployment - -DEPLOYMENT_x86=$(DEPLOYMENT)/imageAPI-x86 -DEPLOYMENT_armv6=$(DEPLOYMENT)/imageAPI-armv6 - -mk-deployment-x86: $(DEPLOYMENT_x86) - mkdir $(REPO)-imageAPI-x86 - cp $(DEPLOYMENT_x86)/docker-compose.yml $(DEPLOYMENT_x86)/temp.env $(DEPLOYMENT_x86)/Makefile $(REPO)-imageAPI-x86/ - sed -i s+VERSION=test.*+VERSION=$(VERSION)+g $(REPO)-imageAPI-x86/temp.env - zip -r $(REPO)-x86-$(VERSION).zip $(REPO)-imageAPI-x86 - rm -rf $(REPO)-imageAPI-x86 - -mk-deployment-armv6: $(DEPLOYMENT_armv6) - mkdir $(REPO)-imageAPI-armv6 - cp $(DEPLOYMENT_armv6)/docker-compose.yml $(DEPLOYMENT_armv6)/temp.env $(DEPLOYMENT_armv6)/Makefile $(REPO)-imageAPI-armv6/ - sed -i s+VERSION=test.*+VERSION=$(VERSION)+g $(REPO)-imageAPI-armv6/temp.env - zip -r $(REPO)-armv6-$(VERSION).zip $(REPO)-imageAPI-armv6 - rm -rf $(REPO)-imageAPI-armv6 - -mk-deployment: mk-deployment-x86 mk-deployment-armv6 - -clean-deployment: $(REPO)-*-$(VERSION).zip - rm $(REPO)-*-$(VERSION).zip - - -.PHONY: pushtohub -pushtohub: - docker tag $(OWNER)/$(REPO)-$(ARCH) $(OWNER)/$(REPO)-$(ARCH):$(TAG) - docker login -u $(USER) -p $(PASS) - docker push $(OWNER)/$(REPO)-$(ARCH):$(TAG) +clean: $(ARTS) + rm -rf $(ARTS) diff --git a/README.md b/README.md index c68a06e..44eaabe 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,111 @@ -

- -

+# Introduction + +This is a devops for docker image and its deployment (using docker compose) for armv6 and x86. It contains: +- Dockerfile template for image. +- Docker compose file template for deployment. +- gitbook template for github page. +- travis file template for CI. + +You can use this project to quick start your docker image project with the following outcome, + +* It sets up local build process +* It sets up travis build process + + +# Usage + +### Go to your project +``` +cd myproj +``` + +### Get the [release](https://github.com/hellstein/devops-gitbook/releases) +``` +wget https://github.com/hellstein/devops-docker/releases/download/0.2.3/proj-0.2.3.zip +``` + +### Unzip +``` +unzip proj-0.2.3.zip +``` +You will see the `proj` folder. + +### Set project +``` +mv proj/* proj/.[!.]* ./ +rm -rf proj* +``` + +### Set the `OWNER` and `REPO` with your github user and project +```bash +./set_owner_repo [OWNER] [REPO] +``` + +### Specify develop local build usage + +Till now, you can validate by + +* Local build process + - Create docker image by `make mk-image ARCH=x86` or `make mk-image ARCH=armv6`. Test result with `docker images`. + + - Create gitbook by `make mk-book`, a docs folder will be generated + - Create deployment by `make mk-deployment VERSION=0.1.0`, 2 zip packages will be generated according to your repository name and version. + +* Local clean process + - Delete docker image by `make clean-image ARCH=x86` or `make clean-image ARCH=armv6` + - Delete gitbook result by `make clean-book` + - Delete deployment result by `make clean-deployment VERSION=0.1.0` + +### Write the image dockerfile and the image deployment +- Modify `images/Dockerfile-armv6(x86)` which defines how to build images +- Go to `deployment/imageAPI-armv6 (x86)` + * Update `docker-compose.yml` which defines how to run images + * Update `temp.env` which defines environment variable used by `docker-compose.yml` + +### Valid dockerfile and image deployment as before + +### Travis build + +- specify the docker hub account info + * `travis login` + * `travis enable` + * Change `.env` by setting `DOCKER_USER` and `DOCKER_PASS` + * `./set_docker_account` + +- Set github release api key + + Go to [github and get a token](https://github.com/settings/tokens). +```bash +./set_release_api_key [token] +``` +- Modify the indentation like below: +```yaml +deploy: +- provider: script + script: make pushtohub USER=$DOCKER_USER PASS=$DOCKER_PASS ARCH=$ARCH TAG=$TRAVIS_BRANCH + on: + all_branches: true + condition: "$TRAVIS_BRANCH =~ ^master|develop$" +- provider: script + script: make pushtohub USER=$DOCKER_USER PASS=$DOCKER_PASS ARCH=$ARCH TAG=$TRAVIS_TAG + on: + tags: true + all_branches: true +- provider: releases + prerelease: true + skip_cleanup: true + file_glob: true + file: "./*.zip" + api_key: + secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + on: + tags: true +``` +- Test whether .travis.yml is ok +```bash +travis lint .travis.yml +``` + +- Now you can push a branch or tag to check whether travis does its job as expected -

Project Title

-

- One Paragraph of project description goes here -

-
- -[![GitHub release](https://img.shields.io/github/release/[OWNER]/[REPO].svg)](https://github.com/[OWNER]/[REPO]/releases) -![Github All Releases](https://img.shields.io/github/downloads/[OWNER]/[REPO]/total.svg) -x86: [![Docker Pulls](https://img.shields.io/docker/pulls/[OWNER]/[REPO]-x86.svg)](https://hub.docker.com/r/[OWNER]/[REPO]-x86/tags/) -armv6: [![Docker Pulls](https://img.shields.io/docker/pulls/[OWNER]/[REPO]-x86.svg)](https://hub.docker.com/r/[OWNER]/[REPO]-armv6/tags/) - -![Travis (.org) branch](https://img.shields.io/travis/[OWNER]/[REPO]/BRANCH.svg) -![GitHub](https://img.shields.io/github/license/[OWNER]/[REPO].svg) - -# Manual -More details got to the github page. - -# Logistics - -### Contributing - -Please read [CONTRIBUTING.md](https://github.com/[OWNER]/[REPO]/blob/master/.github/CONTRIBUTING.md) for contributing. -For details on our [code of conduct](https://github.com/[OWNER]/[REPO]/blob/master/.github/CODE_OF_CONDUCT.md), and the process for submitting pull requests to us. - -### Versioning - -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the tags on this repository - -### Authors - -* **AUTHOR** - *Initial work* - [AUTHOR](https://github.com/AUTHOR) - -See also the list of [contributors](https://github.com/[OWNER]/[REPO]/graphs/contributors) who participated in this project. - -### Acknowledgments - -See [Acknowledgments](https://github.com/[OWNER]/[REPO]/blob/master/.github/ACKNOWLEDGMENTS.md) - - -### License - -This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/[OWNER]/[REPO]/blob/master/LICENSE.md) file for details diff --git a/.env b/proj/.env similarity index 100% rename from .env rename to proj/.env diff --git a/.github/AKNOWLEDGEMENTS.md b/proj/.github/AKNOWLEDGEMENTS.md similarity index 100% rename from .github/AKNOWLEDGEMENTS.md rename to proj/.github/AKNOWLEDGEMENTS.md diff --git a/proj/.github/CODE_OF_CONDUCT.md b/proj/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4dc79fa --- /dev/null +++ b/proj/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,38 @@ +Contributor Covenant Code of Conduct +Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. +Our Standards + +Examples of behavior that contributes to creating a positive environment include: + + Using welcoming and inclusive language + Being respectful of differing viewpoints and experiences + Gracefully accepting constructive criticism + Focusing on what is best for the community + Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + + The use of sexualized language or imagery and unwelcome sexual attention or advances + Trolling, insulting/derogatory comments, and personal or political attacks + Public or private harassment + Publishing others' private information, such as a physical or electronic address, without explicit permission + Other conduct which could reasonably be considered inappropriate in a professional setting + +Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. +Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at TEAM_EMAIL. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. +Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4 diff --git a/.github/CONTRIBUTING.md b/proj/.github/CONTRIBUTING.md similarity index 100% rename from .github/CONTRIBUTING.md rename to proj/.github/CONTRIBUTING.md diff --git a/gitbook/contribution/contribution.md b/proj/.github/ISSUE_TEMPLATE.md similarity index 100% rename from gitbook/contribution/contribution.md rename to proj/.github/ISSUE_TEMPLATE.md diff --git a/proj/.travis.yml b/proj/.travis.yml new file mode 100644 index 0000000..a5815bc --- /dev/null +++ b/proj/.travis.yml @@ -0,0 +1,45 @@ +language: generic +sudo: required +dist: trusty + +env: + matrix: + - ARCH=armv6 + - ARCH=x86 + +services: + - docker + +branches: + only: + - master + - develop + - "/^\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/" + +install: true + +script: + - make mk-image ARCH=$ARCH + - make mk-deployment VERSION=$TRAVIS_TAG + +deploy: + - provider: script + script: make pushtohub USER=$DOCKER_USER PASS=$DOCKER_PASS ARCH=$ARCH TAG=$TRAVIS_BRANCH + on: + all_branches: true + condition: "$TRAVIS_BRANCH =~ ^master|develop$" + + - provider: script + script: make pushtohub USER=$DOCKER_USER PASS=$DOCKER_PASS ARCH=$ARCH TAG=$TRAVIS_TAG + on: + tags: true + all_branches: true + + - provider: releases + prerelease: true + skip_cleanup: true + file_glob: true + file: "./*.zip" + on: + tags: true + all_branches: true diff --git a/proj/LICENSE.md b/proj/LICENSE.md new file mode 100644 index 0000000..e94469a --- /dev/null +++ b/proj/LICENSE.md @@ -0,0 +1,12 @@ + + +The MIT License (MIT) + +Copyright (c) 2017 MatchboxLab + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/proj/Makefile b/proj/Makefile new file mode 100644 index 0000000..8761857 --- /dev/null +++ b/proj/Makefile @@ -0,0 +1,55 @@ +GITBOOK = $(CURDIR)/gitbook +DOCS = $(CURDIR)/docs +IMAGE_ENV = $(CURDIR)/image +DF = $(IMAGE_ENV)/Dockerfile +DEPLOYMENT = $(CURDIR)/deployment +OWNER = [OWNER] +REPO = [REPO] +VERSION = test + +.PHONY: mk-book clean-book +mk-book: $(GITBOOK) + gitbook build $(GITBOOK) $(DOCS) + +clean-book: + rm -rf $(DOCS)/* + +.PHONY: mk-image clean-image +mk-image: + docker run --rm --privileged multiarch/qemu-user-static:register --reset + docker build -t $(OWNER)/$(REPO)-$(ARCH):$(VERSION) -f $(DF)-$(ARCH) $(IMAGE_ENV) + +clean-image: + docker rmi $(OWNER)/$(REPO)-$(ARCH):$(VERSION) + + +.PHONY: mk-deployment clean-deployment + +DEPLOYMENT_x86=$(DEPLOYMENT)/imageAPI-x86 +DEPLOYMENT_armv6=$(DEPLOYMENT)/imageAPI-armv6 + +mk-deployment-x86: $(DEPLOYMENT_x86) + mkdir $(REPO)-imageAPI-x86 + cp $(DEPLOYMENT_x86)/docker-compose.yml $(DEPLOYMENT_x86)/temp.env $(DEPLOYMENT_x86)/Makefile $(REPO)-imageAPI-x86/ + sed -i s+VERSION=test.*+VERSION=$(VERSION)+g $(REPO)-imageAPI-x86/temp.env + zip -r $(REPO)-x86-$(VERSION).zip $(REPO)-imageAPI-x86 + rm -rf $(REPO)-imageAPI-x86 + +mk-deployment-armv6: $(DEPLOYMENT_armv6) + mkdir $(REPO)-imageAPI-armv6 + cp $(DEPLOYMENT_armv6)/docker-compose.yml $(DEPLOYMENT_armv6)/temp.env $(DEPLOYMENT_armv6)/Makefile $(REPO)-imageAPI-armv6/ + sed -i s+VERSION=test.*+VERSION=$(VERSION)+g $(REPO)-imageAPI-armv6/temp.env + zip -r $(REPO)-armv6-$(VERSION).zip $(REPO)-imageAPI-armv6 + rm -rf $(REPO)-imageAPI-armv6 + +mk-deployment: mk-deployment-x86 mk-deployment-armv6 + +clean-deployment: $(REPO)-*-$(VERSION).zip + rm $(REPO)-*-$(VERSION).zip + + +.PHONY: pushtohub +pushtohub: + docker tag $(OWNER)/$(REPO)-$(ARCH) $(OWNER)/$(REPO)-$(ARCH):$(TAG) + docker login -u $(USER) -p $(PASS) + docker push $(OWNER)/$(REPO)-$(ARCH):$(TAG) diff --git a/proj/README.md b/proj/README.md new file mode 100644 index 0000000..c68a06e --- /dev/null +++ b/proj/README.md @@ -0,0 +1,47 @@ +

+ +

+ +

Project Title

+

+ One Paragraph of project description goes here +

+
+ +[![GitHub release](https://img.shields.io/github/release/[OWNER]/[REPO].svg)](https://github.com/[OWNER]/[REPO]/releases) +![Github All Releases](https://img.shields.io/github/downloads/[OWNER]/[REPO]/total.svg) +x86: [![Docker Pulls](https://img.shields.io/docker/pulls/[OWNER]/[REPO]-x86.svg)](https://hub.docker.com/r/[OWNER]/[REPO]-x86/tags/) +armv6: [![Docker Pulls](https://img.shields.io/docker/pulls/[OWNER]/[REPO]-x86.svg)](https://hub.docker.com/r/[OWNER]/[REPO]-armv6/tags/) + +![Travis (.org) branch](https://img.shields.io/travis/[OWNER]/[REPO]/BRANCH.svg) +![GitHub](https://img.shields.io/github/license/[OWNER]/[REPO].svg) + +# Manual +More details got to the github page. + +# Logistics + +### Contributing + +Please read [CONTRIBUTING.md](https://github.com/[OWNER]/[REPO]/blob/master/.github/CONTRIBUTING.md) for contributing. +For details on our [code of conduct](https://github.com/[OWNER]/[REPO]/blob/master/.github/CODE_OF_CONDUCT.md), and the process for submitting pull requests to us. + +### Versioning + +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the tags on this repository + +### Authors + +* **AUTHOR** - *Initial work* - [AUTHOR](https://github.com/AUTHOR) + +See also the list of [contributors](https://github.com/[OWNER]/[REPO]/graphs/contributors) who participated in this project. + +### Acknowledgments + +See [Acknowledgments](https://github.com/[OWNER]/[REPO]/blob/master/.github/ACKNOWLEDGMENTS.md) + + +### License + +This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/[OWNER]/[REPO]/blob/master/LICENSE.md) file for details + diff --git a/build_release.sh b/proj/build_release.sh similarity index 100% rename from build_release.sh rename to proj/build_release.sh diff --git a/deployment/imageAPI-armv6/Makefile b/proj/deployment/imageAPI-armv6/Makefile similarity index 100% rename from deployment/imageAPI-armv6/Makefile rename to proj/deployment/imageAPI-armv6/Makefile diff --git a/deployment/imageAPI-armv6/docker-compose.yml b/proj/deployment/imageAPI-armv6/docker-compose.yml similarity index 100% rename from deployment/imageAPI-armv6/docker-compose.yml rename to proj/deployment/imageAPI-armv6/docker-compose.yml diff --git a/deployment/imageAPI-armv6/temp.env b/proj/deployment/imageAPI-armv6/temp.env similarity index 100% rename from deployment/imageAPI-armv6/temp.env rename to proj/deployment/imageAPI-armv6/temp.env diff --git a/deployment/imageAPI-x86/Makefile b/proj/deployment/imageAPI-x86/Makefile similarity index 100% rename from deployment/imageAPI-x86/Makefile rename to proj/deployment/imageAPI-x86/Makefile diff --git a/deployment/imageAPI-x86/docker-compose.yml b/proj/deployment/imageAPI-x86/docker-compose.yml similarity index 100% rename from deployment/imageAPI-x86/docker-compose.yml rename to proj/deployment/imageAPI-x86/docker-compose.yml diff --git a/deployment/imageAPI-x86/temp.env b/proj/deployment/imageAPI-x86/temp.env similarity index 100% rename from deployment/imageAPI-x86/temp.env rename to proj/deployment/imageAPI-x86/temp.env diff --git a/gitbook/README.md b/proj/gitbook/README.md similarity index 100% rename from gitbook/README.md rename to proj/gitbook/README.md diff --git a/gitbook/SUMMARY.md b/proj/gitbook/SUMMARY.md similarity index 100% rename from gitbook/SUMMARY.md rename to proj/gitbook/SUMMARY.md diff --git a/gitbook/contribution/faq.md b/proj/gitbook/contribution/contribution.md similarity index 100% rename from gitbook/contribution/faq.md rename to proj/gitbook/contribution/contribution.md diff --git a/gitbook/dev/cibuild.md b/proj/gitbook/contribution/faq.md similarity index 100% rename from gitbook/dev/cibuild.md rename to proj/gitbook/contribution/faq.md diff --git a/gitbook/dev/localbuild.md b/proj/gitbook/dev/cibuild.md similarity index 100% rename from gitbook/dev/localbuild.md rename to proj/gitbook/dev/cibuild.md diff --git a/gitbook/dev/setdevenv.md b/proj/gitbook/dev/localbuild.md similarity index 100% rename from gitbook/dev/setdevenv.md rename to proj/gitbook/dev/localbuild.md diff --git a/gitbook/qs/deployment.md b/proj/gitbook/dev/setdevenv.md similarity index 100% rename from gitbook/qs/deployment.md rename to proj/gitbook/dev/setdevenv.md diff --git a/gitbook/qs/prerequisite.md b/proj/gitbook/qs/deployment.md similarity index 100% rename from gitbook/qs/prerequisite.md rename to proj/gitbook/qs/deployment.md diff --git a/proj/gitbook/qs/prerequisite.md b/proj/gitbook/qs/prerequisite.md new file mode 100644 index 0000000..e69de29 diff --git a/image/Dockerfile-armv6 b/proj/image/Dockerfile-armv6 similarity index 100% rename from image/Dockerfile-armv6 rename to proj/image/Dockerfile-armv6 diff --git a/image/Dockerfile-x86 b/proj/image/Dockerfile-x86 similarity index 100% rename from image/Dockerfile-x86 rename to proj/image/Dockerfile-x86 diff --git a/set_docker_account b/proj/set_docker_account similarity index 100% rename from set_docker_account rename to proj/set_docker_account diff --git a/set_owner_repo b/proj/set_owner_repo similarity index 100% rename from set_owner_repo rename to proj/set_owner_repo diff --git a/proj/set_release_api_key b/proj/set_release_api_key new file mode 100755 index 0000000..3fdee0f --- /dev/null +++ b/proj/set_release_api_key @@ -0,0 +1,2 @@ +#! /bin/bash +travis encrypt $1 --add deploy.api_key