Skip to content

Commit

Permalink
Merge 7240715 into 0283499
Browse files Browse the repository at this point in the history
  • Loading branch information
William Welling committed Aug 19, 2022
2 parents 0283499 + 7240715 commit b33d977
Show file tree
Hide file tree
Showing 9 changed files with 304 additions and 66 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: "Maven Cache"
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -21,7 +21,7 @@ jobs:
java-version: 11

- name: "Maven Test"
run: mvn clean test jacoco:report coveralls:report -DdryRun=true
run: mvn clean test jacoco:report coveralls:report -DdryRun=true -Pbuddy

- name: "Send to Coveralls (build java-${{ github.run_number }})"
uses: MikeEdgar/github-action@raw_coverage_file
Expand All @@ -31,7 +31,7 @@ jobs:
coverage-format: raw

- name: "Deploy GH-Pages"
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
github_token: ${{ secrets.github_token }}
Expand Down
70 changes: 64 additions & 6 deletions .gitignore
@@ -1,12 +1,70 @@
.apt_generated/
target/
.DS_Store
### Git ###
!.gitkeep


### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.vscode
bin/
.sts4-cache


### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr


### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/

/.nb-gradle/


### VS Code ###
.vscode/

dump.rdb


### OS Specific ###
.DS_Store
.tmp/

tmp/


### Maven ###
logs/
*.log*
target/

.classpth
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.project

buildNumber.properties
dependency-reduced-pom.xml
pom.xml.next
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties


### Weaver ###
dist/


### Project Specific ###
.env*

