Skip to content

Commit

Permalink
Changes from Insights for login, datamesh and scripts to enhance data…
Browse files Browse the repository at this point in the history
…mesh (buildlyio#347)

* login with github

* added django template

* removed django template

* initial commit

* remove user groups

* updated urls

* initial commit

* Updated dependency issues

* Datamesh update (#11)

* Datamesh async fixed

* Datamesh join function script

* Email alert integration (#13)

* Integration - Email Notification

* Integration - Email Notification

* updated serializer

* updated unit test

* datamesh join script (#14)

* datamesh join script

* datamesh join script

* comment removed

* updated datamesh join script

* updated datamesh join script

* updated join_record_datamesh function

* removed print statement

* Partner implementation (#17)

* Partner Implementation

* removed organization

* removed partner organization

* removed partner organization

* - partner unit test

* - updated test fixtures

* - removed comment

* Resolve permissions for Organization

* fix core endpoint issue (#21)

* fix core endpoint issue

* updated comment

* Updated environment variables

* Updated environment values

* Handle for Gateway response 400

* datamesh join:
- product <-> third party tool and
- product <-> product_team

* completed project tool service datamesh join

* completed release service datamesh join

* completed dev/partner service datamesh join

* Fix Datamesh request issue

* updated admin username and password

* revert find endpoint fix

* updated datamesh join module name

* Added script to load datamesh

* Handled blank response for join records

* datamesh POST/PUT request implementation

* updated post request for different use-cases

* datamesh implemented delete request

* post empty response validation

* updated datamesh script for pk

* converted into functions

* updated put request

* updated PUT request for case -> The relation that exists but needs to create join

* Allow users to be auto-approved after registration

* added fields on Relationship model

* model via forward lookup

* param service name via forward_lookup

* written function for the case - Handles The relation that only needs to update ID or UUID

* Get response after a POST and PUT request

* refactor the functions

* updated func parameter

* issue fix - delete join

* delete status join

* migration file

* User Type Implementation (#45)

* added user type

* admin dashboard

* added survey_status

* serializer fields added

* help text

* User profile update API (#48)

* user profile update API

* updated get_permission

* unit test cases

* added serializer field

* serializer organization_name validation

* updated core-user serializer update method

* User registration update (#53)

* register with org validation

* uncommented invitation_token method

* updated load initial script for org creation

* set auto approve to false

* core user create method

* default org name

* added new var to update

* code format

* updated gunicorn timeout

* Datamesh id CRUD Implementation (#56)

* create join with ID

* updated join script to create relation if json file doesn't exist

* added newly added var in script

* delete id join

* Fixed gateway unit test cases

* implemented forward and reverse relation join in PUT req

* refactored fk reference variable

* written module join script

* PUT request: modified prepare_update_request() fun

* Fix POST req reverse relation join

* updated relation model fields

* updated script variable

* unit tes case

* updated unit test cases

* updated join script

* Datamesh implementation with core (#59)

* implementation with core

* PUT request update fk value

* script info

* added Datamesh relation response data in POST and PUT request

* removed unused import

* RequestHandler returned response

* added core update req data to req response data

* Stripe integration for customer create and get card details (#62)

* initial stripe subscription changes

* add new stripe/products endpoint

* change plan to product for subscription

* add stripe check for update org for a user scenario

* Fixed unit test cases (#63)

* GitHub action configuration (#67)

* GitHub action configuration

* Updated prod-build GCR path

* Updated prod-build slack message

* Updated prod-build mail message

* Added Product Team as default user type (#65)

Co-authored-by: ashishkmishra36 <ashish.kumar@ajackus.com>
Co-authored-by: Ashish K Mishra <70134840+ashishkmishra36@users.noreply.github.com>
Co-authored-by: Yasmin Ansari <yasmin@ajackus.com>
Co-authored-by: mthombare <83965396+mthombare@users.noreply.github.com>
Co-authored-by: manish <manish.thombare@ajackus.com>
Co-authored-by: Yasmin Ansari <yasmin.ansari@ajackus.com>
Co-authored-by: Radhika Patel <radhika.patel@ajackus.com>
  • Loading branch information
8 people committed Aug 2, 2022
1 parent 3c30384 commit d2c6201
Show file tree
Hide file tree
Showing 48 changed files with 3,394 additions and 298 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Push to Development

on:
push:
branches:
- master
jobs:
build:
name: Build and Push to GCR
runs-on: ubuntu-latest
env:
IMAGE_NAME: gcr.io/dev-buildly/insights/dev/buildly-core
steps:
- uses: actions/checkout@v2

- name: Docker login
uses: docker/login-action@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}

- name: Build docker image
run: docker build -t $IMAGE_NAME:latest .

- name: Push to Google Container Registry
run: docker push $IMAGE_NAME:latest
82 changes: 82 additions & 0 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build and Push Docker Image to Prod

on:
push:
branches:
- prod

jobs:
build:
name: Build and Push image to GCR
runs-on: ubuntu-latest
env:
IMAGE_NAME: gcr.io/dev-buildly/insights/prod/buildly-core
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

# auto generate tag from label defined in Dockerfile
- uses: butlerlogic/action-autotag@stable
id: tag_version
with:
GITHUB_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
strategy: docker
tag_prefix: "v"

# Create release notes
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@main
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

# Create release
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.tagname }}
release_name: Release ${{ steps.tag_version.outputs.tagname }}
body: ${{ steps.build_changelog.outputs.changelog }}
draft: false
prerelease: false

# Login to docker
- name: Docker login
uses: docker/login-action@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}

# Build docker image
- name: Build docker image
run: docker build -t $IMAGE_NAME:latest .

# Push docker image to GCR
- name: Push to Google Container Registry
run: docker push $IMAGE_NAME:latest

# Send message on Slack
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: 'Production Docker Image of buildly core pushed to Google Container Registry Successfully'
MSG_MINIMAL: true

# Send email alert
- name: Email Alert
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: Github Actions Build and Push job alert
to: ${{ secrets.RECIPIENT_EMAIL }}
from: ${{ secrets.SENDER_EMAIL }}
body: Production Docker Image of buildly core pushed to Google Container Registry Successfully
107 changes: 0 additions & 107 deletions .github/workflows/release.yml

This file was deleted.

94 changes: 0 additions & 94 deletions .github/workflows/review.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Buildly Core Unit Test

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
unit_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Build the docker-compose stack
run: docker-compose build

- name: Setup docker containers
run: docker-compose up -d

- name: Check running containers
run: docker ps -a

- name: Run unit test case
run: docker-compose run --entrypoint '/usr/bin/env' --rm buildly bash scripts/run-tests.sh --keepdb

- name: Stop docker container
run: docker-compose down
4 changes: 2 additions & 2 deletions buildly/management/commands/loadinitialdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _create_user(self):
logger.info("Creating Super User")
user_password = None
if settings.DEBUG:
user_password = settings.SUPER_USER_PASSWORD if settings.SUPER_USER_PASSWORD else 'admin'
user_password = settings.SUPER_USER_PASSWORD if settings.SUPER_USER_PASSWORD else 'Djf0KG0YDr8m'
elif settings.SUPER_USER_PASSWORD:
user_password = settings.SUPER_USER_PASSWORD
else:
Expand All @@ -78,7 +78,7 @@ def _create_user(self):
su = CoreUser.objects.create_superuser(
first_name='System',
last_name='Admin',
username='admin',
username='DA05L19J52XX',
email='admin@example.com',
password=user_password,
organization=self._default_org,
Expand Down
Loading

0 comments on commit d2c6201

Please sign in to comment.