This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
87 lines (87 loc) · 4.07 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
sudo: required
language: generic
services:
- docker
jobs:
include:
- stage: test
name: "bindgen test"
script:
- docker run -dit --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs
- docker exec -i libzfs bash -c 'yum install -y cargo yum-plugin-copr'
- docker exec -i libzfs bash -c 'yum copr -y enable alonid/llvm-5.0.0'
- docker exec -i libzfs bash -c 'yum install -y clang-5.0.0'
- docker exec -i libzfs bash -c 'cd /rust-libzfs/libzfs-sys && cargo test bindgen_test_layout'
- stage: test
name: "copr build test"
script:
- cd node-libzfs
- export SPEC=iml-node-libzfs.spec
- docker run -it -e SPEC="$SPEC" -e LOCAL_ONLY="True" -v $(pwd):/build:rw imlteam/copr-zfs
- ((`find _topdir/RPMS -name *.rpm | wc -l` > 0))
- stage: cd
name: "Continuous Deployment"
script:
- cd node-libzfs
- export OWNER=managerforlustre
- export PROJECT=manager-for-lustre-devel
- export PACKAGE=iml-node-libzfs
- export SPEC=iml-node-libzfs.spec
- docker run -it -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e SPEC="$SPEC" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr
- stage: deploy-libzfs-sys
name: "libzfs-sys"
script:
- docker run -d -it --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs
- docker exec -i libzfs bash -c 'yum install -y cargo yum-plugin-copr'
- docker exec -i libzfs bash -c 'yum copr -y enable alonid/llvm-5.0.0'
- docker exec -i libzfs bash -c 'yum install -y clang-5.0.0'
- docker exec -i libzfs bash -c "cd /rust-libzfs/libzfs-sys && cargo package && cargo publish --token $CARGO_TOKEN"
- stage: deploy-libzfs
name: "libzfs"
script:
- docker run -d -it --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs
- docker exec -i libzfs bash -c 'yum install -y cargo yum-plugin-copr'
- docker exec -i libzfs bash -c 'yum copr -y enable alonid/llvm-5.0.0'
- docker exec -i libzfs bash -c 'yum install -y clang-5.0.0'
- docker exec -i libzfs bash -c "cd /rust-libzfs/libzfs && cargo package && cargo publish --token $CARGO_TOKEN"
- stage: deploy-libzfs-types
name: "libzfs-types"
script:
- docker run -d -it --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs
- docker exec -i libzfs bash -c "cd /rust-libzfs/libzfs-types && cargo package && cargo publish --token $CARGO_TOKEN"
- stage: deploy-node-libzfs
name: "@iml/node-libzfs"
language: node_js
node_js: "10"
before_deploy:
- cd node-libzfs
deploy:
provider: npm
email: "$NPM_EMAIL"
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
tags: true
- stage: deploy-copr-r5.0
name: "Copr 5.0 deploy"
script:
- cd node-libzfs
- export OWNER=managerforlustre
- export PROJECT=manager-for-lustre-5.0
- export PACKAGE=iml-node-libzfs
- export SPEC=iml-node-libzfs.spec
- docker run -it -e PROD="true" -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e SPEC="$SPEC" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr
stages:
- test
- name: cd
if: branch = master AND type = push AND fork = false
- name: deploy-libzfs-sys
if: branch =~ ^v\d+\.\d+\.\d+libzfs-sys$
- name: deploy-libzfs
if: branch =~ ^v\d+\.\d+\.\d+libzfs$
- name: deploy-libzfs-types
if: branch =~ ^v\d+\.\d+\.\d+libzfs-types$
- name: deploy-node-libzfs
if: branch =~ ^v\d+\.\d+\.\d+node-libzfs$
- name: deploy-copr-r5.0
if: branch =~ ^v\d+\.\d+\.\d+-.+-r5\.0$