config.yml 5.35 KB
Newer Older
1
2
3
4
5
6
7
8
version: 2.1
executors:
  python:
    parameters:
      image:
        type: string
    docker:
      - image: << parameters.image >>
9
10
11
12
13
14
  linux:
    parameters:
      image:
        type: string
    docker:
      - image: << parameters.image >>
15
16
17
18
19
20
21
commands:
  runtest:
    steps:
      - checkout
      - run:
          name: Install Python dependencies in a virtual env
          command: |
22
23
24
25
            sudo pip install --upgrade pip
            pip install virtualenv
            virtualenv -p $(which python) ~/efs-utils-virtualenv
            source ~/efs-utils-virtualenv/bin/activate
26
27
28
29
            pip install -r requirements.txt
      - run:
          name: Run all tests
          command: |
30
            source ~/efs-utils-virtualenv/bin/activate
31
            make test
32
33
      - store_artifacts:
          path: build
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
  build-deb:
    steps:
      - checkout
      - run:
          name: Repo update
          command: |
            apt-get update
      - run:
          name: Install dependencies
          command: |
            apt-get -y install binutils
      - run:
          name: Build DEB
          command: |
            ./build-deb.sh
      - run:
          name: Install package
          command: |
            apt-get -y install ./build/amazon-efs-utils*deb
      - run:
          name: Check installed successfully
          command: |
            mount.efs --version
  build-rpm:
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
63
            yum -y install rpm-build make systemd
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
      - run:
          name: Build RPM
          command: |
            make rpm
      - run:
          name: Install package
          command: |
            yum -y install build/amazon-efs-utils*rpm
      - run:
          name: Check installed successfully
          command: |
            mount.efs --version
      - run:
          name: Check changelog
          command: |
            rpm -q --changelog amazon-efs-utils
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
  build-suse-rpm:
    steps:
      - checkout
      - run:
          name: Refresh source
          command: |
            zypper refresh
      - run:
          name: Install dependencies
          command: |
            zypper install -y --force-resolution rpm-build
            zypper install -y make systemd
      - run:
          name: Build RPM
          command: |
            make rpm
      - run:
          name: Install package
          command: |
99
            zypper --no-gpg-checks install -y build/amazon-efs-utils*rpm
100
101
102
103
104
105
106
107
      - run:
          name: Check installed successfully
          command: |
            mount.efs --version
      - run:
          name: Check changelog
          command: |
            rpm -q --changelog amazon-efs-utils
108
109
110
111
112
113
114
115
116
117
jobs:
  test:
    parameters:
      image:
        type: string
    executor:
      name: python
      image: << parameters.image >>
    steps:
      - runtest
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
  build-deb-package:
    parameters:
      image:
        type: string
    executor:
      name: linux
      image: << parameters.image >>
    steps:
      - build-deb
  build-rpm-package:
    parameters:
      image:
        type: string
    executor:
      name: linux
      image: << parameters.image >>
    steps:
      - build-rpm
136
137
138
139
140
141
142
143
144
  build-suse-rpm-package:
    parameters:
      image:
        type: string
    executor:
      name: linux
      image: << parameters.image >>
    steps:
      - build-suse-rpm
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
workflows:
  workflow:
    jobs:
      - test:
          name: python38
          image: circleci/python:3.8.1
      - test:
          name: python37
          image: circleci/python:3.7.3
      - test:
          name: python36
          image: circleci/python:3.6.9
      - test:
          name: python35
          image: circleci/python:3.5.9
      - test:
          name: python34
          image: circleci/python:3.4.9
163
164
165
166
167
168
169
170
      - build-deb-package:
          name: ubuntu16
          image: ubuntu:16.04
      - build-deb-package:
          name: ubuntu18
          image: ubuntu:18.04
      - build-deb-package:
          name: debian9
171
172
173
174
175
176
177
          image: debian:stretch
      - build-deb-package:
          name: debian10
          image: debian:buster
      - build-deb-package:
          name: debian11
          image: debian:bullseye
178
179
180
      - build-rpm-package:
          name: centos7
          image: centos:centos7
Jurgen Verhasselt's avatar
Jurgen Verhasselt committed
181
182
183
      - build-rpm-package:
          name: centos8
          image: centos:centos8
184
185
186
187
188
      - build-rpm-package:
          name: amazon-linux-2
          image: amazonlinux:2
      - build-rpm-package:
          name: amazon-linux
189
          image: amazonlinux:1
190
191
192
193
194
195
      - build-rpm-package:
          name: fedora28
          image: fedora:28
      - build-rpm-package:
          name: fedora29
          image: fedora:29
196
197
198
199
200
201
202
203
204
205
206
      - build-rpm-package:
          name: fedora30
          image: fedora:30
      - build-rpm-package:
          name: fedora31
          image: fedora:31
      - build-rpm-package:
          name: fedora32
          image: fedora:32
      - build-rpm-package:
          name: fedora33
207
208
209
          image: fedora:33
      - build-suse-rpm-package:
          name: opensuse-leap15.1
210
211
212
213
214
215
216
217
218
219
          image: opensuse/leap:15.1
      - build-suse-rpm-package:
          name: opensuse-leap15.2
          image: opensuse/leap:15.2
      - build-suse-rpm-package:
          name: opensuse-leap-latest
          image: opensuse/leap:latest
      - build-suse-rpm-package:
          name: opensuse-tumbleweed-latest
          image: opensuse/tumbleweed:latest