mirror of
https://github.com/ostreedev/ostree-go.git
synced 2026-02-05 15:48:26 +01:00
tests: try to build Skopeo and pull an image
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -5,6 +5,14 @@ services:
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
allow_failures:
|
||||||
|
- env: TEST=skopeo
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
matrix:
|
||||||
|
- TEST=integration
|
||||||
|
- TEST=skopeo
|
||||||
|
|
||||||
# Don't send out emails
|
# Don't send out emails
|
||||||
notifications:
|
notifications:
|
||||||
@@ -12,8 +20,9 @@ notifications:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker pull registry.fedoraproject.org/fedora:latest
|
- docker pull registry.fedoraproject.org/fedora:latest
|
||||||
- docker run -e GOPATH=/opt --cidfile=/tmp/cidfile registry.fedoraproject.org/fedora:latest /bin/bash -c "dnf install -y make golang go-compilers-golang-compiler findutils ostree ostree-devel"
|
- docker run -e GOPATH=/opt --cidfile=/tmp/cidfile registry.fedoraproject.org/fedora:latest /bin/bash -c "dnf install -y make golang go-compilers-golang-compiler findutils ostree ostree-devel gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel"
|
||||||
- docker commit `cat /tmp/cidfile` go-ostree/test
|
- docker commit `cat /tmp/cidfile` go-ostree/test
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker run --rm -e GOPATH=/opt -v ${PWD}:/opt/src/github.com/ostreedev/ostree-go go-ostree/test /bin/bash -c "cd /opt/src/github.com/ostreedev/ostree-go && make install-tools && PATH=$PATH:/opt/bin make deps && PATH=$PATH:/opt/bin make lint && PATH=$PATH:/opt/bin make test"
|
- if [ $TEST == 'integration' ]; then docker run --rm -e GOPATH=/opt -v ${PWD}:/opt/src/github.com/ostreedev/ostree-go go-ostree/test /bin/bash -c "cd /opt/src/github.com/ostreedev/ostree-go && make install-tools && PATH=$PATH:/opt/bin make deps && PATH=$PATH:/opt/bin make lint && PATH=$PATH:/opt/bin make test"; fi
|
||||||
|
- if [ $TEST == 'skopeo' ]; then docker run --rm -e GOPATH=/opt -v ${PWD}:/ostree-go go-ostree/test /ostree-go/scripts/travis/test_skopeo.sh; fi
|
||||||
|
|||||||
17
scripts/travis/test_skopeo.sh
Executable file
17
scripts/travis/test_skopeo.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
go get github.com/LK4D4/vndr
|
||||||
|
|
||||||
|
mkdir -p $GOPATH/src/github.com/containers
|
||||||
|
cd $GOPATH/src/github.com/containers
|
||||||
|
git clone https://github.com/containers/skopeo
|
||||||
|
cd skopeo
|
||||||
|
sed -i -e 's|^github.com/ostreedev/ostree-go.*$|github.com/ostreedev/ostree-go HEAD /ostree-go|g' vendor.conf
|
||||||
|
$GOPATH/bin/vndr
|
||||||
|
make binary-local
|
||||||
|
mkdir -p /ostree/repo
|
||||||
|
ostree --repo=/ostree/repo init --mode=bare-user
|
||||||
|
mkdir -p /etc/containers/
|
||||||
|
cp -u default-policy.json /etc/containers/policy.json
|
||||||
|
./skopeo copy docker://docker.io/fedora ostree:docker.io/fedora@/ostree/repo
|
||||||
Reference in New Issue
Block a user