Skip to content

Commit

Permalink
ClickHouse patches
Browse files Browse the repository at this point in the history
Fix auth to GCP, drop building RPM/DEBs

Drop RPM/DEB from build flow
  • Loading branch information
RoryCrispin authored and Garbett1 committed Oct 24, 2024
1 parent a080642 commit 3b5de3b
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 144 deletions.
65 changes: 42 additions & 23 deletions .github/workflows/build-test-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -160,12 +160,20 @@ jobs:
run: |
make -j2 generate
git diff --exit-code ':!*go.sum' || (echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.' && exit 1)
- name: Check gendependabot
run: |
make -j2 gendependabot
git diff --exit-code ':!*go.sum' || (echo 'dependabot.yml is out of date, please run "make gendependabot" and commit the changes in this PR.' && exit 1)
- name: MultimodVerify
run: make multimod-verify
- name: Components dropdown in issue templates
run: |
make generate-gh-issue-templates
git diff --exit-code '.github/ISSUE_TEMPLATE' || (echo 'Dropdowns in issue templates are out of date, please run "make generate-gh-issue-templates" and commit the changes in this PR.' && exit 1)
unittest-matrix:
strategy:
matrix:
go-version: ["1.21.12"]
go-version: ["1.21", "1.20"] # 1.20 is interpreted as 1.2 without quotes
group:
- receiver-0
- receiver-1
Expand Down Expand Up @@ -214,7 +222,7 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]' && always() }}
strategy:
matrix:
go-version: ["1.21.12"]
go-version: ["1.21", "1.20"] # 1.20 is interpreted as 1.2 without quotes
runs-on: ubuntu-latest
needs: [setup-environment, unittest-matrix]
steps:
Expand All @@ -239,7 +247,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand All @@ -260,7 +268,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand All @@ -287,7 +295,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -339,7 +347,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -375,7 +383,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.12"
go-version: 1.21
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down Expand Up @@ -417,6 +425,13 @@ jobs:
BUILD_VERSION="${BASE_VERSION}-${SANITIZED_BRANCH}-${RUN_NUMBER}"
echo "BUILD_VERSION=${BUILD_VERSION}" | tee -a $GITHUB_ENV $GITHUB_OUTPUT
- name: Build Docker Image
run: |
make docker-otelcontribcol
docker tag otelcontribcol:latest 609927696493.dkr.ecr.us-west-2.amazonaws.com/opentelemetry-collector-contrib:${{ steps.create-version.outputs.BUILD_VERSION }}
- name: Validate Docker Image
run: |
docker run 609927696493.dkr.ecr.us-west-2.amazonaws.com/opentelemetry-collector-contrib:${{ steps.create-version.outputs.BUILD_VERSION }} --version
- id: login-azure
name: Authenticate with Azure
uses: azure/login@v2
Expand Down Expand Up @@ -463,16 +478,20 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: build and push
uses: docker/build-push-action@v5
with:
push: true
context: .
file: ./cmd/otelcontribcol/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
609927696493.dkr.ecr.us-west-2.amazonaws.com/opentelemetry-collector-contrib:${{steps.create-version.outputs.BUILD_VERSION}}
${{secrets.AAR_REPO_IMAGE}}:${{steps.create-version.outputs.BUILD_VERSION}}
${{secrets.GCR_ASIA_IMAGE}}:${{steps.create-version.outputs.BUILD_VERSION}}
${{secrets.GCR_EUROPE_IMAGE}}:${{steps.create-version.outputs.BUILD_VERSION}}
${{secrets.GCR_US_IMAGE}}:${{steps.create-version.outputs.BUILD_VERSION}}
- name: Push Docker Image
run: |
docker push 609927696493.dkr.ecr.us-west-2.amazonaws.com/opentelemetry-collector-contrib:${{ steps.create-version.outputs.BUILD_VERSION }}
- name: Push image to GCP
env:
DOCKER_IMAGE: otelcontribcol
BUILD_VERSION: ${{steps.create-version.outputs.BUILD_VERSION}}
GCR_ASIA_IMAGE: ${{secrets.GCR_ASIA_IMAGE}}
GCR_EUROPE_IMAGE: ${{secrets.GCR_EUROPE_IMAGE}}
GCR_US_IMAGE: ${{secrets.GCR_US_IMAGE}}
run: |
docker tag $DOCKER_IMAGE:latest ${GCR_ASIA_IMAGE}:${BUILD_VERSION}
docker tag $DOCKER_IMAGE:latest ${GCR_EUROPE_IMAGE}:${BUILD_VERSION}
docker tag $DOCKER_IMAGE:latest ${GCR_US_IMAGE}:${BUILD_VERSION}
docker push -a ${GCR_ASIA_IMAGE}
docker push -a ${GCR_EUROPE_IMAGE}
docker push -a ${GCR_US_IMAGE}
Empty file.
Loading

0 comments on commit 3b5de3b

Please sign in to comment.