Integrating with Jenkins
Run Seal in a Jenkins pipeline.
Jenkins integration is a shell pattern: install the CLI, run seal fix.
Before you start
A token stored as a Secret text credential (for example, with ID
seal-token).A Project ID for the activity.
The stage
stage('Seal CLI') {
environment {
SEAL_TOKEN = credentials('seal-token')
SEAL_PROJECT = 'my-project-id'
}
steps {
sh '''
curl -fsSL https://github.com/seal-community/cli/releases/download/latest/seal-linux-amd64-latest.zip -o seal.zip
unzip seal.zip && chmod +x seal
./seal fix --mode all
'''
}
}Replace --mode all with --mode remote or --mode local per your deployment method. The stage should run after dependencies are installed and before they are packaged.
The credentials('seal-token') binding sets SEAL_TOKEN in the stage's environment. If your pipeline splits the install and the run into separate stages, both need the binding.
Related
Last updated