Skip to content

edwinrubio/dagger-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SERVICES DOCUMENTS Dagger - example.md PREVIEW AS EXPORT AS SAVE TO IMPORT FROM DOCUMENT NAME Dagger - example.md MARKDOWNPREVIEWToggle Mode 



Dagger - example

N|Solid

This demo aims to explain in a practical and simple way the use of dagger.

  • ✨Magic ✨

Features

  • Pipeline execution from Jenkins
  • Compiling native code in Go
  • Code scanning with sonarqube
  • Compiling and pushing a real docker image to the dockerhub
  • Creation of an application that creates ascii-art from real images.

Tech

Dillinger uses a number of open source projects to work properly:

  • [Go] - Language in which pipelines and applications are written.
  • [yaml] - Creation cluster kind
  • [groovy] - Pipelines in Jenkins

Installation

It is necessary to understand that to run the lab correctly you must create a kubernetes cluster immediately after connecting it to Jenkins, guaranteeing access to the dagger agent on the docker sock.
To run each of the pipelines locally you need to execute the following commands:

go get dagger.io/dagger@latest
go mod tidy
go run script.go

Kind-configuration

  • You will find the basic configuration to create a kind cluster.

jenkins-agent-dagger

  • Inside you will find the base dockerfile to create your dagger agent.

initial-demo

  • You will find a simple script where the basic structure of a dagger pipeline is run

continous-integration

  • You will find a more complex structure where the scanning of the same pipeline is done with sonarqube.

ascii-art

  • This is the most complex of all where you will find a go application that will be compiled, scanned and containerised.

For production environments…
In the event that you have to handle secrets, there are several possibilities:

  • Mozilla sops
  • Azure Key Vault
  • KMS

(https://docs.dagger.io/723462/use-secrets/)
Among others.

go get dagger.io/dagger@latest
go mod tidy
go run script.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published