!**/src/main/**
!**/src/test/**
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,64 @@
<a name="readme-top"></a>
# Contributing to Project Management Service

Though *Project Management Service* is developed and maintained by Texas A&M University Libraries, we welcome community contributions.
Involvement in *Project Management Service* can take many forms.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Using

Deploying *Project Management Service* and trying it out at your own institution is itself a way of contributing to the development process.
For more information on deployment strategies please see the [Deployment Guide][deployment-guide].

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Filing Issues

Once you are using *Project Management Service* the creation of new issues through GitHub is a major method of contribution towards *Project Management Service* development.
Issues can be motivated by the discovery of a bug in the software, or by the desire to see either new features added or see changes to existing features.

There are two primary types of issues:
1. Bug Report
2. Feature Request

A **Bug Report** involves a problem with the existing software or a **Feature** is not working as designed or expected.

A **Feature** involves new functionality or behavior.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Creating a Pull Request

Community code and documentation contributions are welcome and should take the form of a **GitHub Pull Request** (*PR*).
Each *PR* will need to be reviewed by a *Project Management Service* developer.
A review will result in the *PR* being accepted and merged, a descriptive request for changes, or the *PR* being closed along with a detailed explanation.

It is our intention to maintain labeling on issues that are deemed to be low difficulty in order to provide a good point of entry for those looking to begin contributing code or documentation.

A *PR* description should include a list of the specific issues resolved, the predicted *semantic versioning* impact of the changes, and a description which characterizes the nature of the changes made.
When creating a *PR*, an issue template is automatically provided to simplify this process.

For more information about *semantic versioning* please see [Semantic Versioning Website][semantic-versioning].
In general keep in mind:

- A **Major Change** is a breaking change that is not backwards compatible.
- A **Minor Change** is a non-breaking change that is backwards compatible to the last **Major Change**.
- A **Patch** is a trivial change or bug fix that should not impact compatibility.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Good Luck!

We look forward to seeing your contributions.
If you have any additional questions please contact the *Project Management Service* developers at helpdesk@library.tamu.edu.

<div align="right">(<a href="#readme-top">back to top</a>)</div>

<!-- LINKS -->
[deployment-guide]: DEPLOYING.md
[semantic-versioning]: https://semver.org/
67 changes: 67 additions & 0 deletions DEPLOYING.md
@@ -0,0 +1,67 @@
<a name="readme-top"></a>
# Project Management Service Deployment Guide

## Production Deployments

For **production** deployments, deploy using `docker-compose` via the [Project App Repo][app-repo].
This is the recommended method of deployment for production systems.
Go to the [Project Management App Repo][app-repo] and following the deployment instructions there.

Performing the deployment using the [Project Management App Repo][app-repo] should be something similar to the following:
```shell
docker-compose up
```

The **development** deployment can also use `docker-compose` in the same way.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Development Deployment using Docker

To manually use `docker` rather than `docker-compose`, run the following:

```shell
docker image build -t projectservice .
docker run -it projectservice
```

<sub>_* Note: `-t projectservice` and `-it projectservice` may be changed to another tag name as desired, such as `-t developing_on_this` and `-it developing_on_this`._</sub><br>

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Development Deployment using Maven

Manual deployment can be summed up by running:

```shell
mvn spring-boot:run
```

Those steps are a great way to start but they also fail to explain the customization that is often needed.
There are multiple ways to further configure this for deployment to better meet the desired requirements.

It is highly recommended only to perform *manual installation* when developing.
For **production** deployment, please use `docker-compose` via the [Project Management App Repo][app-repo] or use the **Docker** method above.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


### Directly Configuring the `src/main/resources/application.yml` File

This method of configuration works by altering the configuration file.

With this in mind, the deployment steps now look like:

```shell
# Edit 'src/main/resources/application.yml' here.

mvn spring-boot:run
```

<div align="right">(<a href="#readme-top">back to top</a>)</div>


<!-- LINKS -->
[app-repo]: https://github.com/TAMULib/ProjectManagement
33 changes: 16 additions & 17 deletions Dockerfile
@@ -1,24 +1,27 @@
# Settings.
ARG USER_ID=3001
ARG USER_NAME=projectmanagement
ARG HOME_DIR=/$USER_NAME
ARG SOURCE_DIR=$HOME_DIR/source
ARG SOURCE_DIR=/$USER_NAME/source

# Maven stage.
FROM maven:3-openjdk-11-slim as maven
ARG USER_ID
ARG USER_NAME
ARG HOME_DIR
ARG SOURCE_DIR

# Create the group (use a high ID to attempt to avoid conflits).
RUN groupadd -g $USER_ID $USER_NAME
# Create the user and group (use a high ID to attempt to avoid conflicts).
RUN groupadd --non-unique -g $USER_ID $USER_NAME && \
useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME

# Create the user (use a high ID to attempt to avoid conflits).
RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME
# Update the system and install dependencies.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Update the system.
RUN apt-get update && apt-get upgrade -y
# Make sure source directory exists.
RUN mkdir -p $SOURCE_DIR && \
chown -R $USER_ID:$USER_ID $SOURCE_DIR

# Set deployment directory.
WORKDIR $SOURCE_DIR
Expand All @@ -40,24 +43,20 @@ RUN mvn package -Pjar -DskipTests=true
FROM openjdk:11-jre-slim
ARG USER_ID
ARG USER_NAME
ARG HOME_DIR
ARG SOURCE_DIR

# Create the group (use a high ID to attempt to avoid conflits).
RUN groupadd -g $USER_ID $USER_NAME

# Create the user (use a high ID to attempt to avoid conflits).
RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME
# Create the user and group (use a high ID to attempt to avoid conflicts).
RUN groupadd --non-unique -g $USER_ID $USER_NAME && \
useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME

# Login as user.
USER $USER_NAME

# Set deployment directory.
WORKDIR $HOME_DIR
WORKDIR /$USER_NAME

# Copy over the built artifact from the maven image.
COPY --from=maven $SOURCE_DIR/target/ROOT.jar ./projectmanagement.jar


# Run java command.
CMD ["java", "-jar", "./projectmanagement.jar"]
67 changes: 53 additions & 14 deletions README.md
@@ -1,22 +1,61 @@
[![Build Status](https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg)](https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg)](https://coveralls.io/github/TAMULib/ProjectManagementService)
[![Build Status][build-badge]][build-status]
[![Coverage Status][coverage-badge]][coverage-status]

# Product Management Service
The Product Management Service is designed to connect our Library Webservice Status Application to our Version Management Software.
# Project Management Service

## Building Product Management Service
A *Spring* backend for the *Project Management Service* developed and maintained by [Texas A&M University Libraries][tamu-library].

### Development
```bash
$ mvn clean spring-boot:run
```
This is a service designed to interconnect our *Library Service Status System* with *VersionOne* and *GitHub* Services.

<details>
<summary>Table of contents</summary>

- [Deployment](#deployment)
- [Developer Documentation](#developer-documentation)
- [Additional Resources](#additional-resources)

</details>


## Deployment

For a quick and easy deployment using `docker-compose` consider using the [Project Managment App Repo][app-repo].

For _advanced use cases_, or when `docker-compose` is unavailable, the UI may be either started using `docker` directly or even manually started.
This process is further described in the [Deployment Guide][deployment-guide].

<div align="right">(<a href="#readme-top">back to top</a>)</div>

### Production
```bash
$ mvn clean package -DskipTests -Dproduction
```

## Developer Documentation

- [API Documentation](https://tamulib.github.io/ProjectManagementService)
- [Contributors Documentation][contribute-guide]
- [Deployment Documentation][deployment-guide]
- [API Documentation][api-documentation]

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Additional Resources

Please feel free to file any issues concerning Project Management Service to the issues section of the repository.

Any questions concerning Project Management Service can be directed to helpdesk@library.tamu.edu.

Copyright © 2022 Texas A&M University Libraries under the [MIT License][license].

<div align="right">(<a href="#readme-top">back to top</a>)</div>


<!-- LINKS -->
[app-repo]: https://github.com/TAMULib/ProjectManagement
[build-badge]: https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg
[build-status]: https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild
[coverage-badge]: https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg
[coverage-status]: https://coveralls.io/github/TAMULib/ProjectManagementService

[api-documentation]: https://tamulib.github.io/ProjectManagementService
[tamu-library]: http://library.tamu.edu
[deployment-guide]: DEPLOYING.md
[contribute-guide]: CONTRIBUTING.md
[license]: LICENSE

0 comments on commit b33d977

Please sign in to comment.