From 05f6cfad40b3b4e60e9b090304c2d0e8c6511334 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Thu, 15 Sep 2016 18:21:49 -0300 Subject: [PATCH 01/12] Added comment --- bin/build.sh | 15 +++++++++++++++ bin/destroy.sh | 15 +++++++++++++++ bin/install.sh | 15 +++++++++++++++ bin/rebuild.sh | 15 +++++++++++++++ bin/rerun.sh | 15 +++++++++++++++ bin/run.sh | 15 +++++++++++++++ bin/start.sh | 15 +++++++++++++++ bin/stop.sh | 15 +++++++++++++++ bin/test.sh | 15 +++++++++++++++ common.bash.sample | 15 +++++++++++++++ 10 files changed, 150 insertions(+) mode change 100755 => 100644 bin/build.sh mode change 100755 => 100644 bin/destroy.sh mode change 100755 => 100644 bin/install.sh mode change 100755 => 100644 bin/rebuild.sh mode change 100755 => 100644 bin/rerun.sh mode change 100755 => 100644 bin/run.sh mode change 100755 => 100644 bin/start.sh mode change 100755 => 100644 bin/stop.sh mode change 100755 => 100644 bin/test.sh diff --git a/bin/build.sh b/bin/build.sh old mode 100755 new mode 100644 index 190c975..04efe18 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source common.bash . diff --git a/bin/destroy.sh b/bin/destroy.sh old mode 100755 new mode 100644 index 929c13e..f0cd1e8 --- a/bin/destroy.sh +++ b/bin/destroy.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source common.bash . diff --git a/bin/install.sh b/bin/install.sh old mode 100755 new mode 100644 index 2db62de..046ae4a --- a/bin/install.sh +++ b/bin/install.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/usr/bin/env bash git clone git@github.internet2.edu:docker/util.git find util/bin -name "*.sh" -exec sh -c 'echo "$1" | sed "s/util\///" >> .gitignore' -- {} \; diff --git a/bin/rebuild.sh b/bin/rebuild.sh old mode 100755 new mode 100644 index 3904e58..54938bb --- a/bin/rebuild.sh +++ b/bin/rebuild.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source bin/destroy.sh && source bin/build.sh \ No newline at end of file diff --git a/bin/rerun.sh b/bin/rerun.sh old mode 100755 new mode 100644 index e279386..cc52bac --- a/bin/rerun.sh +++ b/bin/rerun.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source bin/rebuild.sh && source bin/run.sh $1 \ No newline at end of file diff --git a/bin/run.sh b/bin/run.sh old mode 100755 new mode 100644 index 8af1b06..f243402 --- a/bin/run.sh +++ b/bin/run.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source common.bash . diff --git a/bin/start.sh b/bin/start.sh old mode 100755 new mode 100644 index 9b74d72..16a407a --- a/bin/start.sh +++ b/bin/start.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source common.bash . diff --git a/bin/stop.sh b/bin/stop.sh old mode 100755 new mode 100644 index 01a2252..f8838d1 --- a/bin/stop.sh +++ b/bin/stop.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash source common.bash . diff --git a/bin/test.sh b/bin/test.sh old mode 100755 new mode 100644 index 6d4b8be..b035ae8 --- a/bin/test.sh +++ b/bin/test.sh @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #!/bin/bash bats tests \ No newline at end of file diff --git a/common.bash.sample b/common.bash.sample index 96e0143..b878f76 100644 --- a/common.bash.sample +++ b/common.bash.sample @@ -1,2 +1,17 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# maintainer="tier" imagename="imagename-replaceme-in-common-bash" \ No newline at end of file From 5d4965c220d6c7e72a8bd52052e2a3afd1c1918c Mon Sep 17 00:00:00 2001 From: villadalmine Date: Thu, 15 Sep 2016 18:23:23 -0300 Subject: [PATCH 02/12] Added comment --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 7818108..09f9b77 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ +# Licensed to the University Corporation for Advanced Internet Development, +# Inc. (UCAID) under one or more contributor license agreements. See the +# NOTICE file distributed with this work for additional information regarding +# copyright ownership. The UCAID licenses this file to You under the Apache +# License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # util This repository is intended to be downloaded into a container repository during development for convenience purposes. Since the major mechanisms of developing to the Docker container construction lifecycle are identical across container images, this repository allows for consistency and additional ease of use across all container images. From 21480462ddf07a45f7b43440b0bd5d2bea352656 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Thu, 15 Sep 2016 18:25:10 -0300 Subject: [PATCH 03/12] Added Comment --- Jenkinsfile.sample | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile.sample b/Jenkinsfile.sample index c4b3931..5141f43 100644 --- a/Jenkinsfile.sample +++ b/Jenkinsfile.sample @@ -1,3 +1,18 @@ +// Licensed to the University Corporation for Advanced Internet Development, +// Inc. (UCAID) under one or more contributor license agreements. See the +// NOTICE file distributed with this work for additional information regarding +// copyright ownership. The UCAID licenses this file to You under the Apache +// License, Version 2.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// node { stage 'Checkout' @@ -85,4 +100,4 @@ def handleError(String message){ slackSend color: 'danger', message: "${message}" //step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'chris.bynum@levvel.io', sendToIndividuals: true]) sh 'exit 1' -} \ No newline at end of file +} From 1846a568da5b7d8b41b56dc6e2fae338d46add21 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:46:58 -0300 Subject: [PATCH 04/12] Update build.sh --- bin/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index 04efe18..dd2c4f8 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,9 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash + source common.bash . echo "Building new Docker image($maintainer/$imagename)" -docker build --rm -t $maintainer/$imagename --build-arg maintainer=$maintainer --build-arg imagename=$imagename --build-arg version=$version . \ No newline at end of file +docker build --rm -t $maintainer/$imagename --build-arg maintainer=$maintainer --build-arg imagename=$imagename --build-arg version=$version . From 32da725f89a5bfaa0f0f863bc8ef7891d3aa294e Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:47:13 -0300 Subject: [PATCH 05/12] Update destroy.sh --- bin/destroy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/destroy.sh b/bin/destroy.sh index f0cd1e8..8eabd5c 100644 --- a/bin/destroy.sh +++ b/bin/destroy.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash + source common.bash . From ce56edc8a5bfa9244761429594643dbf1fb5007a Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:47:26 -0300 Subject: [PATCH 06/12] Update install.sh --- bin/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index 046ae4a..8d67e3e 100644 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/usr/bin/env bash + git clone git@github.internet2.edu:docker/util.git find util/bin -name "*.sh" -exec sh -c 'echo "$1" | sed "s/util\///" >> .gitignore' -- {} \; mkdir -p bin @@ -25,4 +26,4 @@ fi if [ ! -f Jenkinsfile ]; then mv util/Jenkinsfile.sample Jenkinsfile fi -rm -rf util \ No newline at end of file +rm -rf util From 4352cc6cffa751050285f8f7fdca8b720322112a Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:47:37 -0300 Subject: [PATCH 07/12] Update rebuild.sh --- bin/rebuild.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/rebuild.sh b/bin/rebuild.sh index 54938bb..e16909b 100644 --- a/bin/rebuild.sh +++ b/bin/rebuild.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,6 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash -source bin/destroy.sh && source bin/build.sh \ No newline at end of file + +source bin/destroy.sh && source bin/build.sh From a882b3d1ff1f7d650e57800c320e61ab9351fc8a Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:47:48 -0300 Subject: [PATCH 08/12] Update rerun.sh --- bin/rerun.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/rerun.sh b/bin/rerun.sh index cc52bac..85bf07b 100644 --- a/bin/rerun.sh +++ b/bin/rerun.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,6 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash -source bin/rebuild.sh && source bin/run.sh $1 \ No newline at end of file + +source bin/rebuild.sh && source bin/run.sh $1 From 17f4038ac0e016bc907319d105d51a0f4cdbbf73 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:48:06 -0300 Subject: [PATCH 09/12] Update run.sh --- bin/run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/run.sh b/bin/run.sh index f243402..70641f8 100644 --- a/bin/run.sh +++ b/bin/run.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash + source common.bash . -docker run -it $maintainer/$imagename $1 \ No newline at end of file +docker run -it $maintainer/$imagename $1 From 9b1eb0ef0c256333911fc030ee41be209aa2c95c Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:48:52 -0300 Subject: [PATCH 10/12] Update start.sh --- bin/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/start.sh b/bin/start.sh index 16a407a..aa3ce35 100644 --- a/bin/start.sh +++ b/bin/start.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,11 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash + source common.bash . echo "Building new Docker image($registry/$maintainer/$imagename)" docker run --name=$imagename -d $maintainer/$imagename -exit 0 \ No newline at end of file +exit 0 From 84c2019364e5dcf7777ef5df29e17b63babc65d2 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:49:03 -0300 Subject: [PATCH 11/12] Update stop.sh --- bin/stop.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/stop.sh b/bin/stop.sh index f8838d1..d159175 100644 --- a/bin/stop.sh +++ b/bin/stop.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash + source common.bash . From 8eb2382e95ba05bd37d0fc4ddcd41df0b59c1a7b Mon Sep 17 00:00:00 2001 From: villadalmine Date: Fri, 16 Sep 2016 10:49:21 -0300 Subject: [PATCH 12/12] Update test.sh --- bin/test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/test.sh b/bin/test.sh index b035ae8..b9f3d0f 100644 --- a/bin/test.sh +++ b/bin/test.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the University Corporation for Advanced Internet Development, # Inc. (UCAID) under one or more contributor license agreements. See the # NOTICE file distributed with this work for additional information regarding @@ -13,6 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash -bats tests \ No newline at end of file + +bats tests