Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from kappnav/removeInit
Browse files Browse the repository at this point in the history
Remove init from build and push scripts
  • Loading branch information
rlcundiff authored Dec 12, 2019
2 parents f7d2686 + f607a09 commit afaf738
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
proj=$1
arg=$proj

# make sure running in build directory
if [ $(echo $PWD | awk '{ n=split($0,d,"/"); print d[n] }') != 'build' ]; then
# make sure running in build directory
if [ $(echo $PWD | awk '{ n=split($0,d,"/"); print d[n] }') != 'build' ]; then
echo 'Error: $kappnav/build dir must be current dir.'
echo ''
arg="--?"
Expand All @@ -37,21 +37,21 @@ fi

# determine if building all projects or just one
if [ x$proj == x ]; then
projs='init apis controller operator ui'
else
projs='apis controller operator ui'
else
projs=$proj
fi

# Clone all the kappnav repos needed for build, if not already done
cd ..
for p in $projs; do
for p in $projs; do
if [ ! -d $p ]; then
git clone https://github.com/kappnav/$p.git
fi
done
cd -

# now build all projects
for p in $projs; do
# now build all projects
for p in $projs; do
cd ../$p ; ./build.sh; cd -
done
done
2 changes: 1 addition & 1 deletion pushKAppNavToDockerHub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ x$1 == x'--?' ] || [ x$1 == x'-?' ]; then
fi

if [ x$image == x ]; then
imagelist="apis controller init operator ui"
imagelist="apis controller operator ui"
else
imagelist=$image
fi
Expand Down
18 changes: 9 additions & 9 deletions pushimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ org=$1
image=$2

arg=$org
# make sure running in build directory
if [ $(echo $PWD | awk '{ n=split($0,d,"/"); print d[n] }') != 'build' ]; then
# make sure running in build directory
if [ $(echo $PWD | awk '{ n=split($0,d,"/"); print d[n] }') != 'build' ]; then
echo 'Error: $kappnav/build dir must be current dir.'
echo ''
arg="--?"
fi

if [ x$arg == x'--?' ] || [ x$arg == 'x' ]; then
echo Push local kAppNav images to specified dockerhub.com organization.
echo
echo Notes:
echo
echo Notes:
echo "1. this script will attempt 'docker login'"
echo "2. images will be tagged latest"
echo
echo
echo syntax:
echo
echo "pushimages.sh <docker organization> [<image>]"
Expand All @@ -43,11 +43,11 @@ if [ x$arg == x'--?' ] || [ x$arg == 'x' ]; then
exit 1
fi

docker login
docker login

if [ x$image == x ]; then
imagelist="kappnav-init kappnav-ui kappnav-apis kappnav-controller kappnav-operator"
else
if [ x$image == x ]; then
imagelist="kappnav-ui kappnav-apis kappnav-controller kappnav-operator"
else
imagelist="kappnav-"$image
fi
tag=latest
Expand Down

0 comments on commit afaf738

Please sign in to comment.