Skip to content
Snippets Groups Projects
Commit 7a97d4a5 authored by Jérémy Bobbio (Lunar)'s avatar Jérémy Bobbio (Lunar)
Browse files

Convert swh-docker-dev job from freestyle to Pipeline

In order to more easily lock a shared resource in the future, let’s
convert the swh-docker-dev job from a freestyle Jenkins job to
a declarative Pipeline job.
parent 948efe64
No related branches found
No related tags found
No related merge requests found
- job:
- project:
name: swh-docker-dev
description: Build the swh/stack:latest image
jobs:
- swh-docker-dev
- job-template:
name: swh-docker-dev
description: "Build the swh/stack:latest image"
project-type: pipeline
docker_image: tox
node: built-in
scm:
......@@ -10,22 +18,6 @@
- "*/master"
triggers:
- timed: "@midnight"
wrappers:
- timeout:
timeout: 30
abort: true
- timestamps
builders:
- shell: |
#!/bin/bash
cd docker
docker build --pull --no-cache -t swh/stack .
tox
- timed: "@midnight"
publishers:
- archive:
artifacts: 'docker/**/*.logs'
allow-empty: true
dsl: !include-jinja2: templates/swh-docker-dev.groovy.j2
pipeline {
agent none
options {
timeout(time: 30, unit: 'MINUTES')
timestamps()
}
stages {
stage('Checkout') {
agent {
label "built-in"
}
steps {
git url: "https://forge.softwareheritage.org/source/swh-environment.git"
}
}
stage('Build Docker images') {
agent {
label "built-in"
}
steps {
dir('docker') {
sh 'docker build --pull --no-cache -t swh/stack .'
}
}
}
stage('Run tests') {
{% filter indent(width=6) %}
{%- include 'templates/includes/agent-docker.groovy.j2' -%}
{% endfilter %}
steps {
dir('docker') {
sh 'python3 -m tox -- -v'
}
}
}
}
post {
always {
node('built-in') {
archiveArtifacts(
allowEmptyArchive: true,
artifacts: 'docker/**/*.logs',
)
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment