Status | Assigned | Task | ||
---|---|---|---|---|
Migrated | gitlab-migration | T1629 Deploy the npm ingestion in production | ||
Migrated | gitlab-migration | T1630 Add debian packaging for the npm loader |
Event Timeline
Comment Actions
The automatic packaging has been set up for the npm loader.
Steps followed :
- add the Jenkins jobs for the new repo (rCJSWH70db79eee0b by @ardumont)
- ask a Jenkins admin to approve the new groovy scripts in the Jenkins script security panel.
- make sure the repository has the Has debian packaging branches tag so Jenkins will be able to push to it
- setup the post-receive hook for tags on the phabricator server (/usr/local/bin/phabricator-setup-hook /srv/phabricator/repos/184 post-receive-swh-modules on tate)
- bootstrap the Debian packaging branches. This is somewhat scriptable but there's lots of ways this can fail. You can use this script as a copy-paste template :
package=$(basename $(pwd)) ver="0.0.0" # set to the initial tag number # Nuke all the debian branches from orbit git branch -D pristine-tar debian/upstream debian/unstable-swh debian/stretch-swh || true # Generate initial sdist tarball git checkout v$ver git clean -dfx python3 setup.py egg_info pname=$(awk '/^Name:/{print $2}' *.egg-info/PKG-INFO) pver=$(awk '/^Version:/{print $2}' *.egg-info/PKG-INFO) python3 setup.py sdist -d ../packages mv ../packages/${pname}-${pver}.tar.gz ../packages/${package}_${ver}.orig.tar.gz # Bootstrap the debian/upstream branch from the original tag git checkout -b debian/upstream # ... by removing all files git ls-tree --name-only HEAD | xargs rm -r # ...and replacing them with contents of the sdist tar -x --strip-components 1 -f ../packages/${package}_${ver}.orig.tar.gz git add . git commit --no-verify -m "Import upstream version ${ver}" # Create the upstream tag to appease gbp git tag debian/upstream/$ver # Bootstrap the pristine-tar branch ex-nihilo git checkout --orphan pristine-tar pristine-tar commit ../packages/${package}_${ver}.orig.tar.gz debian/upstream/${ver} # Bootstrap the debian/unstable-swh branch from the debian/upstream branch git checkout debian/upstream git checkout -b debian/unstable-swh # Initialize the debian directory. # You can: # - copy the debian directory from another repository # - update all references to the other module # (notably in debian/changelog, debian/control, debian/rules, debian/copyright) # - update dependencies in debian/control git add debian git commit -m "Bootstrap Debian packaging" # This is a good point to test that the package builds with gbp buildpackage # It might fail to build if your initial tag has no tests, as that makes pytest return an error code. # Once the unstable package builds, fix up your bootstrap commit, then # Bootstrap the debian/stretch-swh branch git checkout debian/unstable-swh git checkout -b debian/stretch-swh sed -i s/unstable/stretch/ debian/gbp.conf dch --bpo -D stretch-swh --force-distribution '' git add debian git commit --no-verify -m "Updated debian stretch backport directory for version ${ver}" # Push all the things git push --follow-tags --set-upstream origin pristine-tar debian/upstream debian/unstable-swh debian/stretch-swh
- push a new tag on the master branch and look at Jenkins (hopefully) update the debian branches and build/upload your new package
Comment Actions
rDLDNPMb5cbc6 is the packaging branch bootstrap commit, which can plausibly serve as a canvas for future module bootstraps
Comment Actions
Heads up, for loader, we also need to remove the extra __init__.py already installed by swh-core (this is true for all packages depending on swh-core, not only loaders) and swh-loader-core (for loaders only).