Skip to content

Instantly share code, notes, and snippets.

View nathmahale's full-sized avatar
🐻‍❄️

mintosky_tankupathi nathmahale

🐻‍❄️
  • Melbourne,Victoria,Australia
  • 05:49 (UTC +10:00)
View GitHub Profile
@nathmahale
nathmahale / get-codepipeline-execution-id.py
Created March 6, 2024 11:35
Get pipeline execution ID from Codebuild | untested
from boto3 import client
import jmespath
import os
codepipeline_client = client('codepipeline')
codepipeline_name = (os.environ['CODEBUILD_INITIATOR'], 'codepipeline/')
pipeline_response = codepipeline_client.get_pipeline_state(
name="".join(codepipeline_name)
)
@nathmahale
nathmahale / 1-kubectl-commands.bash
Last active August 28, 2023 12:10
handy_commands
## get initial admin password
kubectl -n argocd get secrets argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d
## login to argocd server with cli
argocd login $(kubectl -n argocd get svc argocd-server --output=jsonpath='{.spec.clusterIP}') --insecure --username admin --password "<PASSWORD>" --insecure
## change service to NodePort
kubectl patch svc kubernetes-dashboard -n kubernetes-dashboard -p '{"spec": {"type": "NodePort"}}'
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'