-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
93 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,97 +85,97 @@ jobs: | |
## BUILD | ||
## | ||
|
||
build-target: | ||
name: Build target Vector container | ||
runs-on: [linux, ubuntu-20.04-4core] | ||
needs: | ||
- compute-metadata | ||
steps: | ||
- uses: colpal/actions-clean@v1 | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ needs.compute-metadata.outputs.target-sha }} | ||
path: target-vector | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Build 'vector' target image | ||
uses: docker/[email protected] | ||
with: | ||
context: target-vector/ | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
file: regression/Dockerfile | ||
builder: ${{ steps.buildx.outputs.name }} | ||
outputs: type=docker,dest=${{ runner.temp }}/target-image.tar | ||
tags: | | ||
vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
- name: Upload image as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: target-image | ||
path: "${{ runner.temp }}/target-image.tar" | ||
|
||
confirm-valid-credentials: | ||
name: Confirm AWS credentials are minimally valid | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- compute-metadata | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
|
||
- name: Download SMP binary | ||
run: | | ||
aws s3 cp s3://smp-cli-releases/v${{ needs.compute-metadata.outputs.smp-version }}/x86_64-unknown-linux-gnu/smp ${{ runner.temp }}/bin/smp | ||
upload-target-image-to-ecr: | ||
name: Upload target images to ECR | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- compute-metadata | ||
- confirm-valid-credentials | ||
- build-target | ||
steps: | ||
- name: 'Download target image' | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: target-image | ||
|
||
- name: Load target image | ||
run: | | ||
docker load --input target-image.tar | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Docker Login to ECR | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ steps.login-ecr.outputs.registry }} | ||
|
||
- name: Tag & push target image | ||
run: | | ||
docker tag vector:${{ needs.compute-metadata.outputs.target-sha }} ${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
docker push ${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
# build-target: | ||
# name: Build target Vector container | ||
# runs-on: [linux, ubuntu-20.04-4core] | ||
# needs: | ||
# - compute-metadata | ||
# steps: | ||
# - uses: colpal/actions-clean@v1 | ||
# | ||
# - uses: actions/checkout@v3 | ||
# | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ needs.compute-metadata.outputs.target-sha }} | ||
# path: target-vector | ||
# | ||
# - name: Set up Docker Buildx | ||
# id: buildx | ||
# uses: docker/[email protected] | ||
# | ||
# - name: Build 'vector' target image | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: target-vector/ | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
# file: regression/Dockerfile | ||
# builder: ${{ steps.buildx.outputs.name }} | ||
# outputs: type=docker,dest=${{ runner.temp }}/target-image.tar | ||
# tags: | | ||
# vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
# | ||
# - name: Upload image as artifact | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: target-image | ||
# path: "${{ runner.temp }}/target-image.tar" | ||
# | ||
# confirm-valid-credentials: | ||
# name: Confirm AWS credentials are minimally valid | ||
# runs-on: ubuntu-22.04 | ||
# needs: | ||
# - compute-metadata | ||
# steps: | ||
# - name: Configure AWS Credentials | ||
# uses: aws-actions/[email protected] | ||
# with: | ||
# aws-access-key-id: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_ACCESS_KEY_ID }} | ||
# aws-secret-access-key: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_SECRET_ACCESS_KEY }} | ||
# aws-region: us-west-2 | ||
# | ||
# - name: Download SMP binary | ||
# run: | | ||
# aws s3 cp s3://smp-cli-releases/v${{ needs.compute-metadata.outputs.smp-version }}/x86_64-unknown-linux-gnu/smp ${{ runner.temp }}/bin/smp | ||
# | ||
# upload-target-image-to-ecr: | ||
# name: Upload target images to ECR | ||
# runs-on: ubuntu-22.04 | ||
# needs: | ||
# - compute-metadata | ||
# - confirm-valid-credentials | ||
# - build-target | ||
# steps: | ||
# - name: 'Download target image' | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: target-image | ||
# | ||
# - name: Load target image | ||
# run: | | ||
# docker load --input target-image.tar | ||
# | ||
# - name: Configure AWS Credentials | ||
# uses: aws-actions/[email protected] | ||
# with: | ||
# aws-access-key-id: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_ACCESS_KEY_ID }} | ||
# aws-secret-access-key: ${{ secrets.SINGLE_MACHINE_PERFORMANCE_BOT_SECRET_ACCESS_KEY }} | ||
# aws-region: us-west-2 | ||
# | ||
# - name: Login to Amazon ECR | ||
# id: login-ecr | ||
# uses: aws-actions/amazon-ecr-login@v1 | ||
# | ||
# - name: Docker Login to ECR | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# registry: ${{ steps.login-ecr.outputs.registry }} | ||
# | ||
# - name: Tag & push target image | ||
# run: | | ||
# docker tag vector:${{ needs.compute-metadata.outputs.target-sha }} ${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
# docker push ${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
|
||
## | ||
## SUBMIT | ||
|
@@ -224,7 +224,8 @@ jobs: | |
run: | | ||
chmod +x ${{ runner.temp }}/bin/smp | ||
TARGET_IMAGE =${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
# TARGET_IMAGE =${{ steps.login-ecr.outputs.registry }}/${{ secrets.SINGLE_MACHINE_PERFORMANCE_TEAM_ID }}-vector:${{ needs.compute-metadata.outputs.target-sha }} | ||
TARGET_IMAGE=timberio/vector:nightly-debian | ||
CURRENT_DATE=$(date --utc '+%Y_%m_%d') | ||
|
||
RUST_LOG="info,aws_config::profile::credentials=error" | ||
|