Skip to content

Commit

Permalink
workflow correction
Browse files Browse the repository at this point in the history
Signed-off-by: rajat <rajatbassi002@gmail.com>
  • Loading branch information
Rajat0002 committed Jul 4, 2024
1 parent cd468bc commit d55f452
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 5 deletions.
70 changes: 69 additions & 1 deletion .github/workflows/image_run_pr_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7922,9 +7922,77 @@ jobs:
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/redis-official": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
shellcheck-ib:
runs-on: ubuntu-latest

environment: actions-cicd-pr

steps:
- uses: actions/checkout@v4


- name: Check if test required
id: test-required
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 scripts/tests_required.py shellcheck-ib shellcheck/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
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/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 }}
RF_ACCESS_TOKEN: ${{ secrets.RF_ACCESS_TOKEN }}
if: ${{ steps.test-required.outputs.TEST_REQUIRED == 'yes' }}
run: python3 community_images/common/orchestrator/main.py hourly_run shellcheck/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/shellcheck-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
sqlite-ib:

runs-on: ubuntu-latest

environment: actions-cicd-pr
Expand Down
56 changes: 54 additions & 2 deletions .github/workflows/image_run_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6113,8 +6113,61 @@ jobs:
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/redis-official": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
shellcheck-ib:
runs-on: ubuntu-latest

environment: actions-cicd

steps:
- uses: actions/checkout@v4


- name: Start minikube

with:
memory: 6g
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/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 }}
RF_ACCESS_TOKEN: ${{ secrets.RF_ACCESS_TOKEN }}
if: github.event_name != 'pull_request'
run: python3 community_images/common/orchestrator/main.py hourly_run shellcheck/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/shellcheck-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
sqlite-ib:

runs-on: ubuntu-latest

