Skip to content

Dockerfile added #20

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 3 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,44 +30,9 @@ jobs:
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Set Gradle executable
run: chmod +x gradlew
- name: Compile Task-Tracker-Entities
run: |
cd Task-Tracker-Entities &&
ln -s ../gradle &&
ln -s ../gradlew &&
./gradlew check &&
./gradlew publishToMavenLocal
- name: Compile Task-Tracker-Entities-Impl
run: |
cd Task-Tracker-Entities-Impl &&
ln -s ../gradle &&
ln -s ../gradlew &&
./gradlew check &&
./gradlew publishToMavenLocal
- name: Compile Task-Tracker-Usecases
run: |
cd Task-Tracker-Usecases &&
ln -s ../gradle &&
ln -s ../gradlew &&
./gradlew check &&
./gradlew publishToMavenLocal
- name: Compile Task-Tracker-Usecases-SQLite-Impl
run: |
cd Task-Tracker-Usecases-SQLite-Impl &&
ln -s ../gradle &&
ln -s ../gradlew &&
./gradlew check &&
./gradlew publishToMavenLocal
- name: Compile Task-Tracker-Usecases-CLI
run: |
cd Task-Tracker-CLI &&
ln -s ../gradle &&
ln -s ../gradlew &&
./gradlew check &&
./gradlew assembleDist
- name: Build with Gradle
run: ./build.sh
- uses: actions/upload-artifact@v3
with:
name: distribution
path: ./Task-Tracker-CLI/build/distributions/*.zip
path: ./Task-Tracker-CLI/build/distributions/*.zip
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM gradle:8-jdk17
WORKDIR /dev/mnt
CMD ["./build.sh"]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# Task-Tracker-App

The app is designed to work with the [Task-Tracker-Device](https://github.com/Task-Tracker-Systems/Task-Tracker-Device).

## Build

### Local
Run the gradle build in each directory or use the `build.sh` file.

### Docker
Shell
```Powershell
docker build -t task-tracker-systems/task-tracker-app:1 .
docker run --rm -v ${PWD}:/dev/mnt task-tracker-systems/task-tracker-app:1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the output of the build? Executing this line, the output ends with

5 actionable tasks: 4 executed, 1 up-to-date

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be in the build directory on the host, do you find it there?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'host' is the system which hosts Docker?

After executing this (and the previous) line I don't have a ./build/ directory in the root directory. But there are 31 nested build directories.

Is the output to be executed by the user, this file?

./Task-Tracker-CLI/build/scripts/Task-Tracker-CLI

```

### Github
Latest build is available through [Github Actions](https://github.com/Task-Tracker-Systems/Task-Tracker-App/actions)
50 changes: 50 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh
cd Task-Tracker-Entities
if [ ! -d "gradle" ]; then
ln -s ../gradle
fi
if [ ! -e "gradlew" ]; then
ln -s ../gradlew
fi
./gradlew check
./gradlew publishToMavenLocal

cd ../Task-Tracker-Entities-Impl
if [ ! -d "gradle" ]; then
ln -s ../gradle
fi
if [ ! -e "gradlew" ]; then
ln -s ../gradlew
fi
./gradlew check
./gradlew publishToMavenLocal

cd ../Task-Tracker-Usecases
if [ ! -d "gradle" ]; then
ln -s ../gradle
fi
if [ ! -e "gradlew" ]; then
ln -s ../gradlew
fi
./gradlew check
./gradlew publishToMavenLocal

cd ../Task-Tracker-Usecases-SQLite-Impl
if [ ! -d "gradle" ]; then
ln -s ../gradle
fi
if [ ! -e "gradlew" ]; then
ln -s ../gradlew
fi
./gradlew check
./gradlew publishToMavenLocal

cd ../Task-Tracker-CLI
if [ ! -d "gradle" ]; then
ln -s ../gradle
fi
if [ ! -e "gradlew" ]; then
ln -s ../gradlew
fi
./gradlew check
./gradlew assembleDist
Empty file modified gradlew
100644 → 100755
Empty file.