#Is it possible to trigger separate parts of the pipeline from the Dagger CLI?

1 messages · Page 1 of 1 (latest)

median torrent
#

I'm trying to look into Dagger as a replacement for the content of multiple pipeline types we are using in our company.. Bitbucket-ci, Jenkins but mainly Gitlab-ci.

My company, Qteal, is mainly working in the Embedded SW world, doing mainly the Quality/Testing part.

It's a very common complaint from people in my company that they have to wait a very long time and push multiple changes to test if the pipeline they are developing is working in the CI itself.

Therefore I decided to look into some tools which would be suited for testing all these things localy, rather that having to always rely for the logic on the CI provider.

I've been demoing Dagger a little bit, experimenting, and all looks quite nice. It's still taking getting used to programming my pipelines, but it's a very nice changeup.

My main issue currently, is, how would I be able to run specific parts of a pipeline file from the CLI? But not everything at the same time?

My usecase is as following:
I have 1 ci.py dagger file, which contains a build stage, test stage and deploy stage.
Locally I want to execute specific parts for testing my pipeline developments, or the complete thing.

In the Gitlab-ci we commonly use, I would still like to have my separate stages be visible. E.g. in my pipeline viewer I would still like to see the stages, which in turn would call a specific part of the Dagger pipeline ci.py file.

How would one go about this? Is there a standard Dagger way to do this? The closest thing I saw was The Dagger Plan, but it seems deprecated..

I've been thinking about this:

import anyio
import dagger
import click

async def build():
# dagger impl for build stage
async def test():
    # dagger impl for test stage
async def deploy():
    # dagger impl for deploy

@click.command()
@click.option('--name', prompt='Stagename',
              help='The stage to be executed.')
def runner(name):
    anyio.run(eval(name))
if __name__ == '__main__':
    runner()

Anyone?

tranquil sierra
median torrent
#

@tranquil sierra OK thx! It takes some getting used to being completely free in what I can do in a CI tool (by help of it being a programming language here) vs being always restricted 😄

ionic plover
#

@median torrent , we have a weekly call in Team audio for project Zenith. These have been focusing on the CLI UX and modules, which ties right in with the experience you're looking for. We'd love to see you there and to get your input, especially as a Jenkins and GitLab expert.

sleek wedge
median torrent
#

@ionic plover I just finished up the initial Dagger integration for one of our projects, so hopefully we can have some good internal chats and approvals for this. Then I would for sure be down to give some more input! 😄