From 4671142e0651b5f33747d6bde65cba6f3cb8cbb5 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:39:10 -0500 Subject: [PATCH 1/2] adding logic to deploy major tag versions as well Co-authored-by: Thomas Hughes Co-authored-by: John Wiebalk --- .automation/upload-docker.sh | 81 +++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/.automation/upload-docker.sh b/.automation/upload-docker.sh index fe1414d3..eefb5c50 100755 --- a/.automation/upload-docker.sh +++ b/.automation/upload-docker.sh @@ -26,6 +26,8 @@ REGISTRY="${REGISTRY}" # What registry to upload | or &1 + + ####################### + # Load the error code # + ####################### + ERROR_CODE=$? + + ############################## + # Check the shell for errors # + ############################## + if [ $ERROR_CODE -ne 0 ]; then + # ERROR + echo "ERROR! failed to [tag] Dockerfile!" + exit 1 + else + # SUCCESS + echo "Successfully tagged image!" + fi fi } ################################################################################ @@ -328,7 +378,7 @@ UploadImage() exit 1 else # SUCCESS - echo "Successfully Uploaded Docker image to $REGISTRY!" + echo "Successfully Uploaded Docker image:[$IMAGE_VERSION] to $REGISTRY!" fi ######################### @@ -371,6 +421,33 @@ UploadImage() echo "Size:[$SIZE]" echo "----------------------------------------------" fi + + ############################################################### + # Check if we need to upload the major tagged version as well # + ############################################################### + if [ $UPDATE_MAJOR_TAG -eq 1 ]; then + ############################################ + # Upload the docker image that was created # + ############################################ + docker push "$IMAGE_REPO:$MAJOR_TAG" 2>&1 + + ####################### + # Load the error code # + ####################### + ERROR_CODE=$? + + ############################## + # Check the shell for errors # + ############################## + if [ $ERROR_CODE -ne 0 ]; then + # ERROR + echo "ERROR! failed to [upload] MAJOR_TAG:[$MAJOR_TAG] Dockerfile!" + exit 1 + else + # SUCCESS + echo "Successfully Uploaded TAGOR_TAG:[$MAJOR_TAG] Docker image to $REGISTRY!" + fi + fi } ################################################################################ #### Function Footer ########################################################### From efb491d6cf17d956aed94dfa66e726e8e82305f2 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:52:36 -0500 Subject: [PATCH 2/2] fixed protobuf var Co-authored-by: Thomas Hughes Co-authored-by: John Wiebalk --- lib/linter.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index dea50fab..1981e71a 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -85,7 +85,7 @@ LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck" LANGUAGE_ARRAY=('YML' 'JSON' 'XML' 'MARKDOWN' 'BASH' 'PERL' 'PHP' 'RUBY' 'PYTHON' 'COFFEESCRIPT' 'ANSIBLE' 'JAVASCRIPT_STANDARD' 'JAVASCRIPT_ES' 'TYPESCRIPT_STANDARD' 'TYPESCRIPT_ES' 'DOCKER' 'GO' 'TERRAFORM' - 'CSS' 'ENV' 'POWERSHELL' 'KOTLIN' 'PROTO' 'CLOJURE' 'OPENAPI') + 'CSS' 'ENV' 'POWERSHELL' 'KOTLIN' 'PROTOBUF' 'CLOJURE' 'OPENAPI') ################### # GitHub ENV Vars # @@ -607,11 +607,6 @@ Footer() ########################### ERROR_COUNTER="ERRORS_FOUND_$LANGUAGE" - ################################# - # Fix Integer Expression errors # - ################################# - ERROR_COUNTER="${ERROR_COUNTER/.*}" - ################## # Print if not 0 # ##################