Skip to content

Commit

Permalink
Merge pull request #307 from engedaam/create-karpenter-snapshot-for-fork
Browse files Browse the repository at this point in the history
Create karpenter snapshot for fork
  • Loading branch information
engedaam authored Apr 5, 2024
2 parents 7713f4f + 438ae77 commit 5c2c152
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
snapshot:
permissions:
id-token: write # aws-actions/[email protected]
if: github.repository == 'aws/karpenter-provider-aws'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand Down
14 changes: 8 additions & 6 deletions hack/release/common.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

GITHUB_ACCOUNT="aws"
AWS_ACCOUNT_ID="605559265918"
ECR_GALLERY_NAME="karpenter"
RELEASE_REPO_ECR="${RELEASE_REPO_ECR:-public.ecr.aws/${ECR_GALLERY_NAME}/}"

SNAPSHOT_ECR="021119463062.dkr.ecr.us-east-1.amazonaws.com"
SNAPSHOT_REPO_ECR="${SNAPSHOT_REPO_ECR:-${SNAPSHOT_ECR}/karpenter/snapshot/}"
RELEASE_REPO_ECR=${RELEASE_REPO_ECR:-public.ecr.aws/${ECR_GALLERY_NAME}/}
RELEASE_REPO_GH=${RELEASE_REPO_GH:-ghcr.io/${GITHUB_ACCOUNT}/karpenter/karp}

SNAPSHOT_ECR="${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com"
SNAPSHOT_REPO_ECR=${SNAPSHOT_REPO_ECR:-${SNAPSHOT_ECR}/karpenter/snapshot/}
CURRENT_MAJOR_VERSION="0"

snapshot() {
Expand Down Expand Up @@ -42,11 +44,11 @@ Helm Chart Version ${helm_chart_version}"
}

authenticate() {
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin "${RELEASE_REPO_ECR}"
aws ecr-public get-login-password --region us-west-2 | docker login --username AWS --password-stdin "${RELEASE_REPO_ECR}"
}

authenticatePrivateRepo() {
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin "${SNAPSHOT_ECR}"
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin ${SNAPSHOT_ECR}
}

build() {
Expand Down

0 comments on commit 5c2c152

Please sign in to comment.