-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildspec.yml
42 lines (38 loc) · 1.54 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
40
41
42
# 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:
- aws s3 cp s3://onion-build/openwrt/openwrt21.key $CODEBUILD_SRC_DIR/keys/key-build
- aws s3 cp s3://onion-build/openwrt/openwrt21.pub $CODEBUILD_SRC_DIR/keys/key-build.pub
- cat $CODEBUILD_SRC_DIR/profile
- cp $CODEBUILD_SRC_DIR_packages_source_output/sdk-profile $CODEBUILD_SRC_DIR/profile
- cd $CODEBUILD_SRC_DIR
- cat profile
- bash onion_buildenv setup_sdk
build:
commands:
- bash onion_buildenv build_all_packages
post_build:
commands:
- if [ "$CODEBUILD_BUILD_SUCCEEDING" = "0" ]; then exit 1; fi
- VERSION=$(. $CODEBUILD_SRC_DIR/profile; echo ${OPENWRT_VERSION=#v})
- cd "openwrt-sdk/bin/packages/mipsel_24kc/onion"
- aws s3 cp --recursive . "s3://$OUTPUT_BUCKET/omega2/packages/openwrt-$VERSION/onion"
cache:
paths:
- /var/cache/apt/**/*
- /var/lib/apt/lists/**/*
artifacts:
type: zip
files: "**/*"
base-directory: "openwrt-sdk/bin/packages/mipsel_24kc/onion"