diff --git a/jobs/swh-apps.yaml b/jobs/swh-apps.yaml new file mode 100644 index 0000000..c3c44a9 --- /dev/null +++ b/jobs/swh-apps.yaml @@ -0,0 +1,20 @@ + +# incoming-tag -> pypi-upload +# |-> tests on tag -> ... -> publish +# | -> create debian tag -> build debian package +# | +(-> launch pip-ci pipeline pipeline) +# 1. update dep, test and push tag + +# Pseudo code +# swh-apps/update-dependencies +# project: swh-core + +# clone swh-apps +# apps = grep -r swh[.]core apps/*/requirements-frozen.txt +# pour chaque : +# scripts/generate-frozen-requirements +# git add / commit +# [build docker image if any] / tests +# git tag -YYYYmmdd. +# git push +# docker push diff --git a/jobs/templates/incoming-tag.groovy.j2 b/jobs/templates/incoming-tag.groovy.j2 index 7254d21..4666aae 100644 --- a/jobs/templates/incoming-tag.groovy.j2 +++ b/jobs/templates/incoming-tag.groovy.j2 @@ -1,71 +1,88 @@ pipeline { agent none stages { stage('Refresh tag list') { agent any steps { checkout([ $class: 'GitSCM', userRemoteConfigs: [[ url: 'https://forge.softwareheritage.org/source/{{repo_name}}.git', ]], branches: [[ name: params.GIT_TAG, ]], browser: [ $class: 'Phabricator', repo: '{{repo_name}}', repoUrl: 'https://forge.softwareheritage.org/', ], ]) } } stage('Build and upload PyPI package') { when { expression { params.GIT_TAG ==~ /v\d+(.\d+)+/ } expression { jobExists('/{{name}}/pypi-upload') } } steps { build( job: '/{{name}}/pypi-upload', parameters: [ string(name: 'GIT_TAG', value: params.GIT_TAG), string(name: 'PYPI_HOST', value: '{{incoming_tag_auto_pypi_host}}'), ], ) } } +// parallel { +// TODO check parallel syntax +// stage ('Update swh-apps dependencies pipeline') { +// when { +// expression { params.SWHAPPS_ACTIVATED } +// } +// steps { +// build( +// job: '/swh-apps/update-dependencies', +// parameters: [ +// string(name: 'project', value: params.), +// ], +// wait: false, +// ) +// } +// } +// } stage('Update Debian packaging for new release') { when { expression { params.GIT_TAG ==~ /v\d+(.\d+)+/ } expression { jobExists('/debian/packages/{{name}}/update-for-release') } } steps { build( job: '/debian/packages/{{name}}/update-for-release', parameters: [ string(name: 'GIT_TAG', value: params.GIT_TAG), ], wait: false, ) } } stage('Build Debian package') { when { expression { params.GIT_TAG ==~ /debian\/.*/ } expression { !(params.GIT_TAG ==~ /debian\/upstream\/.*/) } expression { jobExists('/debian/packages/{{name}}/gbp-buildpackage') } } steps { build( job: '/debian/packages/{{name}}/gbp-buildpackage', parameters: [ string(name: 'GIT_REVISION', value: params.GIT_TAG), booleanParam(name: 'DO_UPLOAD', value: true), ], wait: false, ) } } } }