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
import dataclasses | |
from email import encoders | |
from email.mime.base import MIMEBase | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.utils import formataddr | |
from typing import List, Tuple | |
import boto3 |
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
import argparse | |
description = "Codeartifact Authentication Automation Commands Generation" | |
parser = argparse.ArgumentParser(description=description) | |
parser.add_argument('--aws-profile', help="AWS Profile", default="default") | |
parser.add_argument("--npm-auth", help="generate cmds for npm codeartifact", action="store_true") | |
parser.add_argument("--pypi-auth", help="generate cmds for pypi codeartifact", action="store_true") | |
parser.add_argument("--codeartifact-domain", help="codeartifact domain name", required=True) |
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
#!/bin/bash | |
# Parse command line arguments | |
while getopts "d:r:n:p:" opt; do | |
case $opt in | |
d) CODEARTIFACT_DOMAIN=$OPTARG ;; | |
r) CODEARTIFACT_REPO=$OPTARG ;; | |
n) NAMESPACE_LIST+=("$OPTARG") ;; | |
p) PROFILE=$OPTARG ;; | |
\?) echo "Invalid option -$OPTARG" >&2 |
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
import { useQuery, gql } from "@apollo/client"; | |
const GET_LOCATIONS = gql` | |
query getLocations { | |
locations { | |
id | |
name | |
description | |
photo | |
} |