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

ci: build docker image using jib TECH-1279 #11301

Closed
wants to merge 6 commits into from
Closed

ci: build docker image using jib TECH-1279 #11301

wants to merge 6 commits into from

Conversation

teleivo
Copy link
Contributor

@teleivo teleivo commented Jul 18, 2022

  • build Docker image using Jib specifically its Maven plugin
  • run e2e tests using the Jib image
  • add dev setup for running DHIS2 in Docker

Docker image build time

TODO

Before

...

Jib

Build core image step: 4m27s
Jib maven command: [INFO] Total time: 01:24 min

Docker image size

TODO

Running as non-root

Run DHIS2

docker compose up dhis2-core db

Check process running Tomcat is owned by user uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)

docker exec -it core-dhis2-core-1 ls -l /proc/1/
total 0
-r--r--r--   1 nobody nogroup 0 Jul 19 09:52 arch_status
dr-xr-xr-x   2 nobody nogroup 0 Jul 19 09:49 attr
-rw-r--r--   1 nobody nogroup 0 Jul 19 09:52 autogroup
-r--------   1 nobody nogroup 0 Jul 19 09:52 auxv
-r--r--r--   1 nobody nogroup 0 Jul 19 09:49 cgroup
...

What's next

After we agree on building with Jib we should

  • transition to using Jib to build the Docker images we publish to Dockerhub
  • remove any files that are not needed anymore like docker
  • ...

@teleivo teleivo force-pushed the jib-e2e branch 6 times, most recently from 4567193 to a1bf672 Compare July 18, 2022 10:53
@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #11301 (923d248) into master (c5d414c) will decrease coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 923d248 differs from pull request most recent head 5e31d0c. Consider uploading reports for the commit 5e31d0c to get more accurate results

@@             Coverage Diff              @@
##             master   #11301      +/-   ##
============================================
- Coverage     62.90%   62.89%   -0.01%     
- Complexity    27104    27106       +2     
============================================
  Files          3188     3188              
  Lines        112501   112495       -6     
  Branches      13226    13226              
============================================
- Hits          70764    70759       -5     
+ Misses        35641    35637       -4     
- Partials       6096     6099       +3     
Flag Coverage Δ
integration 45.17% <ø> (+<0.01%) ⬆️
integration-h2 32.82% <ø> (-0.01%) ⬇️
unit 28.44% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...p/dhis/fileresource/FileResourceEventListener.java 36.95% <0.00%> (-6.53%) ⬇️
...is/webapi/controller/sms/SmsGatewayController.java 81.25% <0.00%> (-2.97%) ⬇️
...ava/org/hisp/dhis/sms/config/SmsGatewayConfig.java 84.84% <0.00%> (ø)
...va/org/hisp/dhis/sms/config/SMPPGatewayConfig.java 0.00% <0.00%> (ø)
...org/hisp/dhis/sms/config/BulkSmsGatewayConfig.java 100.00% <0.00%> (ø)
.../hisp/dhis/sms/config/ClickatellGatewayConfig.java 25.00% <0.00%> (ø)
...hisp/dhis/sms/config/GenericHttpGatewayConfig.java 88.88% <0.00%> (ø)
...ava/org/hisp/dhis/system/util/ReflectionUtils.java 50.00% <0.00%> (+0.60%) ⬆️
...i/src/main/java/org/hisp/dhis/program/Program.java 86.27% <0.00%> (+0.98%) ⬆️
...org/hisp/dhis/program/AnalyticsPeriodBoundary.java 68.85% <0.00%> (+1.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5d414c...5e31d0c. Read the comment docs.

@teleivo teleivo changed the title ci: build docker image using jib ci: build docker image using jib TECH-1279 Jul 19, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jul 19, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@teleivo
Copy link
Contributor Author

teleivo commented Jul 19, 2022

closing in favor of #11308 to rename the branch to TECH-1279

@teleivo teleivo closed this Jul 19, 2022
@teleivo teleivo deleted the jib-e2e branch July 6, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants