|
1 | 1 | language: minimal |
2 | 2 |
|
3 | | -env: |
4 | | - global: |
5 | | - - VERSION=2.0.0 |
6 | | - |
7 | | -stages: |
8 | | - - name: lint |
9 | | - if: branch = remove_to_enable |
10 | | - - name: tests |
11 | | - if: branch = remove_to_enable |
12 | | - - name: "create packages" |
13 | | - - name: "test packages" |
| 3 | +script: |
| 4 | + - echo $TRAVIS_DIST |
| 5 | + - echo $TRAVIS_OS_NAME |
| 6 | + - echo $TRAVIS_CPU_ARCH |
| 7 | + - uname -a |
| 8 | + - cd /tmp |
| 9 | + - wget --quiet https://github.com/borgified/assimilation-official/releases/download/test/nanoprobe |
| 10 | + - echo "4be5fa9116cdf08a0eff3a60585af1832230df213f5fe734ea6f3c6ce8001640 nanoprobe" > nanoprobe.sha256sum |
| 11 | + - sha256sum -c nanoprobe.sha256sum |
| 12 | + - chmod +x nanoprobe |
| 13 | + - ./nanoprobe |
14 | 14 |
|
15 | 15 | jobs: |
16 | 16 | include: |
17 | | - |
18 | | - - stage: lint |
19 | | - name: lint |
20 | | - script: |
21 | | - - echo "run some linter" |
22 | | - |
23 | | - - stage: tests |
24 | | - name: tests |
25 | | - after_success: |
26 | | - - echo "do some tests" |
27 | | - |
28 | | - - stage: "create packages" |
29 | | - name: "create packages" |
30 | | - after_success: |
31 | | - - docker build --build-arg VERSION -f $TRAVIS_BUILD_DIR/ci/Dockerfiles/ubuntu1804_fpm.dockerfile -t ubuntu_fpm /tmp/dummy/ |
32 | | - - docker build --build-arg VERSION -f $TRAVIS_BUILD_DIR/ci/Dockerfiles/centos7_fpm.dockerfile -t centos_fpm /tmp/dummy/ |
33 | | - - docker run -v /tmp/output:/output ubuntu_fpm bash -c "cp /workdir/*.deb /output" |
34 | | - - docker run -v /tmp/output:/output centos_fpm bash -c "cp /workdir/*.rpm /output" |
35 | | - - ls -al /tmp/output/*.deb /tmp/output/*.rpm |
36 | | - - echo "upload packages to bintray" |
37 | | - - curl -T /tmp/output/nanoprobe-${VERSION}-1.x86_64.rpm -u$BINTRAY_USER:$BINTRAY_PASS https://api.bintray.com/content/assimilation/rpm/nanoprobe/$VERSION/nanoprobe-${VERSION}-1.x86_64.rpm |
38 | | - - curl -T /tmp/output/nanoprobe_${VERSION}_amd64.deb -u$BINTRAY_USER:$BINTRAY_PASS "https://api.bintray.com/content/assimilation/deb/nanoprobe/$VERSION/nanoprobe_${VERSION}_amd64.deb;deb_distribution=bionic;deb_component=universe;deb_architecture=amd64" |
39 | | - |
40 | | - - stage: "test packages" |
41 | | - name: "test packages" |
42 | | - script: |
43 | | - - echo "download packages" |
44 | | - - echo "test them out" |
45 | | - - docker run centos bash -c "yum -y install wget && wget https://bintray.com/assimilation/rpm/rpm -O /etc/yum.repos.d/bintray-assimilation-rpm.repo && yum -y install nanoprobe && rpm -qa nanoprobe && yum -y remove nanoprobe" |
46 | | - - docker run ubuntu bash -c "apt-get -y update && apt-get -y install ca-certificates gnupg && echo 'deb https://dl.bintray.com/assimilation/deb bionic universe' > /etc/apt/sources.list.d/bintray_assimilation.list && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 && apt-get -y update && apt-get -y install nanoprobe && dpkg -l nanoprobe && apt-get -y remove nanoprobe" |
47 | | - |
48 | | -script: |
49 | | - - echo "build binaries" |
50 | | - - cd $TRAVIS_BUILD_DIR/docker/rel2 |
51 | | - - ./dockit |
52 | | - # create dummy nanoprobe binary |
53 | | - - mkdir /tmp/dummy |
54 | | - - docker run -v /tmp/dummy:/copyout assimilationproject/nanoprobe:2.0.0 bash -c "cp nanoprobe /copyout" |
| 17 | + - stage: test on different distributions |
| 18 | + name: ubuntu 12.04 |
| 19 | + dist: precise |
| 20 | + - stage: test on different distributions |
| 21 | + name: ubuntu 14.04 |
| 22 | + dist: trusty |
| 23 | + - stage: test on different distributions |
| 24 | + name: ubuntu 16.04 |
| 25 | + dist: xenial |
| 26 | + - stage: test on different distributions |
| 27 | + name: ubuntu 18.04 |
| 28 | + dist: bionic |
0 commit comments