-
Notifications
You must be signed in to change notification settings - Fork 8
/
buildspec.yml
28 lines (27 loc) · 1.11 KB
/
buildspec.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
version: 0.2
phases:
pre_build:
on-failure: ABORT
commands:
- certee-fetch
build:
on-failure: ABORT
commands:
- mix deps.get
- mix distillery.release
- mkdir -p /root/rpmbuild/SOURCES
- cp _build/prod/rel/origin_simulator/releases/*/origin_simulator.tar.gz /root/rpmbuild/SOURCES/
- cp origin-simulator.spec /root/rpmbuild/SOURCES/
- cp SOURCES/origin_simulator.service /root/rpmbuild/SOURCES/
- cp SOURCES/performance.conf /root/rpmbuild/SOURCES/
- cd /root/rpmbuild/SOURCES
- echo "Generating version file"
- export COSMOS_VERSION=`cosmos-release generate-version origin-simulator`
- rpmbuild -ba --define "cosmos_version ${COSMOS_VERSION}" origin-simulator.spec
post_build:
on-failure: ABORT
commands:
- echo "Releasing 'RPMS/**/*.rpm' to origin-simulator"
- cd $CODEBUILD_SRC_DIR
- cosmos-release service 'origin-simulator' --release-version=v /root/rpmbuild/RPMS/x86_64/*.x86_64.rpm
- cosmos-release service 'origin-simulator-fabl' --release-version=v /root/rpmbuild/RPMS/x86_64/*.x86_64.rpm