github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/tools/README.md (about)

     1  # Weaveworks Build Tools
     2  
     3  Included in this repo are tools shared by weave.git and scope.git.  They include
     4  
     5  - ```bazel-rules```: Bazel build rules used in our projects
     6  - ```build```: a set of docker base-images for building weave
     7    projects. These should be used instead of giving each project its
     8    own build image.
     9  - ```provisioning```: a set of Terraform scripts to provision virtual machines in GCP, AWS or Digital Ocean.
    10  - ```config_management```: a set of Ansible playbooks to configure virtual machines for development, testing, etc.
    11  - ```cover```: a tool which merges overlapping coverage reports generated by go
    12    test
    13  - ```files-with-type```: a tool to search directories for files of a given
    14    MIME type
    15  - ```lint```: a script to lint go, sh and hcl files; runs various tools like
    16    golint, go vet, errcheck, shellcheck etc
    17  - ```rebuild-image```: a script to rebuild docker images when their input files
    18    change; useful when you using docker images to build your software, but you
    19    don't want to build the image every time.
    20  - ```shell-lint```: a script to lint multiple shell files with 
    21    [shellcheck](http://www.shellcheck.net/)
    22  - ```socks```: a simple, dockerised SOCKS proxy for getting your laptop onto
    23    the Weave network
    24  - ```test```: a script to run all go unit tests in subdirectories, gather the
    25    coverage results, and merge them into a single report.
    26  - ```runner```: a tool for running tests in parallel; given each test is
    27    suffixed with the number of hosts it requires, and the hosts available are
    28    contained in the environment variable HOSTS, the tool will run tests in
    29    parallel, on different hosts.
    30  - ```scheduler```: an appengine application that can be used to distribute
    31    tests across different shards in CircleCI.
    32  
    33  ## Requirements
    34  
    35  - ```lint``` requires shfmt to lint sh files; get shfmt with
    36  ```
    37  curl -fsSLo shfmt https://github.com/mvdan/sh/releases/download/v1.3.0/shfmt_v1.3.0_linux_amd64
    38  chmod +x shfmt
    39  ```
    40    (we pin that version, and it doesn't build from the source repo any more)
    41  
    42  ## Using build-tools.git
    43  
    44  To allow you to tie your code to a specific version of build-tools.git, such
    45  that future changes don't break you, we recommendation that you [`git subtree`]()
    46  this repository into your own repository:
    47  
    48  [`git subtree`]: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/
    49  
    50  ```
    51  git subtree add --prefix tools https://github.com/weaveworks/build-tools.git master --squash
    52  ````
    53  
    54  To update the code in build-tools.git, the process is therefore:
    55  - PR into build-tools.git, go through normal review process etc.
    56  - Do `git subtree pull --prefix tools https://github.com/weaveworks/build-tools.git master --squash`
    57    in your repo, and PR that.
    58  
    59  ## <a name="help"></a>Getting Help
    60  
    61  If you have any questions about, feedback for or problems with `build-tools`:
    62  
    63  - Invite yourself to the <a href="https://slack.weave.works/" target="_blank">Weave Users Slack</a>.
    64  - Ask a question on the [#general](https://weave-community.slack.com/messages/general/) slack channel.
    65  - [File an issue](https://github.com/weaveworks/build-tools/issues/new).
    66  
    67  Your feedback is always welcome!