-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * fix: token recognition error at: 'FUNCTION' * fix: bash earthfile * fix: update earthfile * fix: command to function * fix: token issue * Add files via upload * Update Earthfile * fix: change to correct earthfile * Update go.sum * Update go.mod * Update go.mod * Update go.mod * Update go.mod * Update go.sum * Update action.yml * Update action.yml * Update action.yml * Update run.yml * Update action.yml * Update ci.yml * Update action.yml * Update run.yml * Update pages.yml * Update release.yml * Update publish.yml * Update deploy.yml * Update go.mod * Update Earthfile * Update Earthfile * fix: update ast go version * Update project.dic * Update go.mod * Update go.sum * Update Earthfile * Update Earthfile * Update earthfile.go * Update earthfile.go * Update earthfile.go * Update earthfile.go * Update earthfile.go * Update earthly_parser.go * Update earthfile.go * Update go.mod * Update go.mod * Update go.mod * Update go.mod * Update earthfile.go * Update earthly_parser.go * Update Earthfile * Update go.sum * Revert "fix: update ast go version" This reverts commit 9a4c484. * fix: update go dependency * fix: update earthfile struct * fix: branch name typo * fix: clean ci-lint go cache * fix: remove clean cache * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * fix: edit COMMAND to FUNCTION * update: deprecation of UDCs in Earthly 0.8 * fix: trailing spaces * fix: style * fix: styling * fix: edited DO to RUN for function calling * fix: update consolidate checking script * fix: added edit-docs back to the script * fix: added full stop to line 108 * fix: change RUN back to DO at line 87 * fix: deleted check and comment * fix: added warning for deprecation of UDCs at line 159 * fix: moved warning to line 77 and pasted Blue's version * fix: edited formatting * fix: added blank line * fix: formatting revision * fix: update branch name and replace udc in doc * fix: update udc and branch name * fix: reroll UDC change * fix: change UDC back to Function * fix: change branch name to fdcDeprecation * fix: linting error * fix: linting error * fix: linting error * fix: linting error * fix: trailing spaces at line 37 * fix: RUN to DO * fix: required value for a flag missing * fix: deleted --dot * fix: cannot execute command * fix: grammatical error * fix: edited Function target to Function * fix: changed file name from udc.md to function.md * fix: renamed branch to master * fix: true to false --------- Co-authored-by: vasapornchaiyakul <134899205+vasapornchaiyakul@users.noreply.github.com> Co-authored-by: bkioshn <35752733+bkioshn@users.noreply.github.com> Co-authored-by: bkioshn <bkioshn@gmail.com>
- Loading branch information
1 parent
01fc0c8
commit c770647
Showing
30 changed files
with
142 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Functions | ||
|
||
## Overview | ||
|
||
The Catalyst CI repository provides a number of Earthly | ||
[Functions](https://docs.earthly.dev/docs/guides/functions). | ||
You can think of a Function as a reusable snippet of Earthly code that serves the same purpose as functions in a common programming | ||
language. | ||
Functions are helpful for several reasons: | ||
|
||
1. They keep Earthfiles DRY | ||
2. They can encapsulate complex logic into a simple contractual interface | ||
3. They enforce standardization and prevent solving the same problem in multiple different ways | ||
|
||
The third reason is particularly useful for Catalyst as we have multiple repositories with dozens of Earthfiles often solving | ||
similar problems. | ||
|
||
## Usage | ||
|
||
You are highly encouraged to review the currently available Functions in the | ||
[Catalyst CI repository](https://github.com/input-output-hk/catalyst-ci/tree/master/earthly). | ||
The folder structure is broken out by language/technology and should be relatively easy to navigate. | ||
You can incorporate these Functions into your Earthfiles by using something like below: | ||
|
||
```Earthfile | ||
DO github.com/input-output-hk/catalyst-ci/earthly/<folder>+<Function_NAME> --arg1=value1 | ||
``` | ||
|
||
Replacing `folder` and `Function_NAME` respectively. | ||
The passing of an argument is optional, as some Functions do not require any input arguments. | ||
|
||
## Contributing | ||
|
||
Please feel encouraged to contribute Functions to the repository. | ||
If you're seeing the same logic being re-used across multiple Earthfiles in a | ||
repository, this is a good candidate for refactoring into a Function. | ||
Additionally, for SMEs who are aware of language best practices, encoding those | ||
into a Function will help increase the overall health of the CI process. |
Oops, something went wrong.