Skip to content

Commit

Permalink
adding remaining workflows (rapidfort#826)
Browse files Browse the repository at this point in the history
Signed-off-by: rajat <[email protected]>
  • Loading branch information
Rajat0002 authored Sep 26, 2024
1 parent bd6ca41 commit 415a082
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 3 deletions.
148 changes: 148 additions & 0 deletions .github/workflows/image_run_pr_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,80 @@ jobs:
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/clickhouse-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
cockroachdb-ib:
runs-on: ubuntu-latest

environment: actions-cicd-pr

steps:
- name: Import Coverage Tests
uses: actions/checkout@v4
with:
repository: rapidfort/community-images-core
token: ${{ secrets.COVERAGE_ACCESS_TOKEN }}


- name: Check if test required
id: test-required
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 scripts/tests_required.py cockroachdb-ib cockroachdb/ironbank output.txt
cat output.txt >> $GITHUB_OUTPUT

- name: Start minikube

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

with:
memory: 6g
driver: none
uses: medyagh/setup-minikube@master
- name: Check k8s cluster !

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

run: kubectl get pods -A
- name: Setup ubuntu
env:
RF_ACCESS_ID: ${{ secrets.RF_ACCESS_ID }}
RF_SECRET_ACCESS_KEY: ${{ secrets.RF_SECRET_ACCESS_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RF_PLATFORM_HOST: ${{ secrets.RF_PLATFORM_HOST }}
RF_APP_HOST: ${{ secrets.RF_APP_HOST }}

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

run: ./scripts/github-pipelines/setup.sh

- name: Set RF CLI Path
run: echo "/home/runner/work/community-images/community-images" >> $GITHUB_PATH


- name: Create images for testing PR
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RAPIDFORT_ACCOUNT: ${{ secrets.RAPIDFORT_ACCOUNT }}
IB_DOCKER_USERNAME: ${{ secrets.IB_DOCKER_USERNAME }}
IB_DOCKER_PASSWORD: ${{ secrets.IB_DOCKER_PASSWORD }}
if: ${{ steps.test-required.outputs.TEST_REQUIRED == 'yes' }}
run: python3 community_images/common/orchestrator/main.py hourly_run cockroachdb/ironbank


- name: Report pulls
env:
PULL_COUNTER_MAGIC_TOKEN: ${{ secrets.PULL_COUNTER_MAGIC_TOKEN }}

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

run: |
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/cockroachdb-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
consul:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -6376,6 +6450,80 @@ jobs:
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/k8s-sidecar-official": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
kafka-bridge-ib:
runs-on: ubuntu-latest

environment: actions-cicd-pr

steps:
- name: Import Coverage Tests
uses: actions/checkout@v4
with:
repository: rapidfort/community-images-core
token: ${{ secrets.COVERAGE_ACCESS_TOKEN }}


- name: Check if test required
id: test-required
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 scripts/tests_required.py kafka-bridge-ib kafka-bridge/ironbank output.txt
cat output.txt >> $GITHUB_OUTPUT

- name: Start minikube

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

with:
memory: 6g
driver: none
uses: medyagh/setup-minikube@master
- name: Check k8s cluster !

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

run: kubectl get pods -A
- name: Setup ubuntu
env:
RF_ACCESS_ID: ${{ secrets.RF_ACCESS_ID }}
RF_SECRET_ACCESS_KEY: ${{ secrets.RF_SECRET_ACCESS_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RF_PLATFORM_HOST: ${{ secrets.RF_PLATFORM_HOST }}
RF_APP_HOST: ${{ secrets.RF_APP_HOST }}

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

run: ./scripts/github-pipelines/setup.sh

- name: Set RF CLI Path
run: echo "/home/runner/work/community-images/community-images" >> $GITHUB_PATH


- name: Create images for testing PR
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RAPIDFORT_ACCOUNT: ${{ secrets.RAPIDFORT_ACCOUNT }}
IB_DOCKER_USERNAME: ${{ secrets.IB_DOCKER_USERNAME }}
IB_DOCKER_PASSWORD: ${{ secrets.IB_DOCKER_PASSWORD }}
if: ${{ steps.test-required.outputs.TEST_REQUIRED == 'yes' }}
run: python3 community_images/common/orchestrator/main.py hourly_run kafka-bridge/ironbank


- name: Report pulls
env:
PULL_COUNTER_MAGIC_TOKEN: ${{ secrets.PULL_COUNTER_MAGIC_TOKEN }}

if: ${{ github.event_name == 'pull_request' && steps.test-required.outputs.TEST_REQUIRED == 'yes' }}

run: |
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/kafka-bridge-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
kafka-exporter-ib:
runs-on: ubuntu-latest

Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/image_run_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,64 @@ jobs:
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/clickhouse-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
cockroachdb-ib:
runs-on: ubuntu-latest

environment: actions-cicd

steps:
- name: Import Coverage Tests
uses: actions/checkout@v4
with:
repository: rapidfort/community-images-core
token: ${{ secrets.COVERAGE_ACCESS_TOKEN }}


- name: Start minikube

with:
memory: 6g
driver: none
uses: medyagh/setup-minikube@master
- name: Check k8s cluster !

run: kubectl get pods -A
- name: Setup ubuntu
env:
RF_ACCESS_ID: ${{ secrets.RF_ACCESS_ID }}
RF_SECRET_ACCESS_KEY: ${{ secrets.RF_SECRET_ACCESS_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RF_PLATFORM_HOST: ${{ secrets.RF_PLATFORM_HOST }}
RF_APP_HOST: ${{ secrets.RF_APP_HOST }}

run: ./scripts/github-pipelines/setup.sh

- name: Set RF CLI Path
run: echo "/home/runner/work/community-images/community-images" >> $GITHUB_PATH


- name: Create images and publish to dockerhub
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RAPIDFORT_ACCOUNT: ${{ secrets.RAPIDFORT_ACCOUNT }}
IB_DOCKER_USERNAME: ${{ secrets.IB_DOCKER_USERNAME }}
IB_DOCKER_PASSWORD: ${{ secrets.IB_DOCKER_PASSWORD }}
if: github.event_name != 'pull_request'
run: python3 community_images/common/orchestrator/main.py hourly_run cockroachdb/ironbank --publish


- name: Report pulls
env:
PULL_COUNTER_MAGIC_TOKEN: ${{ secrets.PULL_COUNTER_MAGIC_TOKEN }}

run: |
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/cockroachdb-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
consul:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -4999,6 +5057,64 @@ jobs:
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/k8s-sidecar-official": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
kafka-bridge-ib:
runs-on: ubuntu-latest

environment: actions-cicd

steps:
- name: Import Coverage Tests
uses: actions/checkout@v4
with:
repository: rapidfort/community-images-core
token: ${{ secrets.COVERAGE_ACCESS_TOKEN }}


- name: Start minikube

with:
memory: 6g
driver: none
uses: medyagh/setup-minikube@master
- name: Check k8s cluster !

run: kubectl get pods -A
- name: Setup ubuntu
env:
RF_ACCESS_ID: ${{ secrets.RF_ACCESS_ID }}
RF_SECRET_ACCESS_KEY: ${{ secrets.RF_SECRET_ACCESS_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RF_PLATFORM_HOST: ${{ secrets.RF_PLATFORM_HOST }}
RF_APP_HOST: ${{ secrets.RF_APP_HOST }}

run: ./scripts/github-pipelines/setup.sh

- name: Set RF CLI Path
run: echo "/home/runner/work/community-images/community-images" >> $GITHUB_PATH


- name: Create images and publish to dockerhub
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RAPIDFORT_ACCOUNT: ${{ secrets.RAPIDFORT_ACCOUNT }}
IB_DOCKER_USERNAME: ${{ secrets.IB_DOCKER_USERNAME }}
IB_DOCKER_PASSWORD: ${{ secrets.IB_DOCKER_PASSWORD }}
if: github.event_name != 'pull_request'
run: python3 community_images/common/orchestrator/main.py hourly_run kafka-bridge/ironbank --publish


- name: Report pulls
env:
PULL_COUNTER_MAGIC_TOKEN: ${{ secrets.PULL_COUNTER_MAGIC_TOKEN }}

run: |
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/kafka-bridge-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
kafka-exporter-ib:
runs-on: ubuntu-latest

Expand Down
Loading

0 comments on commit 415a082

Please sign in to comment.