-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d277be8
commit 5dae5e5
Showing
11 changed files
with
484 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
# template: 1.0.0 | ||
# template-import: 1.0.0 | ||
####################################### | ||
# ArgoCD / App / List | ||
# | ||
# Version: 1.0.0 | ||
# | ||
####################################### | ||
# Copyright [2024] [serdigital64@gmail.com] | ||
# | ||
# Licensed 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. | ||
####################################### | ||
|
||
# | ||
# Imports | ||
# | ||
|
||
declare S64_CORE_PATH_ROOT="${S64_CORE_PATH_ROOT:-/opt/sysop64}" | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/core/core-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/argocd/argocd-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck disable=SC2015 source-path=SCRIPTDIR/../../lib/bl64 | ||
source "${S64_CORE_PATH_BL64}/bashlib64-core.bash" || | ||
{ echo "Error: unable to load bashlib64" && exit 1; } | ||
|
||
# | ||
# Functions | ||
# | ||
|
||
function initialize() { | ||
bl64_dbg_app_show_function | ||
s64_argocd_lib_setup | ||
} | ||
|
||
# | ||
# Main | ||
# | ||
|
||
declare command='argocd-app-list' | ||
|
||
bl64_dbg_set_level "$S64_CORE_SET_DEBUG" && bl64_msg_set_level "$S64_CORE_SET_VERBOSE" || exit $? | ||
initialize || exit $? | ||
|
||
bl64_msg_show_batch_start "$command" | ||
s64_argocd_lib_run_argocd \ | ||
app \ | ||
list | ||
bl64_msg_show_batch_finish $? "$command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env bash | ||
# template: 1.0.0 | ||
# template-import: 1.0.0 | ||
####################################### | ||
# ArgoCD / App / Sync | ||
# | ||
# Version: 1.0.0 | ||
# | ||
####################################### | ||
# Copyright [2024] [serdigital64@gmail.com] | ||
# | ||
# Licensed 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. | ||
####################################### | ||
|
||
# | ||
# Imports | ||
# | ||
|
||
declare S64_CORE_PATH_ROOT="${S64_CORE_PATH_ROOT:-/opt/sysop64}" | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/core/core-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/argocd/argocd-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck disable=SC2015 source-path=SCRIPTDIR/../../lib/bl64 | ||
source "${S64_CORE_PATH_BL64}/bashlib64-core.bash" || | ||
{ echo "Error: unable to load bashlib64" && exit 1; } | ||
|
||
# | ||
# Functions | ||
# | ||
|
||
function initialize() { | ||
bl64_dbg_app_show_function | ||
bl64_check_parameter 'app_name' && | ||
s64_argocd_lib_setup | ||
} | ||
|
||
# | ||
# Main | ||
# | ||
|
||
declare command='argocd-app-sync' | ||
declare app_name="${1:-}" | ||
|
||
bl64_dbg_set_level "$S64_CORE_SET_DEBUG" && bl64_msg_set_level "$S64_CORE_SET_VERBOSE" || exit $? | ||
initialize || exit $? | ||
|
||
bl64_msg_show_batch_start "$command" | ||
s64_argocd_lib_run_argocd \ | ||
app \ | ||
sync \ | ||
"$app_name" | ||
bl64_msg_show_batch_finish $? "$command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/usr/bin/env bash | ||
# template: 1.0.0 | ||
# template-import: 1.0.0 | ||
####################################### | ||
# ArgoCD / CLI / Context set | ||
# | ||
# Version: 1.0.0 | ||
# | ||
####################################### | ||
# Copyright [2024] [serdigital64@gmail.com] | ||
# | ||
# Licensed 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. | ||
####################################### | ||
|
||
# | ||
# Imports | ||
# | ||
|
||
declare S64_CORE_PATH_ROOT="${S64_CORE_PATH_ROOT:-/opt/sysop64}" | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/core/core-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/argocd/argocd-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck disable=SC2015 source-path=SCRIPTDIR/../../lib/bl64 | ||
source "${S64_CORE_PATH_BL64}/bashlib64-core.bash" || | ||
{ echo "Error: unable to load bashlib64" && exit 1; } | ||
|
||
# | ||
# Functions | ||
# | ||
|
||
function initialize() { | ||
bl64_dbg_app_show_function | ||
s64_argocd_lib_setup | ||
} | ||
|
||
# | ||
# Main | ||
# | ||
|
||
declare command='argocd-cli-context-set' | ||
|
||
bl64_dbg_set_level "$S64_CORE_SET_DEBUG" && bl64_msg_set_level "$S64_CORE_SET_VERBOSE" || exit $? | ||
initialize || exit $? | ||
|
||
bl64_msg_show_batch_start "$command" | ||
bl64_msg_show_setup \ | ||
'Configuring KubeCTL context for ArgoCD CLI' \ | ||
'S64_ARGOCD_SET_CONTEXT_CLUSTER' \ | ||
'S64_ARGOCD_SET_CONTEXT_NAMESPACE' \ | ||
'S64_ARGOCD_SET_CONTEXT_NAME' | ||
|
||
bl64_k8s_run_kubectl \ | ||
"$BL64_VAR_DEFAULT" \ | ||
config set-context \ | ||
--cluster="$S64_ARGOCD_SET_CONTEXT_CLUSTER" \ | ||
--namespace="$S64_ARGOCD_SET_CONTEXT_NAMESPACE" \ | ||
"$S64_ARGOCD_SET_CONTEXT_NAME" && | ||
bl64_k8s_run_kubectl \ | ||
"$BL64_VAR_DEFAULT" \ | ||
config use-context \ | ||
"$S64_ARGOCD_SET_CONTEXT_NAME" | ||
|
||
bl64_msg_show_batch_finish $? "$command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
# template: 1.0.0 | ||
# template-import: 1.0.0 | ||
####################################### | ||
# ArgoCD / Cluster / List | ||
# | ||
# Version: 1.0.0 | ||
# | ||
####################################### | ||
# Copyright [2024] [serdigital64@gmail.com] | ||
# | ||
# Licensed 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. | ||
####################################### | ||
|
||
# | ||
# Imports | ||
# | ||
|
||
declare S64_CORE_PATH_ROOT="${S64_CORE_PATH_ROOT:-/opt/sysop64}" | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/core/core-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck source-path=SCRIPTDIR/.. | ||
source "${S64_CORE_PATH_ROOT}/argocd/argocd-lib" || { echo "Error: unable to load module library" && exit 1; } | ||
# shellcheck disable=SC2015 source-path=SCRIPTDIR/../../lib/bl64 | ||
source "${S64_CORE_PATH_BL64}/bashlib64-core.bash" || | ||
{ echo "Error: unable to load bashlib64" && exit 1; } | ||
|
||
# | ||
# Functions | ||
# | ||
|
||
function initialize() { | ||
bl64_dbg_app_show_function | ||
s64_argocd_lib_setup | ||
} | ||
|
||
# | ||
# Main | ||
# | ||
|
||
declare command='argocd-cluster-list' | ||
|
||
bl64_dbg_set_level "$S64_CORE_SET_DEBUG" && bl64_msg_set_level "$S64_CORE_SET_VERBOSE" || exit $? | ||
initialize || exit $? | ||
|
||
bl64_msg_show_batch_start "$command" | ||
s64_argocd_lib_run_argocd \ | ||
cluster \ | ||
list | ||
bl64_msg_show_batch_finish $? "$command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.