Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): remove legacy ECR #353

Merged
merged 2 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)"