Skip to content

Commit

Permalink
try with nightly image
Browse files Browse the repository at this point in the history
  • Loading branch information
pront committed Sep 18, 2023
1 parent cf9ece6 commit ce80946
Showing 1 changed file with 93 additions and 92 deletions.
185 changes: 93 additions & 92 deletions .github/workflows/workload_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit ce80946

Please sign in to comment.