Last active
January 7, 2022 20:01
-
-
Save lodotek/054417c34780b3e747432981681ee10a to your computer and use it in GitHub Desktop.
aws eks task script (WIP) for concourse
This file contains hidden or 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
if [ -n "${CLUSTER_NAME}" ]; then | |
set -- "$@" --name "${CLUSTER_NAME}" | |
fi | |
if [ -n "${AWS_REGION}" ]; then | |
set -- "$@" --region "${AWS_REGION}" | |
fi | |
if [ -n "${AWS_PROFILE}" ]; then | |
set -- "$@" --profile "${AWS_PROFILE}" | |
fi | |
if [ -n "${KUBECONFIG_FILE_PATH}" ]; then | |
set -- "$@" --kubeconfig "${KUBECONFIG_FILE_PATH}" | |
fi | |
if [ -n "${ROLE_ARN}" ]; then | |
set -- "$@" --role-arn "${ROLE_ARN}" | |
fi | |
if [ -n "${CLUSTER_CONTEXT_ALIAS}" ]; then | |
set -- "$@" --alias "${CLUSTER_CONTEXT_ALIAS}" | |
fi | |
if [ "${DRY_RUN}" == "true" ]; then | |
set -- "$@" --dry-run | |
fi | |
if [ "${VERBOSE}" == "true" ]; then | |
set -- "$@" --verbose | |
fi | |
aws eks update-kubeconfig "$@" |
This file contains hidden or 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
--- | |
platform: linux | |
params: | |
AWS_PROFILE: | |
AWS_REGION: | |
CLUSTER_CONTEXT_ALIAS: | |
CLUSTER_NAME: | |
DRY_RUN: | |
KUBECONFIG_FILE_PATH: | |
ROLE_ARN: | |
VERBOSE: | |
caches: | |
- path: /root/.cache | |
inputs: | |
- name: master-pipeline | |
run: | |
path: master-pipeline/tasks/eks/task.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment