forked from shadow-robot/shadow_dexterous_hand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
54 lines (53 loc) · 2.24 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
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 2022-2023 Shadow Robot Company Ltd.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
version: 0.2
env:
variables:
release_branch: noetic-devel
release_tag_flavour: noetic
release_tag_version: 0.0.0
parameter-store:
GITHUB_LOGIN : GITHUB_LOGIN
GITHUB_PASSWORD : GITHUB_PASSWORD
DOCKER_HUB_USERNAME: DOCKER_HUB_USERNAME
DOCKER_HUB_PASSWORD: DOCKER_HUB_PASSWORD
exported-variables:
- release_branch
- release_tag_flavour
- release_tag_version
phases:
install:
runtime-versions:
docker: 18
pre_build:
commands:
- awscli_v1_executable=$(which aws)
- rm $awscli_v1_executable
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
- unzip -qq awscliv2.zip
- ./aws/install
- git checkout $release_branch
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/shadowrobot
- docker login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD}
- cd $(find . -name scripts)
- if [ "$release_tag_version" = "0.0.0" ]; then release_tag_version=$(./next-version.sh -f ${release_tag_flavour}); fi
- if [ "$release_tag_version" != "night-build" ]; then ./check-tag.sh -f $release_tag_flavour -v $release_tag_version; fi
build:
commands:
- ./system-test.sh
post_build:
commands:
- echo "Cleaning up untagged images"
- if [[ "$release_tag_flavour-v$release_tag_version" =~ ^$release_tag_flavour+-v[0-9]+\.[0-9]+\.[0-9]+ ]]; then ./gather-changelog.sh "public.ecr.aws/shadowrobot/dexterous-hand" "$release_tag_flavour-v$release_tag_version" "dexterous-hand"; fi
- ./remove_untagged_containers.py