-
Notifications
You must be signed in to change notification settings - Fork 3
/
buildspec.yml
39 lines (35 loc) · 1.28 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
29
30
31
32
33
34
35
36
37
38
39
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
version: 0.2
phases:
install:
commands:
- echo "Installing dependencies"
- apt-get update
- apt-get -y install build-essential libncurses5-dev libncursesw5-dev zlib1g-dev gawk git gettext libssl-dev xsltproc rsync wget unzip python2 python3
- apt-get -y install --upgrade awscli
# remove pyenv from path to use the default system installation.
- export PATH=$(echo $PATH | sed 's@/root/.pyenv/shims:/root/.pyenv/bin:@@g')
pre_build:
commands:
- cat $CODEBUILD_SRC_DIR/profile
- cp $CODEBUILD_SRC_DIR_packages_source_output/imagebuilder-profile $CODEBUILD_SRC_DIR/profile
- cd $CODEBUILD_SRC_DIR
- cat profile
- bash onion_buildenv setup_imagebuilder
build:
commands:
- bash onion_buildenv build_all_firmware
post_build:
commands:
- if [ "$CODEBUILD_BUILD_SUCCEEDING" = "0" ]; then exit 1; fi
- RELEASE=$(. $CODEBUILD_SRC_DIR/profile; echo ${OPENWRT_RELEASE=#v})
- aws s3 cp --recursive ./output/ s3://$OUTPUT_BUCKET/omega2/images/openwrt-$RELEASE
cache:
paths:
- /var/cache/apt/**/*
- /var/lib/apt/lists/**/*
artifacts:
type: zip
files: "**/*"
base-directory: "output"