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 and healthcheck #629

Closed
wants to merge 10 commits into from
Closed

ci: build docker image and healthcheck #629

wants to merge 10 commits into from

Conversation

nawramm
Copy link

@nawramm nawramm commented Jan 1, 2024

Finally got to sit down for a bit and work on this
There is a slight overlap between this and #623 which may make this PR unnecessary

Closes: #534

License Agreement for Contributions

By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under MPL 2.0 (Mozilla Public License Version 2.0) license.

(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)

This commit adds a new job to the GitHub Actions workflow. The job builds
and checks the health of several Docker images. The images are defined in a
matrix and include 'standard', 'standard with auth', 'ultra-lite',
'ultra-lite with auth', 'lite', and 'lite with auth'.

The Docker run command and health check command are adjusted based on
whether the image name includes 'with auth'. If the container is healthy,
it is stopped and removed. If it is not healthy after a certain period,
the job fails.
@Frooodle
Copy link
Member

Frooodle commented Jan 1, 2024

I was just wondering what happened to you doing this i assumed you dropped it and so i was doing something similar for my local testing planning to eventually migrate it
https://github.com/Stirling-Tools/Stirling-PDF/blob/changes/test.sh

@Frooodle
Copy link
Member

Frooodle commented Jan 1, 2024

oh i see you noticed that PR

@Frooodle
Copy link
Member

Frooodle commented Jan 1, 2024

Having a dedicated github action for it however is still good, will test and merge this, thanks for the work!

@Frooodle
Copy link
Member

Frooodle commented Jan 1, 2024

Was testing using the local testing script i made to try avoid duplication

https://github.com/Stirling-Tools/Stirling-PDF/blob/githubActionTest/.github/workflows/test.yml

@nawramm
Copy link
Author

nawramm commented Jan 2, 2024

Looks good to me, closing this PR.

I would suggest changing the versionNumber step to:

- name: Get version number
      id: versionNumber
      run: echo "name=versionNumber::$(./gradlew printVersion --quiet | tail -1)" >> "$GITHUB_ENV"

Then you can replace ${{ steps.versionNumber.outputs.versionNumber }} with $versionNumber

I think the docker-compose install step is redundant as the action for f3742eb ran succesfully

@nawramm nawramm closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature(ci): Build image on pr for testing
2 participants