Skip to content

Helper function for creating Cirrus Tasks

License

Notifications You must be signed in to change notification settings

ararslan/helpers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helper function for creating Cirrus Tasks

Example

Here is an exmaple 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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published