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 #23 from kappnav/useCommonProjectLists
Browse files Browse the repository at this point in the history
Update scripts to use common project and build lists
  • Loading branch information
rlcundiff authored Mar 13, 2020
2 parents e34db6f + f98514a commit 5801576
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 17 deletions.
4 changes: 3 additions & 1 deletion branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#*****************************************************************
# shows all branches
arg=$1
projs='README build samples apis controller operator ui'

# make sure running in build directory
if [ $(echo $PWD | awk '{ n=split($0,d,"/"); print d[n] }') != 'build' ]; then
Expand All @@ -36,6 +35,9 @@ if [ x$arg == x'--?' ]; then
exit 1
fi

. ./projectList.sh
projs=$ALL_PROJECTS

for p in $projs; do
if [ -d ../$p ]; then
cd ../$p
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fi

# determine if building all projects or just one
if [ x$proj == x ]; then
projs='apis controller operator ui'
. ./projectList.sh
projs=$BUILD_PROJECTS
else
projs=$proj
fi
Expand Down
7 changes: 4 additions & 3 deletions checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
#*****************************************************************
# does check out of specified branch across all kappnav projects
branch=$1

projs='README build samples apis controller operator ui'

arg=$branch

# 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.'
Expand All @@ -37,6 +35,9 @@ if [ x$arg == x'--?' ] || [ x$arg == 'x' ]; then
exit 0
fi

. ./projectList.sh
projs=$ALL_PROJECTS

# build projects
for p in $projs; do
if [ -d ../$p ]; then
Expand Down
4 changes: 3 additions & 1 deletion clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#*****************************************************************
# clone all development directories except website
arg=$1
projs='README build samples apis controller operator ui'

# make sure running in build directory
if [ $(echo $PWD | awk '{ n=split($0,d,"/"); print d[n] }') != 'build' ]; then
Expand All @@ -35,6 +34,9 @@ if [ x$arg == x'--?' ]; then
exit 0
fi

. ./projectList.sh
projs=$ALL_PROJECTS

# clone all projects
for p in $projs; do
git clone https://github.com/kappnav/$p.git ../$p
Expand Down
5 changes: 3 additions & 2 deletions projectList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
#*****************************************************************
# Defines the list of kAppNav projects for use by other scripts

BUILD_PROJECTS='apis controller inv operator ui'
ALL_PROJECTS=$BUILD_PROJECTS' README build samples kappnav-website'
BUILD_PROJECTS='apis controller inventory operator ui'
ALL_PROJECTS=$BUILD_PROJECTS' README build samples kappnav-website'
IMAGES='apis controller inv operator ui'
3 changes: 2 additions & 1 deletion pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ if [ x$arg == x'--?' ]; then
exit 1
fi

projs='README samples apis controller operator ui build'
. ./projectList.sh
projs=$ALL_PROJECTS

for p in $projs; do
if [ -d ../$p ]; then
Expand Down
3 changes: 2 additions & 1 deletion pushKAppNavToDockerHub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ if [ x$1 == x'--?' ] || [ x$1 == x'-?' ]; then
fi

if [ x$image == x ]; then
imagelist="inv apis controller operator ui"
. ./projectList.sh
imagelist=$IMAGES
else
imagelist=$image
fi
Expand Down
13 changes: 7 additions & 6 deletions pushimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ fi
docker login

if [ x$image == x ]; then
imagelist="kappnav-inv kappnav-ui kappnav-apis kappnav-controller kappnav-operator"
. ./projectList.sh
imagelist=$IMAGES
else
imagelist="kappnav-"$image
imagelist=$image
fi
tag=latest
for image in $imagelist; do
echo docker tag $image:$tag $org/$image:$tag
docker tag $image:$tag $org/$image:$tag
echo docker push $org/$image:$tag
docker push $org/$image:$tag
echo docker tag kappnav-$image:$tag $org/kappnav-$image:$tag
docker tag kappnav-$image:$tag $org/kappnav-$image:$tag
echo docker push $org/kappnav-$image:$tag
docker push $org/kappnav-$image:$tag
done
3 changes: 2 additions & 1 deletion status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ if [ x$arg == x'--?' ]; then
exit 1
fi

projs='README build samples apis controller operator ui'
. ./projectList.sh
projs=$ALL_PROJECTS

for p in $projs; do
if [ -d ../$p ]; then
Expand Down

0 comments on commit 5801576

Please sign in to comment.