diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce9f74d432e76712511dda41d3f19c627a15bc49..e67f5acd6cba8a5ec02996f227692cdb84082f64 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,9 +44,9 @@ containerize: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - > if [[ "$CI_COMMIT_REF_NAME" == "$CI_DEFAULT_BRANCH" ]]; - then docker build -f provider/pws-aws/build-aws/Dockerfile -t $CI_REGISTRY_IMAGE:latest . && - docker push $CI_REGISTRY_IMAGE:latest; + then docker build -f provider/pws-aws/build-aws/Dockerfile -t $CI_REGISTRY_IMAGE/pws-aws:latest . && + docker push $CI_REGISTRY_IMAGE/pws-aws:latest; else - docker build -f provider/pws-aws/build-aws/Dockerfile -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA . && - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA; + docker build -f provider/pws-aws/build-aws/Dockerfile -t $CI_REGISTRY_IMAGE/pws-aws:$CI_COMMIT_SHORT_SHA . && + docker push $CI_REGISTRY_IMAGE/pws-aws:$CI_COMMIT_SHORT_SHA; fi diff --git a/provider/pws-aws/README.md b/provider/pws-aws/README.md new file mode 100644 index 0000000000000000000000000000000000000000..75d4371079a8c2bd5e1ba0983f41bf60a7b66003 --- /dev/null +++ b/provider/pws-aws/README.md @@ -0,0 +1,90 @@ +# Project and Workflow Service +pws-aws is a [Spring Boot](https://spring.io/projects/spring-boot) service to deliver a service which achieves supporting more efficient and better decision making on large scale capital investments. + +## Running Locally +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. + +### Prerequisites +Pre-requisites + +* JDK 17 (https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html) +* Maven 3.8.3 or later +* OSDU Instance deployed on AWS + +### Service Configuration +In order to run the service locally or remotely, you will need to have the following environment variables defined. + +| name | example value | required | description | sensitive? | +| --- | --- | --- | --- | --- | +TBD + +### Run Locally +Check that maven is installed: + +example: +```bash +$ mvn --version +Apache Maven 3.8.3 +Maven home: /usr/local/Cellar/maven/3.8.3/libexec +Java version: 17.0.7 +... +``` + +You may need to configure access to the remote maven repository that holds the OSDU dependencies. Copy one of the below files' content to your .m2 folder +* For development against the OSDU GitLab environment, leverage: `<REPO_ROOT>~/.mvn/community-maven.settings.xml` +* For development in an AWS Environment, leverage: `<REPO_ROOT>/provider/pws-aws/maven/settings.xml` + +* Navigate to the service's root folder and run: + +```bash +mvn clean package -pl pws-core,provider/pws-aws +``` + +* If you wish to build the project without running tests + +```bash +mvn clean package -pl pws-core,provider/pws-aws -DskipTests +``` + +After configuring your environment as specified above, you can follow these steps to run the application. These steps should be invoked from the *repository root.* +<br/> +<br/> +NOTE: If not on osx/linux: Replace `*` with version numbers as defined in the provider/pws-aws/pom.xml file + +```bash +java -jar provider/pws-aws/target/pws-aws-*.*.*-SNAPSHOT-spring-boot.jar +``` + +## Testing + + ### Running Integration Tests + This section describes how to run OSDU Integration tests (testing/pws-test-aws). + + You will need to have the following environment variables defined. + + | name | example value | description | sensitive? | + | --- | --- | --- | --- | + TBD + + +### Run Tests using mvn +Set required env vars and execute the following: +``` +mvn clean package -f testing/pom.xml -pl pws-test-core,pws-test-aws -DskipTests +mvn test -f testing/pws-test-aws/pom.xml +``` + +## License +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.