Skip to content

cirrus-modules/helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helper function for creating Cirrus Tasks

Example

Here is an example of how helper function can be used for generating a golangci-lint task:

load("github.com/cirrus-modules/helpers", "task", "container", "script", "always", "artifacts")

def main(ctx):
    return [
        task(
            name="Lint",
            instance=container("golangci/golangci-lint:latest", cpu=1.0, memory=512),
            env={
                "STARLARK": True
            },
            instructions=[
                script("lint", "echo $STARLARK", "golangci-lint run -v --out-format json > golangci.json"),
                always(
                    artifacts("report", "golangci.json", type="text/json", format="golangci")
                )
            ]
        )
    ]

About

Helper function for creating Cirrus Tasks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6