-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcloudbuild.yaml
64 lines (57 loc) · 1.87 KB
/
cloudbuild.yaml
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
tags: ['c', 'cmake', 'security']
steps:
- name: 'gcr.io/cloud-builders/docker'
id: 'build container with gcc'
args: ['build', '--file=Dockerfile.buildenv', '--tag=localhost/cloud-builders/cmake', '.']
- name: 'localhost/cloud-builders/cmake'
id: 'compile with gcc'
waitFor: ['build container with gcc']
env: ['CFLAGS=-Os']
dir: 'build'
entrypoint: 'bash'
args:
- -c
- |
cmake -GNinja ..;
ninja
- name: 'localhost/cloud-builders/cmake'
id: 'test'
entrypoint: 'bash'
args: ['test/runner.sh', 'build/signify']
- name: 'gcr.io/cloud-builders/docker'
id: 'build container with clang'
args: ['build', '--file=Dockerfile.buildenv-clang', '--tag=localhost/cloud-builders/cmake:clang', '.']
- name: 'localhost/cloud-builders/cmake:clang'
id: 'compile with clang'
waitFor: ['build container with clang']
env: ['CFLAGS=-Os']
dir: 'build-clang'
entrypoint: 'bash'
args:
- -c
- |
cmake -GNinja ..;
ninja
- name: 'mirror.gcr.io/library/ubuntu'
id: 'package deb'
waitFor: ['test']
env: ['VERSION=1.106.3']
entrypoint: 'bash'
args:
- -c
- |
mkdir -p .release/{DEBIAN,usr/bin,usr/share/man/man1};
mv build/signify .release/usr/bin/;
cat signify.1 | bzip2 -9c >.release/usr/share/man/man1/signify.1.bz2;
cp -a debian/* .release/DEBIAN/;
sed -i \
-e "/^Version/c\Version\x3a $${VERSION}" \
-e "/^Architecture/c\Architecture\x3a $(dpkg --print-architecture)" \
-e "/^Installed-Size/c\Installed-Size\x3a $(find .release/usr -type f -print0 | du -sc --apparent-size --files0-from=- | tail -n 1 | cut -f 1)" \
.release/DEBIAN/control;
dpkg-deb -Znone --build .release "signify-linux_$${VERSION}_$(dpkg --print-architecture).deb";
dpkg --info "signify-linux_$${VERSION}_$(dpkg --print-architecture).deb";
#artifacts:
# objects:
# location: 'gs://some-bucket/some-dir/'
# paths: ['signify*.deb']