Skip to content

Commit

Permalink
chore(ci): remove legacy ECR (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek authored Nov 29, 2021
1 parent 09e86f4 commit e189adb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 92 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/dev_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,6 @@ jobs:
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORM=${{ matrix.arch_os }}
# TODO: should be removed after sumologic ECR alias migration
- name: Login to legacy ECR
run: make login-legacy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.LEGACY_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LEGACY_AWS_SECRET_ACCESS_KEY }}

- name: Build and push image to legacy ECR
run: |
cp otelcol-sumo-${{ matrix.arch_os }} otelcol-sumo
make build-push-container-multiplatform-legacy-dev \
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORM=${{ matrix.arch_os }}
push-docker-manifest:
name: Push joint container manifest
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -228,16 +214,3 @@ jobs:
make push-container-manifest-dev \
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORMS="linux/amd64 linux/arm64"
# TODO: should be removed after sumologic ECR alias migration
- name: Login to legacy ECR
run: make login-legacy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.LEGACY_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LEGACY_AWS_SECRET_ACCESS_KEY }}

- name: Push joint container manifest for all platforms to legacy ECR
run: |
make push-container-manifest-legacy-dev \
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORMS="linux/amd64 linux/arm64"
27 changes: 0 additions & 27 deletions .github/workflows/release_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@ jobs:
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORM=${{ matrix.arch_os }}
# TODO: should be removed after sumologic ECR alias migration
- name: Login to legacy ECR
run: make login-legacy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.LEGACY_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LEGACY_AWS_SECRET_ACCESS_KEY }}

- name: Build and push image to legacy ECR
run: |
cp artifacts/${{ steps.set_filename.outputs.filename }} otelcol-sumo
make build-push-container-multiplatform-legacy \
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORM=${{ matrix.arch_os }}
push-docker-manifest:
name: Push joint container manifest
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -185,19 +171,6 @@ jobs:
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORMS="linux/amd64 linux/arm64"
# TODO: should be removed after sumologic ECR alias migration
- name: Login to legacy ECR
run: make login-legacy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.LEGACY_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LEGACY_AWS_SECRET_ACCESS_KEY }}

- name: Push joint container manifest for all platforms to legacy ECR
run: |
make push-container-manifest-legacy \
BUILD_TAG=${{ steps.extract_tag.outputs.tag }} \
PLATFORMS="linux/amd64 linux/arm64"
create-release:
name: Create Github release
runs-on: ubuntu-20.04
Expand Down
39 changes: 1 addition & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ BUILD_CACHE_TAG = latest-builder-cache
IMAGE_NAME = sumologic-otel-collector
IMAGE_NAME_DEV = sumologic-otel-collector-dev

LEGACY_ECR_URL = public.ecr.aws/sumologic
LEGACY_REPO_URL = $(LEGACY_ECR_URL)/$(IMAGE_NAME)
LEGACY_REPO_URL_DEV = $(LEGACY_ECR_URL)/$(IMAGE_NAME_DEV)

OPENSOURCE_ECR_URL = public.ecr.aws/a4t4y2n3
OPENSOURCE_ECR_URL = public.ecr.aws/sumologic
OPENSOURCE_REPO_URL = $(OPENSOURCE_ECR_URL)/$(IMAGE_NAME)
OPENSOURCE_REPO_URL_DEV = $(OPENSOURCE_ECR_URL)/$(IMAGE_NAME_DEV)

Expand Down Expand Up @@ -137,20 +133,6 @@ push-container-manifest-dev:
REPO_URL="$(OPENSOURCE_REPO_URL_DEV)" \
./ci/push_docker_multiplatform_manifest.sh $(PLATFORMS)

.PHONY: build-push-container-multiplatform-legacy-dev
build-push-container-multiplatform-legacy-dev:
BUILD_TAG="$(BUILD_TAG)" \
REPO_URL="$(LEGACY_REPO_URL_DEV)" \
DOCKERFILE="Dockerfile_dev" \
PLATFORM="$(PLATFORM)" \
./ci/build-push-multiplatform.sh --push

.PHONY: push-container-manifest-legacy-dev
push-container-manifest-legacy-dev:
BUILD_TAG="$(BUILD_TAG)" \
REPO_URL="$(LEGACY_REPO_URL_DEV)" \
./ci/push_docker_multiplatform_manifest.sh $(PLATFORMS)

# release

.PHONY: _build-container-multiplatform
Expand All @@ -173,26 +155,12 @@ build-push-container-multiplatform:
test-built-image:
docker run --rm "$(OPENSOURCE_REPO_URL):$(BUILD_TAG)" --version

.PHONY: build-push-container-multiplatform-legacy
build-push-container-multiplatform-legacy:
BUILD_TAG="$(BUILD_TAG)" \
REPO_URL="$(LEGACY_REPO_URL)" \
DOCKERFILE="Dockerfile" \
PLATFORM="$(PLATFORM)" \
./ci/build-push-multiplatform.sh --push

.PHONY: push-container-manifest
push-container-manifest:
BUILD_TAG="$(BUILD_TAG)" \
REPO_URL="$(OPENSOURCE_REPO_URL)" \
./ci/push_docker_multiplatform_manifest.sh $(PLATFORMS)

.PHONY: push-container-manifest-legacy
push-container-manifest-legacy:
BUILD_TAG="$(BUILD_TAG)" \
REPO_URL="$(LEGACY_REPO_URL)" \
./ci/push_docker_multiplatform_manifest.sh $(PLATFORMS)

#-------------------------------------------------------------------------------

.PHONY: _login
Expand All @@ -204,8 +172,3 @@ _login:
login:
$(MAKE) _login \
ECR_URL="$(OPENSOURCE_ECR_URL)"

.PHONY: login-legacy
login-legacy:
$(MAKE) _login \
ECR_URL="$(LEGACY_ECR_URL)"

0 comments on commit e189adb

Please sign in to comment.