Skip to content

Commit

Permalink
Merge pull request #1998 from opengovern/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mohamadch91 authored Nov 15, 2024
2 parents b3b8e92 + 7386fbe commit 613c10b
Show file tree
Hide file tree
Showing 81 changed files with 5 additions and 16,305 deletions.
38 changes: 1 addition & 37 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
steampipe-plugin-opengovernance: ${{ steps.build_services.outputs.steampipe-plugin-opengovernance }}
integration-service: ${{ steps.build_services.outputs.integration-service }}
es-sink-service: ${{ steps.build_services.outputs.es-sink-service }}
wastage-service: ${{ steps.build_services.outputs.wastage-service }}
information-service: ${{ steps.build_services.outputs.information-service }}
query-runner-worker: ${{ steps.build_services.outputs.query-runner-worker }}
query-validator-worker: ${{ steps.build_services.outputs.query-validator-worker }}
Expand All @@ -99,7 +98,7 @@ jobs:
fetch-depth: 5

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
cache: false
Expand Down Expand Up @@ -711,41 +710,6 @@ jobs:
file: docker/SteampipePluginOpengovernanceDockerfile
context: .

deploy-wastage-service:
runs-on: ubuntu-latest
needs:
- build
- tag
permissions:
id-token: write
contents: read
environment: docker
if: needs.build.outputs.wastage-service == 'true' && github.event_name != 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: build
path: .
- name: Unpack artifact
run: |
tar -xvf build.tar.gz
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Build and push Docker images
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/wastage-service:${{ needs.tag.outputs.latest_tag }}
file: docker/WastageServiceDockerfile
context: .

deploy-information-service:
runs-on: ubuntu-latest
Expand Down
9 changes: 0 additions & 9 deletions assets/postgres-backup/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -e
dt=$(date '+%d/%m/%Y %H:%M:%S');
echo "$dt - Running init script the 1st time Primary PostgreSql container is created...";

pennywiseDatabaseName="pennywise"
pennywiseUserName="pennywise_service"

workspaceDatabaseName="workspace"
workspaceUserName="workspace_service"
Expand Down Expand Up @@ -81,13 +79,6 @@ GRANT ALL PRIVILEGES ON DATABASE "$subscriptionDatabaseName" to $subscriptionUse
CREATE EXTENSION "uuid-ossp" WITH SCHEMA public;
GRANT ALL ON SCHEMA public TO $subscriptionUserName;
CREATE DATABASE $pennywiseDatabaseName;
CREATE USER $pennywiseUserName WITH PASSWORD '$POSTGRES_PENNYWISE_DB_PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE "$pennywiseDatabaseName" to $pennywiseUserName;
\c "$pennywiseDatabaseName"
CREATE EXTENSION "uuid-ossp" WITH SCHEMA public;
GRANT ALL ON SCHEMA public TO $pennywiseUserName;
CREATE DATABASE $informationDatabaseName;
CREATE USER $informationUserName WITH PASSWORD '$POSTGRES_INFORMATION_DB_PASSWORD';
Expand Down
4 changes: 1 addition & 3 deletions build_services
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ hopper
inventory-service
metadata-service
migrator-worker
onboard-service
integration-service
reporter
summarizer-worker
swagger-ui
gpt-service
analytics-worker
cost-estimator-service
wastage-service
query-runner-worker
demo-importer-worker
35 changes: 0 additions & 35 deletions cmd/wastage-service/main.go

This file was deleted.

8 changes: 0 additions & 8 deletions docker/AssistantServiceDockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions docker/CICDDockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions docker/GPTServiceDockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions docker/OnboardServiceDockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions docker/WastageServiceDockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require (
github.com/haoel/downsampling v0.0.0-20221012062717-1132fe8afe24
github.com/hashicorp/vault/api v1.14.0
github.com/jackc/pgtype v1.14.0
github.com/kaytu-io/pennywise v1.7.16

github.com/labstack/echo/v4 v4.12.0
github.com/labstack/gommon v0.4.2
github.com/lib/pq v1.10.9
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/kaytu-io/pennywise v1.7.16 h1:ppZ80MNFuch4GRpEYzYZgxms4QkLCZWJPAnkxa1THgo=
github.com/kaytu-io/pennywise v1.7.16/go.mod h1:Egr3Z/zzT/K93sOG+QVSgrgQbkcnK+odwjnl1OQUjpQ=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
Expand Down
2 changes: 1 addition & 1 deletion scripts/export_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ done

mkdir -p /tmp/demo-data/postgres
pg_dump --dbname="postgresql://$POSTGRESQL_USERNAME:$POSTGRESQL_PASSWORD@$POSTGRESQL_HOST:$POSTGRESQL_PORT/describe" > /tmp/demo-data/postgres/describe.sql
pg_dump --dbname="postgresql://$POSTGRESQL_USERNAME:$POSTGRESQL_PASSWORD@$POSTGRESQL_HOST:$POSTGRESQL_PORT/onboard" > /tmp/demo-data/postgres/onboard.sql
pg_dump --dbname="postgresql://$POSTGRESQL_USERNAME:$POSTGRESQL_PASSWORD@$POSTGRESQL_HOST:$POSTGRESQL_PORT/integration" > /tmp/demo-data/postgres/integration.sql
pg_dump --dbname="postgresql://$POSTGRESQL_USERNAME:$POSTGRESQL_PASSWORD@$POSTGRESQL_HOST:$POSTGRESQL_PORT/metadata" > /tmp/demo-data/postgres/metadata.sql

cd /tmp
Expand Down
2 changes: 1 addition & 1 deletion scripts/import_psql_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "$POSTGRESQL_USERNAME"
echo "$POSTGRESQL_PASSWORD"

PGPASSWORD="$POSTGRESQL_PASSWORD" psql --host="$POSTGRESQL_HOST" --port="$POSTGRESQL_PORT" --username "$POSTGRESQL_USERNAME" --dbname "describe" < /demo-data/postgres/describe.sql
PGPASSWORD="$POSTGRESQL_PASSWORD" psql --host="$POSTGRESQL_HOST" --port="$POSTGRESQL_PORT" --username "$POSTGRESQL_USERNAME" --dbname "onboard" < /demo-data/postgres/onboard.sql
PGPASSWORD="$POSTGRESQL_PASSWORD" psql --host="$POSTGRESQL_HOST" --port="$POSTGRESQL_PORT" --username "$POSTGRESQL_USERNAME" --dbname "integration" < /demo-data/postgres/integration.sql
PGPASSWORD="$POSTGRESQL_PASSWORD" psql --host="$POSTGRESQL_HOST" --port="$POSTGRESQL_PORT" --username "$POSTGRESQL_USERNAME" --dbname "metadata" < /demo-data/postgres/metadata.sql
PGPASSWORD="$POSTGRESQL_PASSWORD" psql --host="$POSTGRESQL_HOST" --port="$POSTGRESQL_PORT" --username "$POSTGRESQL_USERNAME" --dbname "onboard" -c "DELETE FROM credentials;"

Expand Down
52 changes: 0 additions & 52 deletions services/wastage/api/api.go

This file was deleted.

19 changes: 0 additions & 19 deletions services/wastage/api/entity/Organization.go

This file was deleted.

19 changes: 0 additions & 19 deletions services/wastage/api/entity/User.go

This file was deleted.

Loading

0 comments on commit 613c10b

Please sign in to comment.