-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.bash
executable file
·32 lines (28 loc) · 995 Bytes
/
build.bash
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
#!/bin/bash
set -eo pipefail
if [ ! -z "${BASH_VERBOSE}" ]; then
set -x
fi
export GOPATH=${TEAMCITY_CHECKOUT_DIR}
pushd ${TEAMCITY_CHECKOUT_DIR}/src/github.com/platform9/pf9ctl
make container-build
popd
mkdir -p ${TEAMCITY_CHECKOUT_DIR}/build/publish-to-artf
cat > ${TEAMCITY_CHECKOUT_DIR}/build/upload_spec.json << EOF
{
"files": [
{
"pattern": "build/publish-to-artf/*",
"target": "pf9-bins/pf9-ctl/",
"flat": true
}
]
}
EOF
echo "##teamcity[setParameter name='env.UPLOAD_SPEC_PATH' value='${TEAMCITY_CHECKOUT_DIR}/build/upload_spec.json']"
if [ ${TEAMCITY_BUILD_BRANCH} = master ]; then
ln ${TEAMCITY_CHECKOUT_DIR}/src/github.com/platform9/pf9ctl/bin/pf9ctl ${TEAMCITY_CHECKOUT_DIR}/build/publish-to-artf/pf9ctl
ln ${TEAMCITY_CHECKOUT_DIR}/src/github.com/platform9/pf9ctl/pf9ctl_setup ${TEAMCITY_CHECKOUT_DIR}/build/publish-to-artf/pf9ctl_setup
else
echo "Not publishing files to artifactory since this is not built off master branch."
fi