-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from Transparent Path #356
Open
glind
wants to merge
131
commits into
buildlyio:master
Choose a base branch
from
TransparentPath:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,656
−2,210
Open
Changes from all commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
8446525
Update ISSUE_TEMPLATE.md
8b1bb38
update travis configs
6fddbe6
update travis configs
3bd0c35
Merge remote-tracking branch 'upstream/master'
109c646
move build to travis script
4a75e0d
update travis for aws
c4ea278
update travis for aws
5f82439
update travis for aws
6bb2130
update travis for aws
813e3b8
update travis for aws
5c4f196
update travis for aws
284c823
update travis for aws
565b580
update travis for aws
d5e7808
update travis for aws
3e719c8
update travis for aws
731212d
cleanup initital data
1ad1966
cleanup initital data
b148c9e
cleanup initital data
a80a7d5
remove organization_name
b31fc81
remove organization_name
d35d082
update travis var
c9c2d96
update travis var
aec2f69
update travis var
a05d287
revert keys
71fbd8c
fix org
9d572a3
fix org
e90cf33
fix org
c42f1d4
fix org
326eff3
fix org
9aee00a
fix org
9188eb8
fix org
a48e524
turn off tagged commits for builds
e752325
update docker compose with email host
e3f8a31
update docker compose with email host
756f786
update docker compose with email host
f61771d
update docker compose with email host
6ac09bd
add options function to gateway
f9ee4b6
update permissions with options
8b2112c
refactor: Allow organization name to be accepted when creating core user
a20738a
chore: Update initial setup
f783a6a
test: Refactored test cases for organization
46dac52
fix: Flake8 warnings
14f4339
Flake8 Error fixes
73fcaac
chore: Flake8 fixes for whitespaces and f-strings
2454248
chore: Resolved ContextualVersionConflict
73bffeb
chore: requests dependency version
fee8349
Merge pull request #26 from TransparentPath/feature/organization_name…
d517248
Changes for Oauth in Initial Script
02c90b3
Merge pull request #28 from TransparentPath/fix/loadinitialdata
d418f93
removed changed in gateway view to allow options methid from service
vishalajackus afc11e5
removed changed in gateway view to allow options methid from service
vishalajackus 2616b22
Commenting out options function for options response of services
vishalajackus 2b81d93
Merge pull request #30 from TransparentPath/options_method
a454509
email alert message for shipment to user
vishalajackus 3223239
Use generalised function name
vishalajackus c32ca1e
initial commit
ashishkmishra36 a5ff0d8
added seperate endpoint for update
ashishkmishra36 341ee5d
Merge pull request #35 from TransparentPath/fix/edit-organization-name
vishalajackus 8daa870
add more illutratative field in message
vishalajackus c01c660
remove commented code in html template of shipment alert
vishalajackus 7dd78ae
modifify html template name to send email alert for shipment
vishalajackus 30b1920
add white space
vishalajackus e9c305f
remove conflict
vishalajackus f42abcd
Merge pull request #33 from TransparentPath/tp_email_alert
ashishkmishra36 034dd40
Allow user to subscribe to email alert in Profile
ashishkmishra36 ede613c
fixed linting
ashishkmishra36 8a6cc28
changed shipment id to shipment_uuid
ashishkmishra36 7b573e7
Merge pull request #38 from TransparentPath/fix/allow-user-to-subscri…
eee0569
added email_alert_flag to CoreUser Serializer
ashishkmishra36 35dc0bb
fixed linting
ashishkmishra36 b93e128
Merge pull request #39 from TransparentPath/fix/allow-user-to-subscri…
ashishkmishra36 a81f287
added boolean field in organisation
vishalajackus 506431a
Merge pull request #41 from TransparentPath/add_booleanfield
vishalajackus 3e9cd80
Resolved issue in OPTIONS method via Core
4f5444a
Merge pull request #44 from TransparentPath/fix/options-resolution
vishalajackus 456813e
TransparentPath/buildly-core/issues/45:add radis field in organization
vishalajackus 0d10269
Merge pull request #46 from TransparentPath/add_radius
666f656
Added support for multiple email alerts
f15e56c
Merge pull request #47 from TransparentPath/feat/support-multiple-emails
7311d30
initial commit
ashishkmishra36 237b2aa
return only org names
ashishkmishra36 8b01b8e
removed debugging info
ashishkmishra36 a51d885
Merge pull request #49 from TransparentPath/list-of-existing-orgs
443c480
change in request format of email alert endpoint (#53)
vishalajackus bea2e45
Added consortium table and its endpoint (#50)
vishalajackus 157350a
Added organization types (#56)
774f908
Approval email for newly registered users (#57)
df0d17c
Updated email template for alerts
b35bf26
Updated email template for alerts
660ab29
Organization names coming from open API as list of names (#60)
63af351
Merge pull request #61 from TransparentPath/feat#59/email-templates
vishalajackus ad8ab4c
Resolve permission issue for "/organization/fetch_orgs/" endpoint (#64)
vishalajackus 703161b
Add API endpoint for organization type (#65)
vishalajackus 3fe4554
change permission level
vishalajackus 2adf39a
add create and edit date in organization type
vishalajackus 8c1ff4d
change permission level to only organization admin
vishalajackus 0dbcfeb
Merge pull request #66 from TransparentPath/change-permission
vishalajackus 42dfbd0
Updated configuration for consortium (#70)
ac00d2e
Configuration for user alert preferences (#73)
493b62c
update consortium table for organization uuid (#75)
vishalajackus a5faff1
Modifications in email templates (#77)
eec3ef9
change permission level for consortium table (#79)
vishalajackus 1d4ccc1
filter consortium by organization (#81)
vishalajackus 53796ea
update consortium array field (#82)
vishalajackus 2ee19dd
Changed permission level for consortium (#85)
2db3290
create consortium if custody create (#87)
vishalajackus d2f78ef
Fix issue for retrieve query by uuid (#88)
vishalajackus 823eedd
Revert "Fix issue for retrieve query by uuid (#88)"
vishalajackus 0aa608a
Merge pull request #90 from TransparentPath/revert-88-datamesh-uuid-fix
vishalajackus 269d76b
Handled boolean for CORS_ORIGIN_ALLOW_ALL
e471e84
Updated Bravado Core version
006f70b
Merge pull request #95 from TransparentPath/fix/bravado-core-spec
mthombare 9df8e88
Return response data only for PUT, POST, DELETE (#97)
dfb361e
Added default radius for organization
3f1b727
Merge pull request #100 from TransparentPath/fix#99/default-radius-or…
abhishek-kumar-piyush 3b25820
Allow unlimited line size for request
711fbe9
Merge pull request #102 from TransparentPath/fix/gunicorn-config
abhishek-kumar-piyush 87c45d2
sensor service email alert for unassigned moving sensor (#105)
abhishek-kumar-piyush f6ab185
Handle when no custody organization mapped to custodian
eceb280
Merge pull request #107 from TransparentPath/fix/custodian-no-organiz…
abhishek-kumar-piyush 2492d66
Environmental warning timezone. (#108)
abhishek-kumar-piyush c79fba8
Remove Travis
RadhikaPPatel b444bd1
Remove timestamp from alert messages (#110)
abhishek-kumar-piyush 5b3fc68
Gunicorn timeout configuration
f70809c
buildly-core gitHub actions (#112)
abhishek-kumar-piyush 0961ca6
Remove dev deployment setup
patelradhika 352d71f
Setup github actions
patelradhika 8c0bd36
Bump the pip group group in /requirements with 6 updates
dependabot[bot] 4f0337d
Update dev-build.yml
61e2651
Update base.txt
95b09ff
Merge pull request #131 from TransparentPath/dependabot/pip/requireme…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build and Push to Demo | ||
|
||
on: | ||
push: | ||
branches: | ||
- demo | ||
jobs: | ||
build: | ||
name: Build and Push to GCR | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: gcr.io/spry-bricolage-298920/transparent-path/demo/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build and Push to Development | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
build: | ||
name: Build and Push to GCR | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: gcr.io/dev-buildly/transparent-path/buildly-core | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same path problem |
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Docker login | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: gcr.io | ||
username: _json_key | ||
password: ${{ secrets.DEV_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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/spry-bricolage-298920/transparent-path/prod/buildly-core | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. path problem |
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: no-commit-to-branch | ||
args: [--branch, prod, --branch, demo, --branch, dev] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bind = '0.0.0.0:8080' | ||
limit_request_field_size = 0 | ||
limit_request_line = 0 | ||
timeout = 90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,16 @@ | |
from django.core.management.base import BaseCommand | ||
from django.db import transaction | ||
|
||
from oauth2_provider.models import Application | ||
|
||
from core.models import ROLE_VIEW_ONLY, ROLE_ORGANIZATION_ADMIN, ROLE_WORKFLOW_ADMIN, ROLE_WORKFLOW_TEAM, \ | ||
Organization, CoreUser, CoreGroup | ||
from core.models import ( | ||
ROLE_VIEW_ONLY, | ||
ROLE_ORGANIZATION_ADMIN, | ||
ROLE_WORKFLOW_ADMIN, | ||
ROLE_WORKFLOW_TEAM, | ||
Organization, | ||
CoreUser, | ||
CoreGroup, | ||
OrganizationType, | ||
) | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
@@ -29,28 +35,26 @@ def __init__(self, *args, **kwargs): | |
self._su_group = None | ||
self._default_org = None | ||
|
||
def _create_oauth_application(self): | ||
if settings.OAUTH_CLIENT_ID and settings.OAUTH_CLIENT_SECRET: | ||
app, created = Application.objects.update_or_create( | ||
client_id=settings.OAUTH_CLIENT_ID, | ||
client_secret=settings.OAUTH_CLIENT_SECRET, | ||
defaults={ | ||
'name': 'buildly oauth2', | ||
'client_type': Application.CLIENT_PUBLIC, | ||
'authorization_grant_type': Application.GRANT_PASSWORD, | ||
} | ||
) | ||
self._application = app | ||
def _create_organization_types(self): | ||
if settings.ORGANIZATION_TYPES: | ||
for organization_type in settings.ORGANIZATION_TYPES: | ||
OrganizationType.objects.get_or_create(name=organization_type) | ||
|
||
def _create_default_organization(self): | ||
if settings.DEFAULT_ORG: | ||
self._default_org, _ = Organization.objects.get_or_create(name=settings.DEFAULT_ORG) | ||
self._default_org, _ = Organization.objects.get_or_create( | ||
name=settings.DEFAULT_ORG | ||
) | ||
|
||
def _create_groups(self): | ||
self._su_group = CoreGroup.objects.filter(is_global=True, permissions=15).first() | ||
self._su_group = CoreGroup.objects.filter( | ||
is_global=True, permissions=15 | ||
).first() | ||
if not self._su_group: | ||
logger.info("Creating global CoreGroup") | ||
self._su_group = CoreGroup.objects.create(name='Global Admin', is_global=True, permissions=15) | ||
self._su_group = CoreGroup.objects.create( | ||
name='Global Admin', is_global=True, permissions=15 | ||
) | ||
|
||
# TODO: remove this after full Group -> CoreGroup refactoring | ||
self._groups.append(Group.objects.get_or_create(name=ROLE_VIEW_ONLY)) | ||
|
@@ -66,7 +70,11 @@ 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 'zGtkgLvmNiKm' | ||
) | ||
elif settings.SUPER_USER_PASSWORD: | ||
user_password = settings.SUPER_USER_PASSWORD | ||
else: | ||
|
@@ -78,7 +86,7 @@ def _create_user(self): | |
su = CoreUser.objects.create_superuser( | ||
first_name='System', | ||
last_name='Admin', | ||
username='admin', | ||
username='67OAI8DD5I1O', | ||
email='[email protected]', | ||
password=user_password, | ||
organization=self._default_org, | ||
|
@@ -88,6 +96,6 @@ def _create_user(self): | |
@transaction.atomic | ||
def handle(self, *args, **options): | ||
self._create_groups() | ||
self._create_organization_types() | ||
self._create_default_organization() | ||
self._create_oauth_application() | ||
self._create_user() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make these paths consistent or remove these files from the upstream