summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-09 11:22:13 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-09 11:22:13 +0200
commit5c74e26acf2fc5c67ec3ca24a4dee854191d3d4e (patch)
treec77c4eefc11bbed69bb8cf092a04c6ce724f7d9f
parentf76857fec75c5c0c8a8420a75d492bf3cc3f8fc8 (diff)
downloadliw-ci-5c74e26acf2fc5c67ec3ca24a4dee854191d3d4e.tar.gz
fix: vmadm-ci-sid
-rw-r--r--ci-prod-programs.ick94
1 files changed, 92 insertions, 2 deletions
diff --git a/ci-prod-programs.ick b/ci-prod-programs.ick
index ce325ad..915c980 100644
--- a/ci-prod-programs.ick
+++ b/ci-prod-programs.ick
@@ -629,6 +629,7 @@ projects:
- ick/add_apt_sources
- ick/get_sources
- ick/install_debian_build_dependencies
+ - rustup
- build_deb_ci
- ick/upload_debs
- docgen_and_publish_subplots
@@ -642,7 +643,7 @@ projects:
sources: &vmadm_sources
- name: code
repo: git://git.liw.fi/vmadm
- ref: main
+ ref: fix
location: src
workspace_name: vmadm
rsync_src: publish
@@ -654,7 +655,7 @@ projects:
- ick/get_sources
- ick/install_debian_build_dependencies
- rustup
- - build_deb_ci
+ - build_rust_project_as_deb
- ick/upload_debs
- docgen_and_publish_subplots
- ick/save_workspace
@@ -983,3 +984,92 @@ pipelines:
- where: host
action: rsync
+
+- pipeline: build_rust_project_as_deb
+ actions:
+ - where: container
+ shell: |
+ export HOME=/workspace
+ export PATH="$HOME/.cargo/bin:$PATH"
+ export TMPDIR=/workspace
+
+ # apt-get update
+ # apt-get install -y subplot \
+ # pandoc-citeproc \
+ # texlive-latex-base \
+ # texlive-latex-recommended \
+ # texlive-fonts-recommended \
+ # plantuml curl moreutils
+
+ rustup show
+ rustup default stable
+ type rustc
+ rustc --version
+
+ dpkg -l subplot
+ type sp-docgen
+
+ cd /workspace/src
+ git clean -fdxq -e target
+
+ name="$(dpkg-parsechangelog -S Source)"
+ distribution="$(dpkg-parsechangelog -S Distribution)"
+ version="$(dpkg-parsechangelog -S Version)"
+
+ case "$version" in
+ *-*)
+ upstream="$(echo "$version" | sed 's/-[^-]*$//')"
+ debian="$(echo "$version" | sed 's/^.*-//')"
+ ;;
+ *)
+ upstream="$version"
+ debian=0
+ ;;
+ esac
+
+ upstream="${upstream}.ci0.${BUILD_NUMBER}"
+ civersion="${upstream}-${debian}"
+
+ rm -f ../*_*
+ git clean -fdx -e target
+ git archive HEAD | xz > "../${name}_${upstream}.orig.tar.xz"
+ dch --no-conf -v "$civersion" -D "${distribution}-ci" --force-distribution "CI build"
+ dpkg-buildpackage -us -uc -sa
+
+ # install -d /workspace/examples
+ # for x in *.html *.pdf
+ # do
+ # install -m 0644 "$x" /workspace/examples/.
+ # done
+
+ # Build new releases.
+ echo ========================================
+ echo looking for new releases to
+
+ # TEMPORARILY get the latest release tag
+ #rm -f /workspace/built_tags # FIXME
+ #touch /workspace/built_tags # FIXME
+ #python3 ./list_new_release_tags /workspace/built_tags
+ #tac < /workspace/built_tags | tail +2 > foo
+ #mv foo /workspace/built_tags
+
+ python3 ./list_new_release_tags /workspace/built_tags | while read tag
+ do
+ echo ----------------------------------------
+ echo "New release tag: $tag"
+ bash ./build_release_deb.sh /workspace "$tag"
+ echo "Finished building tag $tag"
+ done
+ echo ========================================
+ echo "Finished building release debs (if any)"
+
+ # - where: host
+ # action: rsync
+
+- pipeline: get_debian_cloud_image
+ actions:
+ - where: container
+ shell: |
+ cd /workspace
+ URL="https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64.qcow2"
+ curl -s "$URL" > debian.qcow2