-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
33 lines (33 loc) · 1.31 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
language: bash
dist: focal
env:
matrix:
- IMAGE=ev3dev-bullseye-ev3-generic
global:
- BRICKSTRAP_IMAGE_FILE_SIZE=1800M
- BRICKSTRAP_BOOT_PART_LABEL=EV3DEV_BOOT
- BRICKSTRAP_ROOT_PART_LABEL=EV3DEV_ROOTFS
before_install:
- sudo apt-get install -y libguestfs-tools qemu-user-static
before_script:
- sudo usermod -a -G kvm $USER
- sudo chmod +r /boot/vmlinuz-*
- export DOCKER_IMAGE=ev3dev/$IMAGE
- export DISK_IMAGE=$(docker run --rm $DOCKER_IMAGE sh -c 'echo $BRICKSTRAP_IMAGE_NAME')
script:
- test -n "$DISK_IMAGE"
- src/brickstrap.sh create-tar $DOCKER_IMAGE $DISK_IMAGE.tar
# `sudo -E su $USER -c` is required to make the kvm group take effect
- sudo -E su $USER -c 'src/brickstrap.sh create-image $DISK_IMAGE.tar $DISK_IMAGE.img'
- if [ "$BEAGLE_BOOT" == "true" ]; then
src/brickstrap.sh add-beagle-bootloader $DOCKER_IMAGE $DISK_IMAGE.img;
fi
- src/brickstrap.sh create-report $DOCKER_IMAGE $HOME/report
- test -f "$HOME/report/$DISK_IMAGE-release-notes.md"
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "snapshot" ]; then
travis_wait xz --verbose -9 $DISK_IMAGE.img &&
mv $DISK_IMAGE.img.xz snapshot-$DISK_IMAGE.img.xz &&
curl -H"Authorization: Bearer $JFROG_TOKEN" -T snapshot-$DISK_IMAGE.img.xz "https://ev3dev.jfrog.io/artifactory/snapshots/$(date --iso-8601)/";
fi