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

Development: Restructure docker compose setups #5915

Merged
merged 221 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 220 commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
ed74b59
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
sleiss Sep 11, 2022
8a041b0
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Oct 5, 2022
8834aa6
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Oct 12, 2022
d4e1c94
update Jenkins job permissions to updated plugin
b-fein Oct 22, 2022
592d261
add proper tests
b-fein Oct 22, 2022
d6a7363
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Oct 23, 2022
ca3fe36
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Oct 28, 2022
71b7c3c
move permission removal
b-fein Oct 31, 2022
847b3db
simplify failure message creation
b-fein Oct 31, 2022
6ec4f7d
remove files that were accidentally added
b-fein Oct 31, 2022
dfcb2f1
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Oct 31, 2022
964daf6
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Nov 2, 2022
06a8e28
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 7, 2022
4786252
Update src/main/java/de/tum/in/www1/artemis/service/connectors/jenkin…
b-fein Nov 8, 2022
b9ee177
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 12, 2022
0bb9a93
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 14, 2022
03bde7f
Development: Update docker-based monitoring setup (#5598)
sleiss Nov 14, 2022
9a3367a
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 17, 2022
155da14
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 18, 2022
ca56e24
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 18, 2022
e5b9b3e
Development: Unify docker compose settings (#5809)
4ludwig4 Nov 18, 2022
2e9225a
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 21, 2022
cce01ed
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 24, 2022
f0e0352
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 25, 2022
b92573c
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Nov 28, 2022
52f3f72
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Dec 3, 2022
a8ec8b5
Merge branch 'develop' into bugfix/jenkins/user-vs-group-permissions
b-fein Dec 5, 2022
478bf1f
jenkins-gitlab: typo in docs
4ludwig4 Dec 5, 2022
128335e
artemis: set default image to artemis:develop
4ludwig4 Dec 5, 2022
88aceb7
kafka not used anymore
4ludwig4 Dec 6, 2022
e02e2c6
build multi arch docker image
4ludwig4 Dec 6, 2022
1b2198d
removed arm/v7 for now
4ludwig4 Dec 6, 2022
660f3f1
removed arm64 for now
4ludwig4 Dec 7, 2022
34e75fe
rm todo
4ludwig4 Dec 7, 2022
727981d
docs todo
4ludwig4 Dec 7, 2022
57be738
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Dec 7, 2022
7c96a8d
docker pull behaviour definition and startup docs improvements
4ludwig4 Dec 7, 2022
c81c197
jenkins-gitlab: added more generic docker compose command
4ludwig4 Dec 7, 2022
355ed04
jenkins-gitlab: docs improvements
4ludwig4 Dec 7, 2022
69caa83
Merge remote-tracking branch 'origin/bugfix/jenkins/user-vs-group-per…
4ludwig4 Dec 7, 2022
4725c7c
broker-registry merge and pull_policy fix
4ludwig4 Dec 7, 2022
6731825
add bamboo build agent
4ludwig4 Dec 7, 2022
b999216
fixed dockerfile comment
4ludwig4 Dec 7, 2022
d2c1c10
bamboo name
4ludwig4 Dec 7, 2022
a80a9ff
the big config merge and seperation
4ludwig4 Dec 7, 2022
f87f8ff
Revert "Merge remote-tracking branch 'origin/bugfix/jenkins/user-vs-g…
4ludwig4 Dec 7, 2022
2ecef47
add artemis prod docker
4ludwig4 Dec 8, 2022
0216de8
solution for secret default configurations
4ludwig4 Dec 8, 2022
fdcb18f
readded fix for mapped volumes
4ludwig4 Dec 8, 2022
ec46b3f
fix docker profile and profile order
4ludwig4 Dec 8, 2022
17cd23c
fix codacy problem
4ludwig4 Dec 8, 2022
69b6bc3
removed not wanted docker compose setups and minor docker profile fix
4ludwig4 Dec 8, 2022
73c583f
fix most codacy problems
4ludwig4 Dec 8, 2022
fa1b0a0
Revert "readded fix for mapped volumes"
4ludwig4 Dec 8, 2022
96f0956
codacy suggestion broke build and other solutions not really readable
4ludwig4 Dec 8, 2022
e91d44f
fix atlassian docs
4ludwig4 Dec 8, 2022
04390fd
bamboo build agent
4ludwig4 Dec 8, 2022
9d68b77
fix Dockerfile typo
4ludwig4 Dec 8, 2022
79b4454
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Dec 9, 2022
e7d05cb
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Dec 9, 2022
a24856d
debug github workflow
4ludwig4 Dec 9, 2022
25bc0fb
Revert "debug github workflow"
4ludwig4 Dec 9, 2022
1c32bd9
fixes after config review with matthias
4ludwig4 Dec 9, 2022
50d81ae
prepare containers for host.docker.internal usage
4ludwig4 Dec 9, 2022
b36b4f5
configuration refactoring
4ludwig4 Dec 9, 2022
229cc05
config refactoring 2
4ludwig4 Dec 9, 2022
091025c
reverted all configuration changes as they were moved to separate branch
4ludwig4 Dec 9, 2022
eeef66a
fix atlassian documentation after atlassian testing
4ludwig4 Dec 10, 2022
47fc89b
removed TODO as the fault was in the configs
4ludwig4 Dec 10, 2022
2cead33
VCS and CI config fixes and formatting
4ludwig4 Dec 10, 2022
81526ae
streamlined to other branch
4ludwig4 Dec 10, 2022
b520610
changed order of profiles, envs at the end as more specific than feat…
4ludwig4 Dec 10, 2022
06887ba
resolved todo during docs inspection and minor formatting
4ludwig4 Dec 10, 2022
ca90be1
fixed ssh config key in docs and added example for key generation
4ludwig4 Dec 11, 2022
3647c6c
Revert "fix atlassian documentation after atlassian testing"
4ludwig4 Dec 11, 2022
9df1ca0
added missing docker config
4ludwig4 Dec 11, 2022
8635af2
removed docs as hardcoded IPs not necessary anymore in dev setup
4ludwig4 Dec 11, 2022
8811499
aligned documentation to configuration change
4ludwig4 Dec 11, 2022
4babb1e
fixed docs anchor
4ludwig4 Dec 11, 2022
9e8116e
more code comments with references to application-artemis.yml now poi…
4ludwig4 Dec 11, 2022
7afcbfc
fix interactive auto-building command for doc generation
4ludwig4 Dec 11, 2022
af2b694
updated docs after feedback
4ludwig4 Dec 11, 2022
523dbdd
using artemis.example as dev domain instead of artemis.local
4ludwig4 Dec 12, 2022
0b0e420
removed todo
4ludwig4 Dec 14, 2022
4a16aee
healthchecks, docs, env file, general cleanup
4ludwig4 Dec 14, 2022
24faf74
Merge remote-tracking branch 'origin/enhancement/spring-configuration…
4ludwig4 Dec 15, 2022
03f3c89
remove todos
4ludwig4 Dec 15, 2022
c000f3c
docker compose folder structure defined
4ludwig4 Dec 19, 2022
a5bcd08
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Dec 19, 2022
563a271
added bamboo agent documentation
4ludwig4 Dec 19, 2022
dcf0058
resolve todos
4ludwig4 Dec 21, 2022
80ba6b1
Revert "Merge remote-tracking branch 'origin/enhancement/spring-confi…
4ludwig4 Dec 21, 2022
4a6db1e
change .env for usage with current configurations
4ludwig4 Dec 21, 2022
349d62e
fix and add docs, remove more todos
4ludwig4 Dec 21, 2022
4681dc5
fix typo
4ludwig4 Dec 21, 2022
703bd7f
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Dec 21, 2022
4d3e185
fix config: adapted to develop after reverting the merge of the new c…
4ludwig4 Dec 21, 2022
fe12292
prepared E2E Docker Compose files untill bamboo agents are updated
4ludwig4 Dec 22, 2022
e3cfc97
docs: further command
4ludwig4 Dec 22, 2022
7e96e1b
added bamboo pipeline files for E2E tests
4ludwig4 Dec 22, 2022
cd64aa2
refactored cypress docker compose setup
4ludwig4 Dec 23, 2022
6d658b7
cypress setup use compose version for now
4ludwig4 Dec 23, 2022
b5cce5a
fix path and compose version workaround
4ludwig4 Dec 23, 2022
9cbb601
corrected cypress settings and removed non-used settings
4ludwig4 Dec 23, 2022
fd6f2ff
cypress: set log-level
4ludwig4 Dec 23, 2022
2020b5e
Revert "cypress: set log-level"
4ludwig4 Dec 23, 2022
bd013be
cypress: healthchecks right port
4ludwig4 Dec 23, 2022
0d214b1
right order of profiles
4ludwig4 Dec 23, 2022
5089848
just use environment style enviroment values
4ludwig4 Jan 9, 2023
e5834c6
adjust volume directory
4ludwig4 Jan 9, 2023
fd5bac5
merge default cypress docker environments
4ludwig4 Jan 9, 2023
60f1d3e
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Jan 10, 2023
8ee354f
remove caching idea for now
4ludwig4 Jan 11, 2023
475d3c5
add restart policy
4ludwig4 Jan 11, 2023
2e94016
remove duplicate TODO
4ludwig4 Jan 11, 2023
6ed964f
rephrase open todos
4ludwig4 Jan 11, 2023
cb05f76
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Jan 12, 2023
9d4bad7
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Jan 20, 2023
0f73c8b
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Jan 23, 2023
a5dd341
removed Artemis seperated Server Client Setup as not maintained
4ludwig4 Jan 23, 2023
3ebe27e
removed Jenkis swift Dockerfile as it's legacy
4ludwig4 Jan 25, 2023
815509a
Update src/main/resources/config/application-docker.yml
4ludwig4 Jan 25, 2023
1fead02
Docker.io as registry and jdk image for artemis
4ludwig4 Jan 25, 2023
cac485c
also added docker.io/library as registry in other Dockerfiles and Com…
4ludwig4 Jan 25, 2023
fd97354
remove apt version pinning
4ludwig4 Jan 25, 2023
8f41e14
fixed docker.io paths
4ludwig4 Jan 25, 2023
a6d633c
moved mailhog and saml-test service and incoperated configuration fee…
4ludwig4 Jan 25, 2023
a71597c
better setup/service documentation and improved monitoring setup
4ludwig4 Jan 25, 2023
d8d3c29
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Jan 25, 2023
01fdf0a
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Jan 30, 2023
91a87e4
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Feb 3, 2023
b59981a
streamline yml file extensions in docs
4ludwig4 Feb 3, 2023
b9f7846
streamlined environment variables and ports of docker compose files
4ludwig4 Feb 3, 2023
82def66
changed bamboo script paths
4ludwig4 Feb 6, 2023
a09b08a
fix amd64 build
4ludwig4 Feb 6, 2023
0b66604
notice for docker image arch support
4ludwig4 Feb 6, 2023
98f3770
expose tags for all open ports
4ludwig4 Feb 8, 2023
ca7f6d1
use linux/amd64 to make it work for MacOS
4ludwig4 Feb 8, 2023
f3f7f26
fix typo and artemis-dev setup cleanup
4ludwig4 Feb 8, 2023
403b11b
moved host.docker.internal linux workaround
4ludwig4 Feb 8, 2023
5dfa293
moved host.docker.internal linux workaround - legacy artemis docker c…
4ludwig4 Feb 8, 2023
b0fc28f
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Feb 16, 2023
3b7244a
fix indentation
4ludwig4 Feb 16, 2023
de992ad
add docker compose structure drawio from deployment-wg confluence
4ludwig4 Feb 16, 2023
cdcc34e
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Feb 18, 2023
4858c04
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Feb 27, 2023
5ff6f3a
enable bamboo docker builds when running artemis with a dev profile
4ludwig4 Mar 2, 2023
d7de4c4
Merge remote-tracking branch 'origin/develop-deployment-wg' into deve…
4ludwig4 Mar 3, 2023
836a3a0
remove unnecessary variables after removing bamboo dev profile check
4ludwig4 Mar 3, 2023
94b4951
Merge branch 'develop' into develop-deployment-wg
4ludwig4 Mar 3, 2023
12229ca
fix bamboo build agent volume problem
4ludwig4 Mar 6, 2023
adcede2
Merge branch 'develop-deployment-wg' of github.com:ls1intum/Artemis i…
4ludwig4 Mar 6, 2023
de83e5b
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 6, 2023
e0cca1d
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 8, 2023
2519cc3
Extract nginx from E2E into own folder and use it in prod setup
Hialus Mar 8, 2023
ac76a38
cleanup nginx refactoring of Timor
4ludwig4 Mar 9, 2023
9923137
fix cypress merge issues
4ludwig4 Mar 9, 2023
6eec599
fix cypress compose paths
4ludwig4 Mar 9, 2023
f54130b
fix nginx refactoring
4ludwig4 Mar 9, 2023
e6cd11b
fix missing volume defintions
4ludwig4 Mar 9, 2023
e15a9ad
remove unnecessary netcat dependency from Dockerfilo and cleanup
4ludwig4 Mar 9, 2023
406f540
Apply suggestions from code review
4ludwig4 Mar 9, 2023
8d3086b
add dockerfile multi stage hint/link in docs
4ludwig4 Mar 9, 2023
fe9f480
mark missing default in debugging section for docker compose in the docs
4ludwig4 Mar 9, 2023
0fe2843
remove obsolete swift and c overrides for atlassian also in the readme
4ludwig4 Mar 9, 2023
42a14ff
E2E Tests: specify which containers should be built/pulled
4ludwig4 Mar 9, 2023
dbf9b47
E2E Tests: more robust cleanup script with old docker compose version…
4ludwig4 Mar 9, 2023
fe5afeb
integrate Artemis Java command in Dockerfile
4ludwig4 Mar 9, 2023
9a749b6
trying to force stop and remove all docker containers, named volumes …
4ludwig4 Mar 9, 2023
257f4ce
removed run_artemis.sh related code fragments
4ludwig4 Mar 9, 2023
98ae7c4
updated/synced cloned compose 2.4 files for cypress tests
4ludwig4 Mar 9, 2023
bb5aad5
move artemis healthchecks as docker compose seems to not work as docu…
4ludwig4 Mar 10, 2023
9c1bca7
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 10, 2023
35dcf29
change wording in docker compose comments
4ludwig4 Mar 10, 2023
fc3a5ff
add nginx setup to docs
4ludwig4 Mar 10, 2023
ff7d3ca
fix cypress refactoring typo
4ludwig4 Mar 10, 2023
4f76b1a
fix cypress refactoring port problem
4ludwig4 Mar 10, 2023
831c415
renamed .env file for artemis prod docker container
4ludwig4 Mar 13, 2023
6c4256e
removed docker compose v2 specs as bamboo agents are now updated
4ludwig4 Mar 13, 2023
19e2365
refactored nginx base service
4ludwig4 Mar 13, 2023
0343e7a
fix Dockerfile command for correct signal handling
4ludwig4 Mar 13, 2023
53c9137
add option to build Docker Image with external .war file
4ludwig4 Mar 16, 2023
d92abfc
cleanup docker README and just point to other docs
4ludwig4 Mar 16, 2023
adbdd89
revert .bamboo cleanup scripts to origin/develop
4ludwig4 Mar 17, 2023
ae034ff
fix external .war file insertion into Dockerfile
4ludwig4 Mar 17, 2023
adce61c
fix docker debugging suspend argument
4ludwig4 Mar 17, 2023
5d410dc
removed non-docker .gitignore entries from docker section
4ludwig4 Mar 17, 2023
1c0c8b8
added external_builder dockerfile documentation
4ludwig4 Mar 17, 2023
4e818b9
moved docker from src/main/docker to docker
4ludwig4 Mar 17, 2023
e79c8f2
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 17, 2023
226926d
fix E2E renamings after the move to ./docker/
4ludwig4 Mar 17, 2023
54ea9c0
enhancements E2E tests
4ludwig4 Mar 17, 2023
2c65ae2
fix E2E coverage test
4ludwig4 Mar 17, 2023
eb730a8
renamed artemis-nginx to nginx as service name, container name still …
4ludwig4 Mar 17, 2023
3cd7864
remove split keyboard typo ... upsi
4ludwig4 Mar 17, 2023
b4aa5f9
artemis-nginx renaming fix as intellij didn't find that occurence ...
4ludwig4 Mar 17, 2023
8f10148
mysql healthcheck didn't work with DB init before, at least on fast E…
4ludwig4 Mar 20, 2023
5114fd9
resolved todo. atlassian stack with docker build agent is now a defau…
4ludwig4 Mar 20, 2023
7f3fa6c
fix: use correct E2E war import path
4ludwig4 Mar 20, 2023
5ac2ec9
enhancement: limit mysql access to 127.0.0.1
4ludwig4 Mar 20, 2023
23f21e8
fix: rather have an easy Dockerfile than an easy bamboo script
4ludwig4 Mar 20, 2023
46251cf
enhancement: Dockerfile includes build commands
4ludwig4 Mar 20, 2023
6081d7a
removed TODO as we won't use symlinks even if possible due to windows…
4ludwig4 Mar 21, 2023
bd3dbd3
remove TODO but keep comment as description
4ludwig4 Mar 21, 2023
8a324e7
streamline ports syntax
4ludwig4 Mar 21, 2023
1f1bf58
bind mounts for prod setup
4ludwig4 Mar 22, 2023
91efcad
OMG fix a copy paste error in the nginx config
4ludwig4 Mar 22, 2023
d42ed9f
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 22, 2023
b0fcaa5
simplify nginx upstream and artemis-app healthchecks and longer start…
4ludwig4 Mar 22, 2023
60c525a
don't add docker compose files to docker context especially because o…
4ludwig4 Mar 22, 2023
a0d9149
fix E2E port after simplification of healtchecks
4ludwig4 Mar 22, 2023
a08970c
fix broken documentation image link
4ludwig4 Mar 23, 2023
6eb92af
add backwards compatibility for bamboo to some degree and add updated…
4ludwig4 Mar 23, 2023
4d2419b
reverse backwards compatibility checks but keep updated cleanup and e…
4ludwig4 Mar 23, 2023
fbd1c6e
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 23, 2023
5167408
increase startup times of docker containers
4ludwig4 Mar 23, 2023
c0d48f7
fix broken Jenkins build path after the refactoring to the docker dir…
4ludwig4 Mar 23, 2023
e9eef17
remove unused env variable
4ludwig4 Mar 27, 2023
0e66d10
add docker directory to spotless excludes and format them in a nicer way
4ludwig4 Mar 27, 2023
632689c
Merge remote-tracking branch 'origin/develop' into develop-deployment-wg
4ludwig4 Mar 27, 2023
8a9d8d2
Merge branch 'develop' into develop-deployment-wg
julian-christl Mar 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 24 additions & 3 deletions .bamboo/E2E-tests-with-flake-detection/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
#!/bin/sh

cd src/main/docker/cypress

# HOST_HOSTNAME not really necessary for shutdown but otherwise docker-compose complains
export HOST_HOSTNAME=$(hostname)
docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml down -v
# show all running docker containers and volumes after the cleanup to detect issues
echo "SHOW RUNNING Docker containers and volumes:"
docker ps -a
docker volume ls
# first kill ALL containers on the bamboo agent
echo "KILLING Docker containers, volumes and networks:"
docker container stop $(docker ps -a -q) || true
docker container rm $(docker ps -a -q) || true
docker volume rm $(docker volume ls -q) || true

# then kill remaining project volumes and networks which should be easy removable as not bound to containers anymore
docker compose -f ./docker/cypress-E2E-tests.yml -f ./docker/cypress-E2E-tests-coverage-override.yml down -v


# show all running docker containers and volumes after the cleanup to detect issues
echo "SHOW RUNNING Docker containers and volumes:"
docker ps -a
docker volume ls

# show docker and docker compose version
echo "VERSIONS:"
docker compose version || true
docker-compose version || true
docker version || true
21 changes: 9 additions & 12 deletions .bamboo/E2E-tests-with-flake-detection/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,26 @@
mkdir -p build/libs
mv ./*.war build/libs/

# pass current host's hostname to the docker container for server.url (see docker compose config file)
export HOST_HOSTNAME=$(hostname)

# Load git history needed for analysis
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"

git fetch --unshallow || git fetch --all

docker build . -f ./src/main/docker/Dockerfile -t artemis:coverage-latest

# Start Artemis docker containers with docker-compose
cd src/main/docker/cypress

# pass current host's hostname to the docker container for server.url (see docker compose config file)
export HOST_HOSTNAME=$(hostname)

docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml pull
cd docker
docker build .. --build-arg WAR_FILE_STAGE=external_builder -f ./artemis/Dockerfile -t artemis:coverage-latest
docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml pull nginx mysql
docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml build --no-cache --pull artemis-cypress
#do not pull the base image artemis:coverage-latest for artemis-app as it's stored locally and built above
docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml build --no-cache artemis-app
docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml build --build-arg WAR_FILE_STAGE=external_builder --no-cache artemis-app
docker compose -f cypress-E2E-tests.yml -f cypress-E2E-tests-coverage-override.yml up --exit-code-from artemis-cypress
exitCode=$?
cd ..
echo "Cypress container exit code: $exitCode"
if [ $exitCode -eq 0 ]
then
touch ../../../../.successful
touch .successful
else
echo "Not creating success file because the tests failed"
fi
25 changes: 22 additions & 3 deletions .bamboo/E2E-tests/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
#!/bin/sh

cd src/main/docker/cypress

# HOST_HOSTNAME not really necessary for shutdown but otherwise docker-compose complains
export HOST_HOSTNAME=$(hostname)
docker compose -f cypress-E2E-tests.yml down -v
# show all running docker containers and volumes after the cleanup to detect issues
echo "SHOW RUNNING Docker containers and volumes:"
docker ps -a
docker volume ls
# first kill ALL containers on the bamboo agent
echo "KILLING Docker containers, volumes and networks:"
docker container stop $(docker ps -a -q) || true
docker container rm $(docker ps -a -q) || true
docker volume rm $(docker volume ls -q) || true

docker compose -f ./docker/cypress-E2E-tests.yml down -v

# show all running docker containers and volumes after the cleanup to detect issues
echo "SHOW RUNNING Docker containers and volumes:"
docker ps -a
docker volume ls

# show docker and docker compose version
echo "VERSIONS:"
docker compose version || true
docker-compose version || true
docker version || true
12 changes: 6 additions & 6 deletions .bamboo/E2E-tests/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
mkdir -p build/libs
mv ./*.war build/libs/

# Start Artemis docker containers with docker-compose
cd src/main/docker/cypress

# pass current host's hostname to the docker container for server.url (see docker compose config file)
export HOST_HOSTNAME=$(hostname)

docker compose -f cypress-E2E-tests.yml pull
docker compose -f cypress-E2E-tests.yml build --no-cache --pull
cd docker
#just pull everything else than artemis-app as we build it later either way
docker compose -f cypress-E2E-tests.yml pull artemis-cypress mysql nginx
docker compose -f cypress-E2E-tests.yml build --build-arg WAR_FILE_STAGE=external_builder --no-cache --pull artemis-app
docker compose -f cypress-E2E-tests.yml up --exit-code-from artemis-cypress
exitCode=$?
cd ..
echo "Cypress container exit code: $exitCode"
if [ $exitCode -eq 0 ]
then
touch ../../../../.successful
touch .successful
else
echo "Not creating success file because the tests failed"
fi
39 changes: 39 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
classes/
generated-sources/
generated-test-sources/
h2db/
maven-archiver/
maven-status/
reports/
surefire-reports/
test-classes/
test-results/
www/
!*.jar
!*.war

# exclude hidden directories like .idea, .gradle, .cache, .github
.*
# do not exclude .git as it's necessary to insert the commit id into the build
!.git
# do not exclude .eslint files as they are required in the build process
!.eslintignore
!.eslintrc
# do not exclude .npmrc as it's required in the build process for setting the correct node options
!.npmrc
# exclude node_modules if installed locally
node_modules
# exclude build binaries except a pre-built .war file
build/*
!build/libs/*.war

# exclude the docker files and the /docker/.docker-data folders
docker/

# files inside of the root directory not needed
CITATION.cff
CODE_OF_CONDUCT.md
LICENSE
README.md
SECURITY.md
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ node_modules/
out/
repos/
repos-download/
src/main/docker/
docker/
src/main/generated/
src/main/resources/
uploads/
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ env:
jobs:

build:
name: Build .war artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -73,18 +74,10 @@ jobs:
asset_content_type: application/x-webarchive

docker:
name: Build and Push Docker Image
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'ls1intum/Artemis' }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: Artemis.war
- name: Build Docker Image
run: docker build --build-arg WAR_PATH=. -t artemis -f src/main/docker/Dockerfile .

- name: Compute Tag
uses: actions/github-script@v6
id: compute-tag
Expand All @@ -106,22 +99,30 @@ jobs:
}
}
return "FALSE";

# Push to GitHub Container Registry
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Build and Push to GitHub Container Registry
4ludwig4 marked this conversation as resolved.
Show resolved Hide resolved
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v3
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
- name: Push to GitHub Container Registry
env:
TAG: ${{ steps.compute-tag.outputs.result }}
run: |
docker tag artemis ghcr.io/ls1intum/artemis:$TAG
docker push ghcr.io/ls1intum/artemis:$TAG
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
with:
# TODO: maybe even add arm/v7 for older DevBoards and arm64 for Mac M1 and new DevBoards
# TODO: add arm64 support by first building the .war file in a amd64 step then creating the runtime env
platforms: amd64
Copy link
Member

Choose a reason for hiding this comment

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

Please add the ARM image here now. Should be as easy as

Suggested change
platforms: amd64
platforms: linux/arm64/v8,linux/amd64

Copy link
Contributor Author

@4ludwig4 4ludwig4 Mar 8, 2023

Choose a reason for hiding this comment

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

I had the first initial thought. When I did so a few weeks ago, the GitHub builder just timed out. When I saw that M1 users also had issues building Artemis natively without Rosetta, I got curious and tried to do that on an Oracle ARM Ampere Server. The result was that Gradle didn't finish after a few hours, so I expect that the problem is that we can't build Artemis yet natively on ARM.

Copy link
Member

Choose a reason for hiding this comment

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

Please create an issue for this - I think this should be rather easy to achieve but it is out of scope for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just created the Issue on GitHub and also have it on my internal Task board on confluence.

file: ./docker/artemis/Dockerfile
context: .
tags: ghcr.io/ls1intum/artemis:${{ steps.compute-tag.outputs.result }}
push: true

# TODO: Push to Docker Hub (develop + tag)

Expand Down
38 changes: 25 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ node_modules/
npm-debug.log.*
/.awcache/*
.node-gyp/
/.cache-loader/*
/.cache-loader/

######################
# SASS
Expand Down Expand Up @@ -59,8 +59,9 @@ local.properties
######################
# Intellij
######################
.idea/
!.idea/runConfigurations/*
.idea/*
!.idea/runConfigurations/
!.idea/icon.svg
*.iml
*.iws
*.ipr
Expand Down Expand Up @@ -151,6 +152,11 @@ Desktop.ini
repos/
repos-download/
/templates/
.bash_history
.v8flags.*.json
/src/main/generated
/coverage
/exports

######################
# Gradle Wrapper
Expand All @@ -171,20 +177,26 @@ repos-download/
######################
# Docker
######################
.bash_history
.v8flags.*.json
/.cache-loader
/src/main/generated
/coverage
/exports
/src/main/docker/.env
/src/main/resources/config/application-local*.yml
/src/main/resources/id_*
/src/main/resources/known_hosts
/docker/.env
/docker/.docker-data/artemis-data/*
!/docker/.docker-data/artemis-data/.gitkeep
/docker/.docker-data/artemis-mysql-data/*
!/docker/.docker-data/artemis-mysql-data/.gitkeep

######################
# Cypress
######################
/src/test/cypress/screenshots/
/src/test/cypress/videos/
/src/test/cypress/build

######################
# Artemis configs
######################
/src/main/resources/config/application-local*.yml
/src/main/resources/id_*
/src/main/resources/known_hosts

######################
# Coverage Files
######################
Expand Down
15 changes: 15 additions & 0 deletions .idea/runConfigurations/Remote_Java_Debugging_for_Docker.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions bootstrap.sh

This file was deleted.

17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,18 @@ spotless {
java {
target project.fileTree(project.rootDir) {
include "**/*.java"
exclude "**/src/main/java/de/tum/in/www1/artemis/service/connectors/BambooService.java", "**/src/test/resources/test-data/repository-export/EncodingISO_8559_1.java", "**/node_modules/**", "**/out/**", "**/repos/**", "**/repos-download/**", "**/build/**", "**/src/main/generated/**", "**/src/main/resources/templates/**"
exclude(
"**/src/main/java/de/tum/in/www1/artemis/service/connectors/BambooService.java",
"**/src/test/resources/test-data/repository-export/EncodingISO_8559_1.java",
"**/node_modules/**",
"**/out/**",
"**/repos/**",
"**/repos-download/**",
"**/build/**",
"**/src/main/generated/**",
"**/src/main/resources/templates/**",
"/docker/**"
)
}
importOrderFile "artemis-spotless.importorder"
eclipse("4.19.0").configFile "artemis-spotless-style.xml"
Expand Down Expand Up @@ -404,10 +415,6 @@ checkstyle {
maxErrors = 0
}

task buildJarForDocker (type: Exec) {
commandLine "./gradlew", "build", "-x", "webapp", "-x", "test", "-x", "jacocoTestCoverageVerification"
}

def isNonStable = { String version ->
def stableKeyword = ["RELEASE", "FINAL", "GA"].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
Expand Down