-
-
Notifications
You must be signed in to change notification settings - Fork 127
/
README.yaml
139 lines (111 loc) · 4.67 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: 🧗 Build Harness
# Logo for this project
#logo: docs/logo.png
# 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
# Badges to display
badges:
- name: "Build Status"
image: "https://img.shields.io/github/actions/workflow/status/cloudposse/build-harness/docker.yml?style=for-the-badge"
url: "https://github.com/cloudposse/build-harness/actions/workflows/docker.yml"
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/build-harness.svg?style=for-the-badge"
url: "https://github.com/cloudposse/build-harness/releases/latest"
- name: "Last Updated"
image: https://img.shields.io/github/last-commit/cloudposse/build-harness/master?style=for-the-badge
url: https://github.com/cloudposse/build-harness/commits/master/
- name: "Slack Community"
image: "https://slack.cloudposse.com/for-the-badge.svg"
url: "https://slack.cloudposse.com"
related:
- name: "Packages"
description: "Cloud Posse installer and distribution of native apps"
url: "https://github.com/cloudposse/packages"
- name: "Atmos"
description: "DevOps Automation Tool"
url: "https://github.com/cloudposse/atmos"
# 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: "docs/demo.gif?raw=true"
# Short description of this project
description: |-
This `build-harness` is a collection of Makefiles to facilitate building READMEs, Golang projects, Dockerfiles, Helm charts, and more.
It's designed to work with CI/CD systems such as GitHub Actions.
# Introduction to the project
#introduction: |-
# This is an introduction.
# How to use this project
usage: |-
> [!IMPORTANT]
> **Regarding the phase out of `git.io`**
> Prior to April 25, 2022, practically all Cloud Posse Makefiles pulled in a common Makefile via
> ```bash
> curl -sSL -o .build-harness "https://git.io/build-harness"
> ```
>
> The `git.io` service is a link shortener/redirector provided by GitHub, but [they no longer support it](https://github.blog/changelog/2022-04-25-git-io-deprecation/).
> We have therefore set up `https://cloudposse.tools/build-harness` as an alternative and are migrating
> all our Makefiles to use that URL instead. We encourage you to update any references you have in your
> own code derived from our code, whether by forking one of our repos or simply following one of our examples.
>
> Full details are available in our [`git.io` deprecation documentation](docs/git-io-deprecation.md).
At the top of your `Makefile` add, the following...
```make
-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)
```
This will download a `Makefile` called `.build-harness` and include it at run time. We recommend adding the `.build-harness` file to your `.gitignore`.
This automatically exposes many new targets that you can leverage throughout your build & CI/CD process.
Run `make help` for a list of available targets.
**NOTE:** the `/` is interchangable with the `:` in target names
## GitHub Actions
The `build-harness` is compatible with [GitHub Actions](https://github.com/features/actions).
Here's an example of running `make readme/lint`
```yaml
name: build-harness/readme/lint
on: [pull_request]
jobs:
build:
name: 'Lint README.md'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: cloudposse/build-harness@master
with:
entrypoint: /usr/bin/make
args: readme/lint
```
# Example usage
examples: |-
Here is a real world example:
- [`terraform-null-label`](https://github.com/cloudposse/terraform-null-label/) - A terraform module that leverages `terraform/%` targets
# How to get started quickly
quickstart: |-
Here's how to get started...
1. `git clone https://github.com/cloudposse/build-harness.git` to pull down the repository
2. `make init` to initialize the [`build-harness`](https://github.com/cloudposse/build-harness/)
# Other files to include in this README from the project folder
include:
- "docs/targets.md"
- "docs/extensions.md"
- "docs/auto-init.md"
# Include contributors to this project
contributors: []