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

Make running forks a bit easier #693

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
86 changes: 77 additions & 9 deletions .github/workflows/dev_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ on:
- 'release-v[0-9]+.[0-9]+'

env:
SIDECAR_IMAGE: "ghcr.io/sumologic/tailing-sidecar"
OPERATOR_IMAGE: "ghcr.io/sumologic/tailing-sidecar-operator"
ECR_URL: public.ecr.aws/sumologic
SIDECAR_IMAGE_ECR: "public.ecr.aws/sumologic/tailing-sidecar-dev"
OPERATOR_IMAGE_ECR: "public.ecr.aws/sumologic/tailing-sidecar-operator-dev"
SIDECAR_IMAGE_DOCKERHUB: "sumologic/tailing-sidecar-dev"
OPERATOR_IMAGE_DOCKERHUB: "sumologic/tailing-sidecar-operator-dev"
SIDECAR_IMAGE: ${{ vars.OVERRIDE_SIDECAR_IMAGE || 'ghcr.io/sumologic/tailing-sidecar' }}
OPERATOR_IMAGE: ${{ vars.OVERRIDE_OPERATOR_IMAGE || 'ghcr.io/sumologic/tailing-sidecar-operator' }}
ECR_URL: ${{ vars.OVERRIDE_ECR_URL || 'public.ecr.aws/sumologic' }}
SIDECAR_IMAGE_ECR: ${{ vars.OVERRIDE_SIDECAR_IMAGE_ECR || 'public.ecr.aws/sumologic/tailing-sidecar-dev' }}
OPERATOR_IMAGE_ECR: ${{ vars.OVERRIDE_OPERATOR_IMAGE_ECR || 'public.ecr.aws/sumologic/tailing-sidecar-operator-dev' }}
SIDECAR_IMAGE_DOCKERHUB: ${{ vars.OVERRIDE_SIDECAR_IMAGE_DOCKERHUB || 'sumologic/tailing-sidecar-dev' }}
OPERATOR_IMAGE_DOCKERHUB: ${{ vars.OVERRIDE_OPERATOR_IMAGE_DOCKERHUB || 'sumologic/tailing-sidecar-operator-dev' }}
LATEST_TAG: "main"

jobs:
build-fluentbit-sidecar:
build-fluentbit-sidecar-ghcr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -51,6 +51,21 @@ jobs:
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit

build-fluentbit-sidecar-ecr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo $(git describe --tags --always))" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log in to AWS Public ECR to publish tailing sidecar image
run: make login-ecr
env:
Expand All @@ -69,6 +84,21 @@ jobs:
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit

build-fluentbit-sidecar-dockerhub:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo $(git describe --tags --always))" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
Expand Down Expand Up @@ -127,7 +157,7 @@ jobs:
make release-dev
working-directory: ./sidecar/otelcol

build-operator:
build-operator-ghcr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -165,6 +195,25 @@ jobs:
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./operator

build-operator-ecr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo $(git describe --tags --always))" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log in to AWS Public ECR to publish tailing sidecar operator image
run: make login-ecr
env:
Expand All @@ -183,6 +232,25 @@ jobs:
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./operator

build-operator-dockerhub:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo $(git describe --tags --always))" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
Expand Down
84 changes: 75 additions & 9 deletions .github/workflows/release_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
SIDECAR_IMAGE: "ghcr.io/sumologic/tailing-sidecar"
OPERATOR_IMAGE: "ghcr.io/sumologic/tailing-sidecar-operator"
ECR_URL: public.ecr.aws/sumologic
SIDECAR_IMAGE_ECR: "public.ecr.aws/sumologic/tailing-sidecar"
OPERATOR_IMAGE_ECR: "public.ecr.aws/sumologic/tailing-sidecar-operator"
SIDECAR_IMAGE_DOCKERHUB: "sumologic/tailing-sidecar"
OPERATOR_IMAGE_DOCKERHUB: "sumologic/tailing-sidecar-operator"
SIDECAR_IMAGE: ${{ vars.OVERRIDE_SIDECAR_IMAGE || 'ghcr.io/sumologic/tailing-sidecar' }}
OPERATOR_IMAGE: ${{ vars.OVERRIDE_OPERATOR_IMAGE || 'ghcr.io/sumologic/tailing-sidecar-operator' }}
ECR_URL: ${{ vars.OVERRIDE_ECR_URL || 'public.ecr.aws/sumologic' }}
SIDECAR_IMAGE_ECR: ${{ vars.OVERRIDE_SIDECAR_IMAGE_ECR || 'public.ecr.aws/sumologic/tailing-sidecar-dev' }}
OPERATOR_IMAGE_ECR: ${{ vars.OVERRIDE_OPERATOR_IMAGE_ECR || 'public.ecr.aws/sumologic/tailing-sidecar-operator-dev' }}
SIDECAR_IMAGE_DOCKERHUB: ${{ vars.OVERRIDE_SIDECAR_IMAGE_DOCKERHUB || 'sumologic/tailing-sidecar-dev' }}
OPERATOR_IMAGE_DOCKERHUB: ${{ vars.OVERRIDE_OPERATOR_IMAGE_DOCKERHUB || 'sumologic/tailing-sidecar-operator-dev' }}
LATEST_TAG: "latest"

jobs:
build-sidecar:
build-sidecar-ghcr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -50,6 +50,21 @@ jobs:
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit

build-sidecar-ecr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running release build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log in to AWS Public ECR to publish tailing sidecar image
run: make login-ecr
env:
Expand All @@ -68,6 +83,21 @@ jobs:
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit

build-sidecar-dockerhub:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running release build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
Expand All @@ -86,7 +116,7 @@ jobs:
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_DOCKERHUB }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit

build-operator:
build-operator-ghcr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -124,6 +154,24 @@ jobs:
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./operator

build-operator-ecr:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running release build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log in to AWS Public ECR to publish tailing sidecar operator image
run: make login-ecr
env:
Expand All @@ -142,6 +190,24 @@ jobs:
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./operator

build-operator-dockerhub:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running release build for ${{ steps.extract_tag.outputs.tag }}"

- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
Expand Down
Loading