From 6526365ef15097cd095f8d26ab639922279843f0 Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Fri, 6 Jul 2018 15:28:57 -0700 Subject: [PATCH] Add Additional Readme Sections (#74) * Add demo screenshot * references * add copyrights * Use https --- README.md | 25 +++++++++++++++++++++++-- README.yaml | 18 ++++++++++++++++++ docs/demo.svg | 5 +++++ templates/README.md | 28 ++++++++++++++++++++++++++-- 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 docs/demo.svg diff --git a/README.md b/README.md index 094d7986..85176eb5 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,13 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE). +## Screenshots + + +![demo](https://cdn.rawgit.com/cloudposse/build-harness/master/docs/demo.svg) +*Example of using the `build-harness` to build a docker image* + + ## Usage At the top of your `Makefile` add, the following... @@ -144,6 +151,15 @@ Check out these related projects. - [Dev Harness](https://github.com/cloudposse/dev) - Cloud Posse Local Development Harness + + +## References + +For additional context, refer to some of these links. + +- [Wikipedia - Test Harness](https://en.wikipedia.org/wiki/Test_harness) - The `build-harness` is similar in concept to a "Test Harness" + + ## Help **Got a question?** @@ -191,9 +207,14 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. **NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! -## Copyright -Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com) + +## Copyrights + +Copyright © 2016-2018 [Cloud Posse, LLC](https://cloudposse.com) + + + ## License diff --git a/README.yaml b/README.yaml index 4e08cb49..10eb504b 100644 --- a/README.yaml +++ b/README.yaml @@ -13,6 +13,12 @@ name: Build Harness # License of this project license: "APACHE2" +# Copyrights +copyrights: + - name: "Cloud Posse, LLC" + url: "https://cloudposse.com" + year: "2016" + # Canonical GitHub repo github_repo: cloudposse/build-harness @@ -35,6 +41,18 @@ related: - name: "Dev Harness" description: "Cloud Posse Local Development Harness" url: "https://github.com/cloudposse/dev" + +# References +references: + - name: "Wikipedia - Test Harness" + description: 'The `build-harness` is similar in concept to a "Test Harness"' + url: "https://en.wikipedia.org/wiki/Test_harness" + +# Screenshots +screenshots: + - name: "demo" + description: "Example of using the `build-harness` to build a docker image" + url: "https://cdn.rawgit.com/cloudposse/build-harness/master/docs/demo.svg" # Short description of this project description: |- diff --git a/docs/demo.svg b/docs/demo.svg new file mode 100644 index 00000000..510388ee --- /dev/null +++ b/docs/demo.svg @@ -0,0 +1,5 @@ + +sh-3.2$  sh-3.2$ m sh-3.2$ ma sh-3.2$ mak sh-3.2$ make sh-3.2$ make  sh-3.2$ make i sh-3.2$ make in sh-3.2$ make ini sh-3.2$ make init  Receiving objects:   0% (1/659)   Receiving objects:   4% (27/659)   Receiving objects:   5% (33/659)   Receiving objects:  13% (86/659)   Receiving objects:  17% (113/659)   Receiving objects:  18% (119/659)   Receiving objects:  19% (126/659)   Receiving objects:  26% (172/659)   Receiving objects:  27% (178/659)   Receiving objects:  35% (231/659)   Receiving objects:  57% (376/659)   Receiving objects:  85% (554/659)   Resolving deltas:  16% (54/329)   Resolving deltas:  54% (178/329)    Resolving deltas:  98% (323/329)   sh-3.2$ make h sh-3.2$ make he sh-3.2$ make hel sh-3.2$ make help sh-3.2$ make help/ sh-3.2$ make help/a sh-3.2$ make help/al sh-3.2$ make help/all sh-3.2$ make initRemoving existing build-harnessCloning https://github.com/cloudposse/build-harness.git#master...Cloning into 'build-harness'...remote: Counting objects: 659, done.                                                                                remote: Compressing objects: 100% (2/2), done.                                                                      remote: Total 659 (delta 0), reused 0 (delta 0), pack-reused 657                                                    Receiving objects: 100% (659/659), 137.73 KiB | 1.79 MiB/s, done.Resolving deltas: 100% (329/329), done.sh-3.2$ make help/allAvailable targets:  aws/install                         Install aws cli bundle  bash/lint                           Lint all bash scripts  chamber/install                     Install chamber  clean                               Clean build-harness  codefresh/trigger/webhook           Trigger a CodeFresh WebHook  docker/build                        Build docker image  docker/login                        Login into docker hub  docs/copyright-add                  Add copyright headers to source code  geodesic/deploy                     Run a Jenkins Job to Deploy $(APP) with $(CANONICAL_TAG)  git/aliases-update                  Update git aliases  git/export                          Export git vars  git/show                            Show vars  git/submodules-update               Update submodules  github/download-private-release     Download release from github  github/download-public-release      Download release from github  go/build                            Build binary  go/build-all                        Build binary for all platforms  go/clean                            Clean compiled binary  go/clean-all                        Clean compiled binary and dependency  go/deps                             Install dependencies  go/deps-build                       Install dependencies for build  go/deps-dev                         Install development dependencies  go/fmt                              Fo   go/fmt                              Format code according to Golang convention  go/install                          Install cli  go/lint                             Lint code  go/test                             Run tests  go/vet                              Vet code  helm/chart/build                    Build chart $CHART_NAME from $CHART_TPL  helm/chart/build-all                Build chart $CHART_NAME from $CHART_TPL for all available $SEMVERSIONS  helm/chart/clean                    Clean chart packages  helm/chart/create                   Create chart $CHART from starter scaffold  helm/chart/publish                  Publish chart $CHART_NAME to $REPO_GATEWAY_ENDPOINT  helm/chart/starter/fetch            Fetch starter  helm/chart/starter/remove           Remove starter  helm/chart/starter/update           Update starter  helm/delete/failed                  Delete al   helm/delete/failed                  Delete all failed releases in a `NAMESPACE` subject to `FILTER`  helm/delete/namespace               Delete all releases in a `NAMEPSACE` as well as the namespace  helm/install                        Install helm  helm/repo/add                       Add $REPO_NAME from $REPO_ENDPOINT  helm/repo/add-current               Add helm remote dev repos  helm/repo/add-remote                Add helm remote repos  helm/repo/build                     Build repo  helm/repo/clean                     Clean helm repo  helm/repo/fix-perms                 Fix repo filesystem permissions  helm/repo/info                      Show repo info  helm/repo/lint                      Lint charts  helm/repo/update                    Update repo info  helm/serve/index                    Build index for serve helm charts  helm/toolbox/upsert                 Install or    helm/toolbox/upsert                 Install or upgrade helm tiller   helmfile/install                    Install helmfile  help                                This help screen  help/all                            Display help for all targets  init                                Init build-harness  jenkins/run-job-with-tag            Run a Jenkins Job with $(TAG)  make/lint                           Lint all makefiles  packages/delete                     Delete packages  packages/install                    Install packages   packages/install/%                  Install package (e.g. helm, helmfile, kubectl)  packages/reinstall                  Reinstall packages  packages/uninstall/%                Uninstall package (e.g. helm, helmfile, kubectl)  readme                              Alias for readme/build  readme/build                        Create README.md by building it from    readme/build                        Create README.md by building it from README.yaml  readme/init                         Create basic minimalistic .README.md template file  readme/lint                         Verify the `README.md` is up to date  semver/export                       Export semver vars  semver/show                         Show  stages/export                       Export stages vars  template/build                      Create $OUT file by building it from $IN template file  template/deps                       Install dependencies  terraform/get-modules               Ensure all modules can be fetched  terraform/get-plugins               Ensure all plugins can be fetched  terraform/install                   Install terraform  terraform/lint                      Lint check Terraform  terraform/validate                  Basic terraform sanity check  travis/docker-login                 Login  sh-3.2$ make d sh-3.2$ make do sh-3.2$ make doc sh-3.2$ make dock sh-3.2$ make docke sh-3.2$ make docker sh-3.2$ make docker/ sh-3.2$ make docker/b sh-3.2$ make docker/bu sh-3.2$ make docker/bui sh-3.2$ make docker/buil   travis/docker-login                 Login into docker hub  travis/docker-tag-and-push          Tag & Push according Travis environment variablessh-3.2$ make docker/build sh-3.2$ make docker/buildSending build context to Docker daemon  557.1kBSending build context to Docker daemon  1.114MBSending build context to Docker daemon  1.671MBSending build context to Docker daemon  2.228MBSending build context to Docker daemon  2.785MBSending build context to Docker daemon  3.342MBSending build context to Docker daemon  3.899MBSending build context to Docker daemon  4.456MBSending build context to Docker daemon  5.014MBBuilding cloudposse/geodesic:dev from ./Dockerfile with [] build args...Sending build context to Docker daemon  5.571MBSending build context to Docker daemon  6.508MBStep 1/75 : ARG PACKAGES_IMAGE=cloudposse/packages:0.2.9Step 2/75 : FROM ${PACKAGES_IMAGE} as packages ---> 36c512debd94Step 3/75 : WORKDIR /packages ---> Using cache ---> 41c00ad5bb94Step 4/75 : ARG PACKAGES="awless aws-vault cfssl cfssljson chamber fetch github-commenter gomplate goofys helm helmfile kops kubectl kubectx kubens sops stern terraform terragrunt yq" ---> 52692c61dda8Step 5/75 : ENV PACKAGES=${PACKAGES} Step 5/75 : ENV PACKAGES=${PACKAGES} ---> 35befd70a00dStep 6/75 : RUN make dist ---> 9ca4d9ab1a6bStep 7/75 : FROM alpine:3.7 ---> 3fd9065eaf02Step 8/75 : ENV BANNER "geodesic" ---> de6ab55241c8Step 9/75 : ENV CACHE_PATH=/localhost/.geodesic ---> 2d77b18bd5a5Step 10/75 : ENV GEODESIC_PATH=/usr/local/include/toolbox ---> 698ee1cdfa64Step 11/75 : ENV MOTD_URL=http://geodesic.sh/motd ---> 428938a91a86Step 12/75 : ENV HOME=/conf ---> 18108e8d5650Step 13/75 : ENV KOPS_CLUSTER_NAME=example.foo.bar ---> f500c952ece6Step 14/75 : USER root ---> b41e881f42c3Step 15/75 : ARG APK_PACKAGES="unzip curl tar python make bash vim jq figlet openssl openssh-client sshpass                  iputils drill gcc libffi-dev python-dev musl-dev ncurses openssl-dev py-pip py-virtualenv                  git coreutils less groff bash-completion fuse syslog-ng libc6-compat util-linux" ---> df3216b629d5Step 16/75 : ENV APK_PACKAGES=${APK_PACKAGES} ---> 1e03c8f4f07aStep 17/75 : RUN apk update     && apk add ${APK_PACKAGES}     && mkdir -p /etc/bash_completion.d/ /etc/profile.d/     && mkdir -p /conf     && touch /conf/.gitconfig ---> a427e1725362Step 18/75 : RUN echo "net.ipv6.conf.all.disab Step 18/75 : RUN echo "net.ipv6.conf.all.disable_ipv6=0" > /etc/sysctl.d/00-ipv6.conf ---> 28a233f22dafStep 19/75 : RUN echo 'set noswapfile' >> /etc/vim/vimrc ---> 7fdfae3397feStep 20/75 : WORKDIR /tmp ---> cf1555f85e32Step 21/75 : COPY --from=packages /dist/ /usr/local/bin/ ---> 4dfc1be54d0aStep 23/75 : ENV AWS_VAULT_ASSUME_ROLE_TTL=1h ---> b9e7e25aa69aStep 24/75 : ENV KUBERNETES_VERSION 1.9.1 ---> 0612647accd4Step 25/75 : ENV KUBECONFIG=${SECRETS_PATH}/kubernetes/kubeconfig ---> ee29a0575512Step 26/75 : RUN kubectl completion bash > /etc/bash_completion.d/kubectl.sh ---> a52f85405b78Step 27/75 : ENV KOPS_STATE_STORE s3://undefined ---> 3b5877cb698fStep 28/75 : ENV KOPS_STATE_STORE_REGION us-east-1 ---> 85deb3d80879Step 29/75 : ENV KOPS_FEATURE_FLAGS=+DrainAndValidateRollingUpdate ---> 3080fa0586d9Step 30/75 : ENV KOPS_MANIFEST=/conf/kops/manifest.yaml ---> fdac1947dcb7Step 31/75 : ENV KOPS_TEMPLATE=/templates/kops/default.yaml ---> 30b8e4b99258Step 32/75 : ENV KOPS_BASE_IMAGE=kope.io/k8s-1.9-d  ---> 9142fcbf7578Step 33/75 : ENV KOPS_BASTION_PUBLIC_NAME="bastion" ---> 3c3af8bf1858Step 34/75 : ENV KOPS_PRIVATE_SUBNETS="172.20.32.0/19,172.20.64.0/19,172.20.96.0/19,172.20.128.0/19" ---> b98e3601e301Step 35/75 : ENV KOPS_UTILITY_SUBNETS="172.20.0.0/22,172.20.4.0/22,172.20.8.0/22,172.20.12.0/22" ---> 9bb5f0e815c5Step 36/75 : ENV KOPS_AVAILABILITY_ZONES="us-west-2a,us-west-2b,us-west-2c" ---> 67ab80ce91edStep 37/75 : ENV KUBECONFIG=/dev/shm/kubecfg ---> 424d547f014cStep 38/75 : RUN /usr/local/bin/kops completion bash > /etc/bash_completion.d/kops.sh ---> 6250088b9fa5Step 39/75 : ENV BASTION_MACHINE_TYPE "t2.medium" ---> ec2845158b72Step 40/75 : ENV MASTER_MACHINE_TYPE "t2.medium" ---> bb8d416ee170Step 41/75 : ENV NODE_MACHINE_TYPE "t2.medium" --  ---> 687e35f95f48Step 42/75 : ENV NODE_MAX_SIZE 2 ---> 0b82bbabba19Step 43/75 : ENV NODE_MIN_SIZE 2 ---> a26fd2d30008Step 44/75 : ENV HELM_HOME /var/lib/helm ---> 4826c35cd9f8Step 45/75 : ENV HELM_VALUES_PATH=${SECRETS_PATH}/helm/values ---> 5f4f316e37aaStep 46/75 : RUN helm completion bash > /etc/bash_completion.d/helm.sh     && mkdir -p ${HELM_HOME}     && helm init --client-only     && mkdir -p ${HELM_HOME}/plugins ---> 020ac9774808Step 47/75 : RUN helm repo add cloudposse-incubator https://charts.cloudposse.com/incubator/     && helm repo add incubator  https://kubernetes-charts-incubator.storage.googleapis.com/     && helm repo add coreos-stable https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/     && helm repo update ---> 8367c0bc3dbbStep 48/75 : ENV HELM_APPR_VERSION 0.7.0 ---> c60f71d04a31Step 49/75 : ENV HELM_EDIT_VERSION 0.2.0 --->   ---> fc19c13efaa0Step 50/75 : ENV HELM_GITHUB_VERSION 0.2.0 ---> e3e34bc6c644Step 51/75 : ENV HELM_SECRETS_VERSION 1.2.9 ---> 2443075f9b9aStep 52/75 : RUN helm plugin install https://github.com/app-registry/appr-helm-plugin --version v${HELM_APPR_VERSION}     && helm plugin install https://github.com/mstrzele/helm-edit --version v${HELM_EDIT_VERSION}     && helm plugin install https://github.com/futuresimple/helm-secrets --version ${HELM_SECRETS_VERSION}     && helm plugin install https://github.com/sagansystems/helm-github --version ${HELM_GITHUB_VERSION} ---> 9106c64157c4Step 53/75 : ENV PACKER_VERSION 1.1.1 ---> 23883c2e4892Step 54/75 : RUN curl --fail -sSL -O https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip     && unzip packer_${PACKER_VERSION}_linux_amd64.zip     && rm packer_${PACKER_VERSION}_linux_amd64.zip     && mv packer /usr/local/bin ---> Usi  ---> 0c96379d8bcdStep 55/75 : ENV ANSIBLE_VERSION 2.4.1.0 ---> 430c4be5f22cStep 56/75 : ENV JINJA2_VERSION 2.10 ---> 58004ffe22f8Step 57/75 : RUN pip install ansible==${ANSIBLE_VERSION} boto Jinja2==${JINJA2_VERSION} &&     rm -rf /root/.cache &&     find / -type f -regex '.*\.py[co]' -delete ---> 43c267f04436Step 58/75 : ENV GCLOUD_SDK_VERSION=179.0.0 ---> 8321312a66ecStep 59/75 : RUN curl --fail -sSL -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCLOUD_SDK_VERSION}-linux-x86_64.tar.gz &&     tar -zxf google-cloud-sdk-${GCLOUD_SDK_VERSION}-linux-x86_64.tar.gz &&     mv google-cloud-sdk /usr/local/ &&     /usr/local/google-cloud-sdk/install.sh --quiet --rc-path /etc/bash_completion.d/gcloud.sh &&     rm -rf google-cloud-sdk-${GCLOUD_SDK_VERSION}-linux-x86_64.tar.gz &&     rm -rf /root/.config/ &&     ln -s /usr/local/google-cloud-sdk/bin/gcloud /usr/local/bin/ &&     ln - ig/ &&     ln -s /usr/local/google-cloud-sdk/bin/gcloud /usr/local/bin/ &&     ln -s /usr/local/google-cloud-sdk/bin/gsutil /usr/local/bin/ &&     ln -s /usr/local/google-cloud-sdk/bin/bq /usr/local/bin/ ---> d1b274bf2d04Step 60/75 : ENV AWS_DATA_PATH=/localhost/.aws/ ---> c323584e67d4Step 61/75 : ENV AWS_CONFIG_FILE=/localhost/.aws/config ---> df6c54ef7dc6Step 62/75 : ENV AWSEBCLI_VERSION 3.12.0 ---> 2c855b313156Step 63/75 : RUN pip install awsebcli==${AWSEBCLI_VERSION} &&     rm -rf /root/.cache &&     find / -type f -regex '.*\.py[co]' -delete ---> 9f39c38fc3aeStep 64/75 : ENV AWSCLI_VERSION 1.11.185 ---> d150c186e14cStep 65/75 : RUN pip install awscli==${AWSCLI_VERSION} &&     rm -rf /root/.cache &&     find / -type f -regex '.*\.py[co]' -delete &&     ln -s /usr/local/aws/bin/aws_bash_completer /etc/bash_completion.d/aws.sh &&     ln -s /usr/local/aws/bin/aws_completer /usr/local/bin/ ---> f1d5ac93757aStep 66/75 : ENV HISTFILE=  ---> fd1cdf42ee56Step 67/75 : ENV SHELL=/bin/bash ---> 3175bff4cf43Step 68/75 : ENV LESS=-Xr ---> a34dffd9027cStep 69/75 : ENV XDG_CONFIG_HOME=${CACHE_PATH} ---> e02692ed9ed3Step 70/75 : ENV SSH_AGENT_CONFIG=/var/tmp/.ssh-agent ---> 89fa54467da2Step 71/75 : VOLUME ["${CACHE_PATH}"] ---> 85dc4236eb89Step 72/75 : COPY rootfs/ / ---> bdcc4c04a12bStep 73/75 : WORKDIR /conf ---> 8be9a1f13570Step 74/75 : ENTRYPOINT ["/bin/bash"] ---> 76cf37e45e26Step 75/75 : CMD ["-c", "bootstrap"] ---> f3618989ff57Successfully built f3618989ff57sh-3.2$ make r sh-3.2$ make re sh-3.2$ make rea sh-3.2$ make read sh-3.2$ make readm Successfully tagged cloudposse/geodesic:devsh-3.2$ make readme sh-3.2$ make readmeGenerated README.md from /Users/erik/Dev/cloudposse/geodesic/build-harness/templates/README.md using data from /Users/erik/Dev/cloudposse/geodesic/build-harness/templates/README.yamlsh-3.2$ exit \ No newline at end of file diff --git a/templates/README.md b/templates/README.md index d6eced98..313256c3 100644 --- a/templates/README.md +++ b/templates/README.md @@ -22,9 +22,15 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE). {{ if eq (ds "config").license "CC-BY-NC-SA-4.0" }} It's 100% Open Source and licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](LICENSE). - + {{ end }} +{{ if has (ds "config") "screenshots" }} +## Screenshots + +{{ range $screenshot := (ds "config").screenshots }} +{{ printf "![%s](%s)\n*%s*" $screenshot.name $screenshot.url $screenshot.description }}{{ end }} +{{ end }} {{ if has (ds "config") "usage" }} ## Usage @@ -56,6 +62,15 @@ Check out these related projects. {{ range $related := (ds "config").related }} {{ printf "- [%s](%s) - %s" $related.name $related.url $related.description }}{{ end }} +{{ end}} +{{ if has (ds "config") "references" }} + +## References + +For additional context, refer to some of these links. +{{ range $reference := (ds "config").references }} +{{ printf "- [%s](%s) - %s" $reference.name $reference.url $reference.description }}{{ end }} + {{ end}} ## Help @@ -104,9 +119,18 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. **NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! +{{ if has (ds "config") "copyrights" }} + +## Copyrights + +{{ range $copyright := (ds "config").copyrights -}} +{{ printf "Copyright © %s-%d [%s](%s)\n" $copyright.year time.Now.Year $copyright.name $copyright.url }} +{{ end }} +{{ else }} ## Copyright Copyright © 2017-{{ time.Now.Year }} [Cloud Posse, LLC](https://cloudposse.com) +{{ end}} {{ if eq (ds "config").license "APACHE2" }} ## License @@ -139,7 +163,7 @@ See [LICENSE](LICENSE) for full details. -This material may only be distributed subject to the terms and conditions set forth in the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License or later with the restrictions noted below (the latest version of the license is presently available at ). +This material may only be distributed subject to the terms and conditions set forth in the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License or later with the restrictions noted below (the latest version of the license is presently available at ). **Attribution** You must attribute the work in the manner specified by the author or licensor.