Skip to content
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

Feature/morphic study dataset support #160

Open
wants to merge 179 commits into
base: subs-product-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
53c0803
dcp-967 managed access - design docs
amnonkhen Sep 20, 2023
a4b100b
dcp-967 managed access - design docs
amnonkhen Sep 28, 2023
094be26
dcp-967 managed access - design docs
amnonkhen Oct 3, 2023
2c4fb3c
dcp-967 managed access - design docs
amnonkhen Oct 3, 2023
531d2a4
dcp-967 managed access - design docs
amnonkhen Oct 3, 2023
53f86d6
dcp-967 (de)serialisation of DataAccessTypes
amnonkhen Oct 4, 2023
3447fd4
dcp-967 managed access - require authentication for all read operations
amnonkhen Oct 4, 2023
5eacd23
dcp-967 tests for ProjectBuilder
amnonkhen Oct 4, 2023
5ca8b6a
dcp-967 (de)serialisation of DataAccessTypes
amnonkhen Oct 4, 2023
8389a05
dcp-967 managed access - require authentication for all read operations
amnonkhen Oct 4, 2023
f7794ed
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 4, 2023
6bd1c9d
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 6, 2023
9383c6c
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 11, 2023
6c014dd
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 12, 2023
e5eadc0
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 24, 2023
beff1ac
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 24, 2023
b05b306
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 24, 2023
525a76a
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 24, 2023
a850bc0
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 25, 2023
5b692b6
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Oct 30, 2023
e8117bc
dcp-967 managed access - fix unit tests
amnonkhen Oct 30, 2023
c951101
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Nov 2, 2023
d650992
dcp-967: managed access: dataAccess as a project schema property
amnonkhen Nov 2, 2023
9ff9849
dcp-967 managed access - require authentication for all read operations
amnonkhen Nov 3, 2023
6273072
dcp-967 managed access - fix unit tests
amnonkhen Nov 3, 2023
39f8443
dcp-967: managed access: dataAccess as a project schema property
amnonkhen Nov 3, 2023
1e92899
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Nov 3, 2023
4fe7588
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Nov 9, 2023
be5cf40
dcp-967 managed access - fix unit tests
amnonkhen Nov 9, 2023
7bd1775
dcp-967: managed access: dataAccess as a project schema property
amnonkhen Nov 9, 2023
cbb73ab
dcp-967: managed access: dataAccess as a project schema property
amnonkhen Nov 9, 2023
d525a07
Merge pull request #151 from ebi-ait/feature/dcp-967-managed-access
amnonkhen Nov 9, 2023
b138d58
dcp-967 managed access - require authentication for all read operations
amnonkhen Nov 10, 2023
7b39acd
dcp-967 managed access: root resource,HAL browser to be publically av…
amnonkhen Nov 10, 2023
289d50b
Merge remote-tracking branch 'origin/feature/dcp-967-managed-access' …
amnonkhen Nov 10, 2023
496cd2d
Merge pull request #152 from ebi-ait/feature/dcp-967-managed-access
amnonkhen Nov 10, 2023
4915bbf
dcp-967 managed access: health check w/o auth
amnonkhen Nov 10, 2023
91eccc7
Merge pull request #153
amnonkhen Nov 10, 2023
fa70629
dcp-967 managed access: health check w/o auth
amnonkhen Nov 10, 2023
4fab96c
Merge pull request #154
amnonkhen Nov 10, 2023
4d34f51
dcp-967 managed access: keep junit reports
amnonkhen Nov 12, 2023
e97cdea
Merge pull request #155
amnonkhen Nov 12, 2023
7279aae
dcp-967 managed access: keep junit reports
amnonkhen Nov 12, 2023
0526156
Merge pull request #156
amnonkhen Nov 12, 2023
c1cd549
dcp-967 managed access - fix unit tests
amnonkhen Nov 12, 2023
3dbdeb1
Merge pull request #157
amnonkhen Nov 12, 2023
ae30d6b
dcp-967 managed access - fix unit tests
amnonkhen Nov 12, 2023
1641b50
Merge pull request #158
amnonkhen Nov 12, 2023
1996272
dcp-967 managed access - fix unit tests
amnonkhen Nov 13, 2023
eaa084d
dcp-967 managed access - fix unit tests
amnonkhen Nov 13, 2023
6aaf4ac
dcp-967 managed access - filter metadata resources by user's allowed …
amnonkhen Nov 13, 2023
832ad0b
dcp-967 managed access - fix unit tests
amnonkhen Nov 13, 2023
4e98b41
dcp-967 managed access: allow SERVICE user to access metadata
amnonkhen Nov 13, 2023
79c78c0
dcp-967 managed access: schemas resource w/o auth
amnonkhen Nov 13, 2023
6cd6f3b
dcp-967 managed access: schemas resource w/o auth
amnonkhen Nov 13, 2023
57d3e00
dcp-967 managed access: allow SERVICE user to access metadata
amnonkhen Nov 14, 2023
a84bf31
dcp-967 managed access - require authentication for all read operations
amnonkhen Nov 14, 2023
281afd6
dcp-967 managed access - require authentication for all read operations
amnonkhen Nov 15, 2023
b32f57b
Add 'Study' into EntityTypes enum
KociOrges Nov 30, 2023
35fbc43
Create Data Model for Study
KociOrges Nov 30, 2023
ba8c09e
mc-39: Added EventHandler for Study registration
KociOrges Nov 30, 2023
089f5ce
mc-39: Added Repository class for Study entity
KociOrges Nov 30, 2023
f73cf43
mc-39: Added Service component Study
KociOrges Nov 30, 2023
eba75cf
mc-39 study registration: Added custom exception handling when Study …
KociOrges Nov 30, 2023
1e678ba
mc-39 study registration: Added custom Error Response for StudyNotFou…
KociOrges Nov 30, 2023
89ab6b0
mc-39 study registration: Added Controller component for Study
KociOrges Dec 4, 2023
43ef1c9
mc-39 study registration: Added exception handling for Study
KociOrges Dec 4, 2023
ad0c241
mc-39 study registration: Added unit tests for Study Service component
KociOrges Dec 4, 2023
bf9cef5
mc-39 study registration: Added Study update method
KociOrges Dec 5, 2023
fef16fc
mc-39 study registration: Changed exception handler name for StudyNot…
KociOrges Dec 5, 2023
4cd7a16
mc-39 study registration: Updated Log messages and UPDATE method
KociOrges Dec 5, 2023
d74cbb9
mc-39 study registration: Added test cases for Study UPDATE
KociOrges Dec 5, 2023
75f88d9
mc-39 study registration: Added integration test class for Study Cont…
KociOrges Dec 5, 2023
912c165
mc-39 study registration: Added implementation for StudyCrudStrategy
KociOrges Dec 5, 2023
1aca63f
mc-39 study registration: Added Study type into MetadataCrudService
KociOrges Dec 5, 2023
3f8132e
mc-39 study registration: Added Register and Update integration test …
KociOrges Dec 5, 2023
9b2db58
mc-39 study registration: Added integration test cases for Study DELETE
KociOrges Dec 5, 2023
aa1f7b1
mc-39 study registration: No need to create a new Study for `deleteSt…
KociOrges Dec 5, 2023
9c9ee7b
Merge pull request #159 from ebi-ait/feature/mc-39_morphic_study_regi…
dipayan1985 Dec 19, 2023
bd0cc74
Dataset support
dipayan1985 Dec 19, 2023
ad4bf68
Some minor clean-ups
dipayan1985 Dec 20, 2023
24d0cd4
mc-39 study registration: Changed response message to explicitly spec…
KociOrges Jan 8, 2024
08e803f
mc-47 morphic-specific profile: Added conditional logic and test case…
KociOrges Jan 18, 2024
c971f9f
mc-47 morphic-specific profile: CRUD operations must be explicitly de…
KociOrges Jan 18, 2024
e27a2fc
Cognito authentication support added
dipayan1985 Feb 20, 2024
4436174
Cognito authentication support added
dipayan1985 Feb 20, 2024
447f645
Adapt UserAuditing.java for Cognito Auth so read name from Account if…
dipayan1985 Feb 26, 2024
2f58823
mc-58 submission envelope support: Added code for assigning a Study t…
KociOrges Feb 29, 2024
ce8e6aa
mc-58 submission envelope support: Added Study code to Submission com…
KociOrges Feb 29, 2024
40cbf08
Dataset support with submission envelope
dipayan1985 Mar 18, 2024
620dce9
Test improved for DatasetService
dipayan1985 Mar 18, 2024
0ed9e89
mc-60 ingest-validation: Added study-related fields to allow for vali…
KociOrges Mar 19, 2024
0aa47b5
mc-60 ingest-validation: Edit base content for Study to make it compa…
KociOrges Mar 19, 2024
e15f0ad
mc-40 dataset submission: Added links for datasets and submission env…
KociOrges Mar 21, 2024
d5903cd
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
dipayan1985 Mar 21, 2024
6a18b13
mc-58 submission envelope support: Added tests for Study submission e…
KociOrges Mar 22, 2024
65097eb
Remove the morphic profile
dipayan1985 Mar 25, 2024
e27d0f0
Merge remote-tracking branch 'origin/feature/morphic-study-dataset-su…
dipayan1985 Mar 25, 2024
a279b41
clean-up
dipayan1985 Apr 12, 2024
da39c71
Redesign how upload areas are used.
dipayan1985 Apr 22, 2024
c678722
Allow non-open id scoped tokens from Cognito
dipayan1985 Apr 23, 2024
e6a4782
mc-47 morphic-specific profile: Disabled profile-specific test cases …
KociOrges May 3, 2024
287e13d
mc-60 ingest-validation: Implemented logic for descriptive schema fie…
KociOrges May 3, 2024
7a4b084
mc-58 submission envelope support: Study updates require (for the mom…
KociOrges May 3, 2024
9e80b54
Code cleanup, read Cognito domain URL as environment variable.
dipayan1985 May 15, 2024
08d3668
Merge conflicts resolved.
dipayan1985 May 15, 2024
01bf27f
code clean
dipayan1985 May 15, 2024
e4898e4
test fixes
dipayan1985 May 15, 2024
bc851f7
Adding CI/CD file
dipayan1985 May 16, 2024
84b7ade
Merge pull request #161 from ebi-ait/feature/morphic-study-dataset-su…
dipayan1985 May 16, 2024
6eae1b6
fix test run
dipayan1985 May 16, 2024
25dfc2a
build image
dipayan1985 May 16, 2024
910cefc
build image - package to stages
dipayan1985 May 16, 2024
b49538a
Push image ECR-1
dipayan1985 May 16, 2024
9023bf6
Push image ECR-2
dipayan1985 May 16, 2024
eb3ef18
Push image ECR-3
dipayan1985 May 16, 2024
913f050
Push image ECR-4
dipayan1985 May 16, 2024
42100f3
Push image ECR-5
dipayan1985 May 16, 2024
6886581
Adding K8 deployment
dipayan1985 May 21, 2024
6d86dfc
Adding K8 deployment-1
dipayan1985 May 21, 2024
247a125
Adding K8 deployment-2
dipayan1985 May 21, 2024
58a6f13
Adding K8 deployment-3
dipayan1985 May 21, 2024
7c76d16
Adding K8 deployment-4
dipayan1985 May 21, 2024
c98b65b
Adding K8 deployment-5
dipayan1985 May 21, 2024
b8f11f3
Adding K8 deployment-5
dipayan1985 May 21, 2024
98696c5
Adding K8 deployment-6
dipayan1985 May 21, 2024
c031e63
Adding K8 deployment-7
dipayan1985 May 21, 2024
fd988e0
Merge pull request #162 from ebi-ait/feature/ingest-core-ci/cd-for-mo…
dipayan1985 May 28, 2024
bcce7e8
Add support for all types
dipayan1985 May 28, 2024
757b176
Add support for all types
dipayan1985 Jun 6, 2024
a8cdd3d
mc-72: Include 'id' Field in JSON Response Body
KociOrges Jun 13, 2024
8f18eda
Fix test case for Dataset update - requires linkage to a SubmissionEn…
KociOrges Jun 13, 2024
2f40e3f
child and parent biomaterials
dipayan1985 Jun 14, 2024
dad828f
Merge pull request #163 from ebi-ait/feature/morphic-biomaterial-proc…
dipayan1985 Jun 17, 2024
4ba66f5
spotless code
dipayan1985 Jun 17, 2024
d6d3b5a
context loading errors after gradle upgrade
dipayan1985 Jun 17, 2024
de04b9b
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
KociOrges Jun 18, 2024
660c8d8
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
dipayan1985 Jun 18, 2024
6a3cf23
merge conflict resolution
dipayan1985 Jun 18, 2024
515c5a3
Merge pull request #164 from ebi-ait/chore/spotless-code
dipayan1985 Jun 18, 2024
3bb80d4
GL CI resolution of image name
dipayan1985 Jun 18, 2024
d5c8e30
GL CI resolution of image name
dipayan1985 Jun 18, 2024
85aed01
GL CI resolution of image name
dipayan1985 Jun 18, 2024
c231ab9
Improved linkage of biomaterials, processes, files and protocols
dipayan1985 Jul 2, 2024
c9e9c42
Fix test
dipayan1985 Jul 2, 2024
7d6f1de
Allow delete of metadata types while envelope is in pending state
dipayan1985 Jul 3, 2024
7899b5c
test fix for allowing edits if envelope is in PENDING state
dipayan1985 Jul 4, 2024
3702fec
Merge pull request #165 from ebi-ait/feature/morphic-protocol-process…
dipayan1985 Jul 23, 2024
3992ed4
CI file for prod
dipayan1985 Aug 2, 2024
3722fdb
CI file fixed
dipayan1985 Aug 2, 2024
8c19fc7
CI file fixed
dipayan1985 Aug 2, 2024
9cdb6e4
CI file fixed
dipayan1985 Aug 5, 2024
9a37813
CI file fixed
dipayan1985 Aug 5, 2024
adc8870
Project can also contain datasets similar to study
dipayan1985 Aug 29, 2024
dac6817
Remove unused methods
dipayan1985 Aug 29, 2024
ded6c19
Merge pull request #166 from ebi-ait/feature/morphic-protocol-process…
dipayan1985 Aug 29, 2024
152b54a
mc-76: SchemaScraper enhancement for MorPhiC metadata schemas
KociOrges Sep 10, 2024
58ecbcd
Remove unused methods
dipayan1985 Sep 27, 2024
6be103d
mc-76: Switch SCHEMA_BASE_URI to MorPhiC dev schema store
KociOrges Sep 30, 2024
62e11b6
Refactor, localize state management of metadata objects
dipayan1985 Sep 30, 2024
e312a90
refactor the package structures
dipayan1985 Oct 7, 2024
d80906f
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
dipayan1985 Oct 7, 2024
9985188
mc-60 ingest-validation: Permit all GET requests and modify PATCH log…
KociOrges Oct 7, 2024
fb5b337
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
dipayan1985 Oct 7, 2024
611273f
test comment added
dipayan1985 Oct 7, 2024
82fa942
spotless code
dipayan1985 Oct 8, 2024
e2d6eee
mc-60 ingest-validation: Authenticate POST requests for Studies and t…
KociOrges Oct 10, 2024
a7e7a7c
spotless code
KociOrges Oct 10, 2024
b503d70
Resolved failing tests for ProjectService by adding DatasetRepository…
KociOrges Oct 10, 2024
11d9492
Spotless code
KociOrges Oct 10, 2024
6f74048
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
dipayan1985 Oct 16, 2024
8a52050
merge commit
dipayan1985 Oct 16, 2024
89f2836
add accessions attribute to Study model for schema alignment and vali…
KociOrges Nov 15, 2024
5dcccee
Moved 'accessions' field to MetadataDocument for reuse across models …
KociOrges Nov 18, 2024
bb161a6
Merge branch 'feature/morphic-study-dataset-support' of https://githu…
dipayan1985 Nov 19, 2024
5302898
merge commit
dipayan1985 Nov 19, 2024
7c8170a
Merge pull request #167 from ebi-ait/feature/subs-152-refactor-remove…
dipayan1985 Nov 19, 2024
83a84b6
Fix failing test cases
KociOrges Nov 19, 2024
1c72ae8
Spotless code
KociOrges Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Test:
script:
- ./gradlew verify
artifacts:
when: always
reports:
junit:
- build/test-results/**/TEST-*.xml

118 changes: 118 additions & 0 deletions CI/.morphic-gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
cache:
paths:
- .gradle/wrapper
- .gradle/caches

before_script:
- echo "Performing build..."

stages:
- build
- test
- package
- deploy

variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_ACCOUNT_ID: $AWS_ACCOUNT_ID
EKS_CLUSTER_NAME: $EKS_CLUSTER_NAME
AWS_ACCESS_KEY_ID_PROD: $AWS_ACCESS_KEY_ID_PROD
AWS_SECRET_ACCESS_KEY_PROD: $AWS_SECRET_ACCESS_KEY_PROD
AWS_ACCOUNT_ID_PROD: $AWS_ACCOUNT_ID_PROD
EKS_CLUSTER_NAME_PROD: $EKS_CLUSTER_NAME_PROD

build:
image: quay.io/ebi-ait/ingest-base-images:openjdk_11
stage: build
script:
- ./gradlew build -x test --info --stacktrace
artifacts:
paths:
- build/libs/*.jar

test:
image: quay.io/ebi-ait/ingest-base-images:openjdk_11
stage: test
script:
- ./gradlew test
allow_failure: true
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"

docker-build-dev:
stage: package
image: docker:19.03.12
services:
- docker:19.03.12-dind
before_script:
- apk add --update --no-cache python3 py3-pip
- pip3 install awscli
script:
- docker build -t ingest-core-morphic:$CI_COMMIT_SHA .
- aws ecr get-login-password --region $AWS_DEFAULT_REGION |
docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
- docker tag ingest-core-morphic:$CI_COMMIT_SHA $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ingest-core-morphic:$CI_COMMIT_SHA
- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ingest-core-morphic:$CI_COMMIT_SHA

docker-build-prod:
stage: package
image: docker:19.03.12
services:
- docker:19.03.12-dind
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_PROD
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_PROD
AWS_ACCOUNT_ID: $AWS_ACCOUNT_ID_PROD
EKS_CLUSTER_NAME: $EKS_CLUSTER_NAME_PROD
before_script:
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_PROD
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_PROD
- export AWS_ACCOUNT_ID=$AWS_ACCOUNT_ID_PROD
- apk add --update --no-cache python3 py3-pip
- pip3 install awscli
script:
- docker build -t ingest-core-morphic:$CI_COMMIT_SHA .
- aws ecr get-login-password --region $AWS_DEFAULT_REGION |
docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
- docker tag ingest-core-morphic:$CI_COMMIT_SHA $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ingest-core-morphic:$CI_COMMIT_SHA
- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ingest-core-morphic:$CI_COMMIT_SHA

deploy-dev:
stage: deploy
image: alpine/k8s:1.27.13
before_script:
- apk add --update --no-cache curl jq python3 py3-pip
- python3 -m venv /opt/venv
- source /opt/venv/bin/activate
- pip install awscli
- curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
- export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION
- aws eks update-kubeconfig --name $EKS_CLUSTER_NAME --region $AWS_DEFAULT_REGION
script:
- sed -i "s|{{IMAGE}}|$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ingest-core-morphic:$CI_COMMIT_SHA|g" CI/ingest-core-morphic-deployment-dev.yaml
- kubectl apply -f CI/ingest-core-morphic-deployment-dev.yaml
- kubectl apply -f CI/ingest-core-morphic-service.yaml -n morphic-dev

deploy-prod:
stage: deploy
image: alpine/k8s:1.27.13
before_script:
- apk add --update --no-cache curl jq python3 py3-pip
- python3 -m venv /opt/venv
- source /opt/venv/bin/activate
- pip install awscli
- curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_PROD
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_PROD
- export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION
- aws eks update-kubeconfig --name $EKS_CLUSTER_NAME_PROD --region $AWS_DEFAULT_REGION
script:
- sed -i "s|{{IMAGE}}|$AWS_ACCOUNT_ID_PROD.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ingest-core-morphic:$CI_COMMIT_SHA|g" CI/ingest-core-morphic-deployment-prod.yaml
- kubectl apply -f CI/ingest-core-morphic-deployment-prod.yaml
- kubectl apply -f CI/ingest-core-morphic-service.yaml -n morphic-prod
44 changes: 44 additions & 0 deletions CI/ingest-core-morphic-deployment-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingest-core-deployment
namespace: morphic-dev
spec:
replicas: 1
selector:
matchLabels:
app: ingest-core
template:
metadata:
labels:
app: ingest-core
spec:
containers:
- name: ingest-core-container
image: {{IMAGE}}
ports:
- containerPort: 8080
env:
- name: SPRING_PROFILES_ACTIVE
value: local
- name: MONGO_URI
value: mongodb+srv://morphic-dev:mDev12345@morphicdevcluster.jduoa8p.mongodb.net/MorphicDev?retryWrites=true&w=majority
- name: RABBIT_HOST
value: rabbitmq-service
- name: RABBIT_PORT
value: "5672"
- name: AWS_COGNITO_DOMAIN
value: "https://morphic-dev-2.auth.eu-west-2.amazoncognito.com/oauth2"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: aws-credentials
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: aws-credentials
key: AWS_SECRET_ACCESS_KEY
- name: AWS_REGION
value: eu-west-2 # Optionally specify AWS region as an environment variable
imagePullPolicy: Always
44 changes: 44 additions & 0 deletions CI/ingest-core-morphic-deployment-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingest-core-deployment
namespace: morphic-prod
spec:
replicas: 2
selector:
matchLabels:
app: ingest-core
template:
metadata:
labels:
app: ingest-core
spec:
containers:
- name: ingest-core-container
image: {{IMAGE}}
ports:
- containerPort: 8080
env:
- name: SPRING_PROFILES_ACTIVE
value: prod
- name: MONGO_URI
value: mongodb+srv://morphic-prod:morphicProd#12345@morphicprodcluster.gvr5bkw.mongodb.net/MorphicProd?retryWrites=true&w=majority
- name: RABBIT_HOST
value: rabbitmq-service
- name: RABBIT_PORT
value: "5672"
- name: AWS_COGNITO_DOMAIN
value: "https://morphic.auth.eu-west-2.amazoncognito.com/oauth2"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: aws-credentials
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: aws-credentials
key: AWS_SECRET_ACCESS_KEY
- name: AWS_REGION
value: eu-west-2 # Optionally specify AWS region as an environment variable
imagePullPolicy: Always
17 changes: 17 additions & 0 deletions CI/ingest-core-morphic-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: ingest-core-service
spec:
selector:
app: ingest-core
ports:
- name: http-ingest-core
protocol: TCP
port: 8080 # HTTP port
targetPort: 8080 # Should match the containerPort in the Deployment YAML
- name: https-ingest-core
protocol: TCP
port: 443 # HTTPS port
targetPort: 8080 # Should match the containerPort in the Deployment YAML
type: LoadBalancer
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ENV USR_AUTH_AUDIENCE=https://dev.data.humancellatlas.org/
ENV GCP_JWK_PROVIDER_BASE_URL=https://www.googleapis.com/service_accounts/v1/jwk/
ENV GCP_PROJECT_WHITELIST=hca-dcp-production.iam.gserviceaccount.com,human-cell-atlas-travis-test.iam.gserviceaccount.com,broad-dsde-mint-dev.iam.gserviceaccount.com,broad-dsde-mint-test.iam.gserviceaccount.com,broad-dsde-mint-staging.iam.gserviceaccount.com
ENV SCHEMA_BASE_URI=https://schema.dev.data.humancellatlas.org/
ENV AWS_COGNITO_DOMAIN=https://morphic-dev.auth.eu-west-2.amazoncognito.com/oauth2

ADD gradle ./gradle
ADD src ./src
Expand Down
19 changes: 17 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
id 'org.springframework.boot' version '2.1.6.RELEASE'
id 'java'
id "com.diffplug.spotless" version "6.20.0"
}

apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.diffplug.spotless'

group = 'com.example'
version = '0.0.1-SNAPSHOT'
Expand Down Expand Up @@ -64,6 +66,14 @@ tasks.withType(Test) {
}
}

spotless {
java {
googleJavaFormat()
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'
}
}

dependencies {
['actuator', 'data-rest', 'hateoas', 'security', 'web', 'webflux'].forEach {
implementation "org.springframework.boot:spring-boot-starter-${it}"
Expand All @@ -77,6 +87,7 @@ dependencies {
exclude group: 'org.mongodb', module: 'mongodb-driver'
}
implementation 'org.springframework.data:spring-data-rest-hal-browser'
implementation 'org.springframework.boot:spring-boot-starter-mail'

implementation 'org.springframework.retry:spring-retry:1.3.1'
implementation 'org.springframework:spring-aspects:5.3.13'
Expand All @@ -102,11 +113,15 @@ dependencies {
exclude group: 'org.mongodb', module: 'mongo-java-driver'
}

compile 'org.projectreactor:reactor-spring:1.0.1.RELEASE'
compile 'org.projectlombok:lombok'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.705'
/*implementation 'software.amazon.awssdk:sts:2.17.19'*/

implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE'
compileOnly 'org.projectlombok:lombok'

annotationProcessor 'org.projectlombok:lombok'

testCompileOnly 'org.projectlombok:lombok'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.assertj', module: 'assertj-core'
Expand Down
Loading