environment: actions-cicd
Expand Down Expand Up @@ -6166,7 +6219,6 @@ jobs:
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/shellcheck-ib": 1 }' \
-d '{ "rapidfort/sqlite-ib": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
telegraf:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,5 @@ jobs:
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${PULL_COUNTER_MAGIC_TOKEN}" \
-d '{ "rapidfort/airflow": 1 , "rapidfort/airflow-ib": 1 , "rapidfort/airflow-ib-bitnami": 1 , "rapidfort/airflow-scheduler": 1 , "rapidfort/airflow-scheduler-ib-bitnami": 1 , "rapidfort/airflow-worker": 1 , "rapidfort/airflow-worker-ib-bitnami": 1 , "rapidfort/ansible-ib": 1 , "rapidfort/ansible-lint-ib": 1 , "rapidfort/apache": 1 , "rapidfort/apache2-ib": 1 , "rapidfort/apache-official": 1 , "rapidfort/argocd": 1 , "rapidfort/argocd-bigbang-ib": 1 , "rapidfort/argocd-ib": 1 , "rapidfort/auditbeat-ib": 1 , "rapidfort/bats-ib": 1 , "rapidfort/blackbox-exporter-ib": 1 , "rapidfort/cassandra-official": 1 , "rapidfort/chart-testing-ib": 1 , "rapidfort/consul": 1 , "rapidfort/consul-ib": 1 , "rapidfort/consul-official": 1 , "rapidfort/couchdb": 1 , "rapidfort/couchdb_3-ib": 1 , "rapidfort/couchdb-official": 1 , "rapidfort/curl": 1 , "rapidfort/elasticsearch": 1 , "rapidfort/elasticsearch-exporter-ib": 1 , "rapidfort/elasticsearch-official": 1 , "rapidfort/envoy": 1 , "rapidfort/envoy-official": 1 , "rapidfort/etcd": 1 , "rapidfort/etcd-ib": 1 , "rapidfort/filebeat-ib": 1 , "rapidfort/fluent-bit": 1 , "rapidfort/fluent-bit-ib": 1 , "rapidfort/fluent-bit-official": 1 , "rapidfort/fluentd": 1 , "rapidfort/fluentd-ib": 1 , "rapidfort/fluentd-official": 1 , "rapidfort/fluxcd-helm-controller-ib": 1 , "rapidfort/fluxcd-image-automation-controller-ib": 1 , "rapidfort/fluxcd-image-reflector-controller-ib": 1 , "rapidfort/fluxcd-kustomize-controller-ib": 1 , "rapidfort/fluxcd-notification-controller-ib": 1 , "rapidfort/fluxcd-source-controller-ib": 1 , "rapidfort/gatekeeper-ib": 1 , "rapidfort/ghost": 1 , "rapidfort/git-lfs-ib": 1 , "rapidfort/gitlab-runner-ib": 1 , "rapidfort/grafana-ib": 1 , "rapidfort/hadolint-ib": 1 , "rapidfort/haproxy": 1 , "rapidfort/haproxy24-ib": 1 , "rapidfort/haproxy-official": 1 , "rapidfort/heartbeat-ib": 1 , "rapidfort/influxdb": 1 , "rapidfort/k8s-sidecar-ib": 1 , "rapidfort/k8s-sidecar-official": 1 , "rapidfort/kafka-exporter-ib": 1 , "rapidfort/kafka-ib": 1 , "rapidfort/kaniko-ib": 1 , "rapidfort/keycloak-official": 1 , "rapidfort/kibana-ib": 1 , "rapidfort/kong": 1 , "rapidfort/kubectl-ib": 1 , "rapidfort/logstash-ib": 1 , "rapidfort/mariadb": 1 , "rapidfort/mariadb-ib": 1 , "rapidfort/mariadb-official": 1 , "rapidfort/memcached": 1 , "rapidfort/memcached-ib": 1 , "rapidfort/memcached-official": 1 , "rapidfort/metabase-ib": 1 , "rapidfort/metricbeat-ib": 1 , "rapidfort/microsoft-sql-server-2019-ib": 1 , "rapidfort/minio-operator-ib": 1 , "rapidfort/mkdocs-ib": 1 , "rapidfort/mongodb": 1 , "rapidfort/mongodb-ib": 1 , "rapidfort/mongodb-official": 1 , "rapidfort/moodle-ib": 1 , "rapidfort/mysql": 1 , "rapidfort/mysql8-ib": 1 , "rapidfort/mysql-official": 1 , "rapidfort/nats": 1 , "rapidfort/nats-ib": 1 , "rapidfort/nats-official": 1 , "rapidfort/nginx": 1 , "rapidfort/nginx-ib": 1 , "rapidfort/nginx-official": 1 , "rapidfort/nifi-ib": 1 , "rapidfort/node-exporter": 1 , "rapidfort/node-exporter-ib": 1 , "rapidfort/node-exporter-official": 1 , "rapidfort/oncall": 1 , "rapidfort/packetbeat-ib": 1 , "rapidfort/pause-ib": 1 , "rapidfort/pgadmin-ib": 1 , "rapidfort/postgres-exporter-bitnami-ib": 1 , "rapidfort/postgres-exporter-ib": 1 , "rapidfort/postgresql": 1 , "rapidfort/postgresql12-ib": 1 , "rapidfort/postgresql-official": 1 , "rapidfort/prometheus": 1 , "rapidfort/prometheus-ib": 1 , "rapidfort/prometheus-official": 1 , "rapidfort/rabbitmq": 1 , "rapidfort/rabbitmq-official": 1 , "rapidfort/redis": 1 , "rapidfort/redis-cluster": 1 , "rapidfort/redis-exporter-ib": 1 , "rapidfort/redis6-ib": 1 , "rapidfort/redis-official": 1 , "rapidfort/sqlite-ib": 1 , "rapidfort/telegraf": 1 , "rapidfort/terraform-ib": 1 , "rapidfort/terragrunt-ib": 1 , "rapidfort/tika-ib": 1 , "rapidfort/tomcat9-openjdk11-ib": 1 , "rapidfort/traefik": 1 , "rapidfort/traefik-ib": 1 , "rapidfort/vault": 1 , "rapidfort/vault-ib": 1 , "rapidfort/vault-k8s-ib": 1 , "rapidfort/velero-ib": 1 , "rapidfort/wordpress": 1 , "rapidfort/wordpress-ib": 1 , "rapidfort/yourls": 1 , "rapidfort/yq-ib": 1 , "rapidfort/zeek-ib": 1 , "rapidfort/zookeeper": 1 , "rapidfort/zookeeper-ib": 1 , "rapidfort/zookeeper-official": 1 }' \
-d '{ "rapidfort/airflow": 1 , "rapidfort/airflow-ib": 1 , "rapidfort/airflow-ib-bitnami": 1 , "rapidfort/airflow-scheduler": 1 , "rapidfort/airflow-scheduler-ib-bitnami": 1 , "rapidfort/airflow-worker": 1 , "rapidfort/airflow-worker-ib-bitnami": 1 , "rapidfort/ansible-ib": 1 , "rapidfort/ansible-lint-ib": 1 , "rapidfort/apache": 1 , "rapidfort/apache2-ib": 1 , "rapidfort/apache-official": 1 , "rapidfort/argocd": 1 , "rapidfort/argocd-bigbang-ib": 1 , "rapidfort/argocd-ib": 1 , "rapidfort/auditbeat-ib": 1 , "rapidfort/bats-ib": 1 , "rapidfort/blackbox-exporter-ib": 1 , "rapidfort/cassandra-official": 1 , "rapidfort/chart-testing-ib": 1 , "rapidfort/consul": 1 , "rapidfort/consul-ib": 1 , "rapidfort/consul-official": 1 , "rapidfort/couchdb": 1 , "rapidfort/couchdb_3-ib": 1 , "rapidfort/couchdb-official": 1 , "rapidfort/curl": 1 , "rapidfort/elasticsearch": 1 , "rapidfort/elasticsearch-exporter-ib": 1 , "rapidfort/elasticsearch-official": 1 , "rapidfort/envoy": 1 , "rapidfort/envoy-official": 1 , "rapidfort/etcd": 1 , "rapidfort/etcd-ib": 1 , "rapidfort/filebeat-ib": 1 , "rapidfort/fluent-bit": 1 , "rapidfort/fluent-bit-ib": 1 , "rapidfort/fluent-bit-official": 1 , "rapidfort/fluentd": 1 , "rapidfort/fluentd-elasticsearch-ib": 1 , "rapidfort/fluentd-ib": 1 , "rapidfort/fluentd-official": 1 , "rapidfort/fluxcd-helm-controller-ib": 1 , "rapidfort/fluxcd-image-automation-controller-ib": 1 , "rapidfort/fluxcd-image-reflector-controller-ib": 1 , "rapidfort/fluxcd-kustomize-controller-ib": 1 , "rapidfort/fluxcd-notification-controller-ib": 1 , "rapidfort/fluxcd-source-controller-ib": 1 , "rapidfort/gatekeeper-ib": 1 , "rapidfort/ghost": 1 , "rapidfort/git-lfs-ib": 1 , "rapidfort/gitlab-runner-ib": 1 , "rapidfort/grafana-ib": 1 , "rapidfort/hadolint-ib": 1 , "rapidfort/haproxy": 1 , "rapidfort/haproxy24-ib": 1 , "rapidfort/haproxy-official": 1 , "rapidfort/heartbeat-ib": 1 , "rapidfort/influxdb": 1 , "rapidfort/k8s-sidecar-ib": 1 , "rapidfort/k8s-sidecar-official": 1 , "rapidfort/kafka-exporter-ib": 1 , "rapidfort/kafka-ib": 1 , "rapidfort/kaniko-ib": 1 , "rapidfort/keycloak-official": 1 , "rapidfort/kibana-ib": 1 , "rapidfort/kong": 1 , "rapidfort/kubectl-ib": 1 , "rapidfort/logstash-ib": 1 , "rapidfort/mariadb": 1 , "rapidfort/mariadb-ib": 1 , "rapidfort/mariadb-official": 1 , "rapidfort/mc-ib": 1 , "rapidfort/memcached": 1 , "rapidfort/memcached-ib": 1 , "rapidfort/memcached-official": 1 , "rapidfort/metabase-ib": 1 , "rapidfort/metricbeat-ib": 1 , "rapidfort/microsoft-sql-server-2019-ib": 1 , "rapidfort/minio-operator-ib": 1 , "rapidfort/mkdocs-ib": 1 , "rapidfort/mongodb": 1 , "rapidfort/mongodb-ib": 1 , "rapidfort/mongodb-official": 1 , "rapidfort/moodle-ib": 1 , "rapidfort/mysql": 1 , "rapidfort/mysql8-ib": 1 , "rapidfort/mysql-official": 1 , "rapidfort/nats": 1 , "rapidfort/nats-ib": 1 , "rapidfort/nats-official": 1 , "rapidfort/nginx": 1 , "rapidfort/nginx-ib": 1 , "rapidfort/nginx-official": 1 , "rapidfort/nifi-ib": 1 , "rapidfort/node-exporter": 1 , "rapidfort/node-exporter-ib": 1 , "rapidfort/node-exporter-official": 1 , "rapidfort/oncall": 1 , "rapidfort/packetbeat-ib": 1 , "rapidfort/pause-ib": 1 , "rapidfort/pgadmin-ib": 1 , "rapidfort/postgres-exporter-bitnami-ib": 1 , "rapidfort/postgres-exporter-ib": 1 , "rapidfort/postgresql": 1 , "rapidfort/postgresql12-ib": 1 , "rapidfort/postgresql-official": 1 , "rapidfort/prometheus": 1 , "rapidfort/prometheus-ib": 1 , "rapidfort/prometheus-official": 1 , "rapidfort/rabbitmq": 1 , "rapidfort/rabbitmq-official": 1 , "rapidfort/redis": 1 , "rapidfort/redis-cluster": 1 , "rapidfort/redis-exporter-ib": 1 , "rapidfort/redis6-ib": 1 , "rapidfort/redis-official": 1 , "rapidfort/shellcheck-ib": 1 , "rapidfort/sqlite-ib": 1 , "rapidfort/telegraf": 1 , "rapidfort/terraform-ib": 1 , "rapidfort/terragrunt-ib": 1 , "rapidfort/tika-ib": 1 , "rapidfort/tomcat9-openjdk11-ib": 1 , "rapidfort/traefik": 1 , "rapidfort/traefik-ib": 1 , "rapidfort/vault": 1 , "rapidfort/vault-ib": 1 , "rapidfort/vault-k8s-ib": 1 , "rapidfort/velero-ib": 1 , "rapidfort/wordpress": 1 , "rapidfort/wordpress-ib": 1 , "rapidfort/yourls": 1 , "rapidfort/yq-ib": 1 , "rapidfort/zeek-ib": 1 , "rapidfort/zookeeper": 1 , "rapidfort/zookeeper-ib": 1 , "rapidfort/zookeeper-official": 1 }' \
https://data-receiver.rapidfort.com/counts/internal_image_pulls
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
reporter: github-pr-review # Change reporter.
path: "." # Optional.
pattern: "*.sh" # Optional.
exclude: "./.git/*" # Optional.
exclude: "./.git/*,./community_images/shellcheck/ironbank/scripts/*" # Optional.
check_all_files_with_shebangs: "false" # Optional.
fail_on_error: true

0 comments on commit d55f452

Please sign in to comment.