diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 56e3209..d437553 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -28,9 +28,8 @@ ARG VERSION_ARGO_CD_CLI=2.8.3 # https://github.com/GlueOps/terraform-module-kubernetes-hashicorp-vault-configuration/wiki ENV VAULT_SKIP_VERIFY true ENV CLOUDSDK_INSTALL_DIR /usr/local/gcloud/ -COPY ../tools/tools.sh /etc/tools.sh -COPY ../tools/add-tools-to-shells.sh /tmp/add-tools-to-shells.sh -RUN chmod +x /tmp/add-tools-to-shells.sh && /tmp/add-tools-to-shells.sh +ADD ../tools/add-to-bashrc.sh /tmp/add-to-bashrc.sh +RUN chmod +x /tmp/add-to-bashrc.sh && ./tmp/add-to-bashrc.sh RUN curl -Lo /usr/local/bin/kubectl https://dl.k8s.io/release/v${VERSION_KUBECTL}/bin/linux/amd64/kubectl \ && chmod +x /usr/local/bin/kubectl \ && curl -Lo terraform_${VERSION_TERRAFORM}_linux_amd64.zip https://releases.hashicorp.com/terraform/${VERSION_TERRAFORM}/terraform_${VERSION_TERRAFORM}_linux_amd64.zip \ diff --git a/.devcontainer/tools/tools.sh b/.devcontainer/tools/add-to-bashrc.sh similarity index 98% rename from .devcontainer/tools/tools.sh rename to .devcontainer/tools/add-to-bashrc.sh index de47802..07f610d 100755 --- a/.devcontainer/tools/tools.sh +++ b/.devcontainer/tools/add-to-bashrc.sh @@ -1,5 +1,8 @@ #!/bin/bash + +echo ' + run-gha() { #https://stackoverflow.com/questions/6245570/how-do-i-get-the-current-branch-name-in-git gh workflow run --ref=$(git rev-parse --abbrev-ref HEAD) @@ -79,3 +82,4 @@ create-ghcr-regcred() { echo "{\"auths\":{\"ghcr.io\":{\"auth\":\"$b64_enc_regcred\"}}}" } +' >> /home/vscode/.bashrc diff --git a/.devcontainer/tools/add-tools-to-shells.sh b/.devcontainer/tools/add-tools-to-shells.sh deleted file mode 100755 index 7e5c408..0000000 --- a/.devcontainer/tools/add-tools-to-shells.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -tools_file="/etc/tools.sh" - -add_tools_to_shell() { - local rc_file="$1" - if [ -f "$rc_file" ]; then - echo "source $tools_file" >> "$rc_file" - fi -} - -# bash -add_tools_to_shell "$HOME/.bashrc" - -# zsh -add_tools_to_shell "$HOME/.zshrc"