-
Notifications
You must be signed in to change notification settings - Fork 1
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
Release of SLIM Java Starterkit Sample Project #5
Draft
jpl-jengelke
wants to merge
3
commits into
develop
Choose a base branch
from
slim_issue_127
base: develop
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.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# docker image rm slim:mavenbuilddeploy ; docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --network=host --tag "slim:mavenbuilddeploy" --force-rm --no-cache --file ".ci/Dockerfile.buildDeploy" . | ||
# docker run --rm -it -v ${PWD}:${PWD} -v ${HOME}/.m2:$PWD/.m2 -v ${HOME}/.m2:/home/jenkins/.m2 -w ${PWD} --user "${UID_GID}" slim:mavenbuilddeploy | ||
FROM maven:3.6.3-openjdk-11 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG GID=500 | ||
ARG UID=500 | ||
ARG USR=jenkins | ||
ARG WORKSPACE="/home/${USR}" | ||
|
||
ENV CONTAINERIZED="true" | ||
ENV HOME="${WORKSPACE}" | ||
ENV PATH="${PATH}:." | ||
|
||
# https://issues.jenkins-ci.org/browse/JENKINS-47026 | ||
RUN { getent group ${GID} || groupadd -f -g ${GID} ${USR} ; } && \ | ||
{ getent passwd ${UID} || useradd -u ${UID} -s /bin/sh -d ${HOME} -g ${GID} ${USR} ; } | ||
|
||
# basic user environment -- includes jq, python and testrail reporter | ||
RUN mkdir -p ${HOME} && chmod 777 ${HOME} && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
jq \ | ||
python3-wheel \ | ||
python3-dev \ | ||
python3-setuptools \ | ||
python3-pip && \ | ||
python3 -m pip install behave-testrail-reporter>=0.4.0 | ||
|
||
ENTRYPOINT /bin/bash |
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,33 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java CI with Maven Build/Test/Package | ||
|
||
on: | ||
push: | ||
branches: [develop, main] | ||
pull_request: | ||
branches: [develop, main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn -U clean package | ||
|
||
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive | ||
- name: Update dependency graph | ||
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 |
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,3 @@ | ||
# Citation | ||
|
||
If you use any of these algorithms in your work, please directly cite this repository. |
Oops, something went wrong.
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.
Using chmod 777 on the user's home directory (${HOME}) might be too permissive.
How about chown instead?
chown -R ${USR}:${USR} ${HOME}
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.
That's a great observation. It is running inside the container so I was assuming this was only affecting the mount inside the container. In this context, the container is only executed ephemerally and stops after the job completes. I definitely need to review some of this earlier stuff to tighten it up, so I will.
Please bear with me as there will be more content to review shortly. I've kept it in draft until it's ready for thorough review.