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 images automatically #800

Merged
merged 12 commits into from
Sep 14, 2023
Merged

ci: build docker images automatically #800

merged 12 commits into from
Sep 14, 2023

Conversation

Nischay-Pro
Copy link
Contributor

@Nischay-Pro Nischay-Pro commented Aug 8, 2023

Description

This PR introduces a new CI pipeline to automatically build docker images on a new pull request or push to the main branch.

In addition we also start a postgres service, perform database upgrade, and seeding toy user data to the database.

Related Items

Closes #795


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Awesome, and it already works!

Would it be easy to add some data and a few commands, like in this script?

This basically would run the basic toy tutorial.

But this can also become a new issue, after this gets merged.

.github/workflows/build.yml Show resolved Hide resolved
@Nischay-Pro
Copy link
Contributor Author

Awesome, and it already works!

Would it be easy to add some data and a few commands, like in this script?

This basically would run the basic toy tutorial.

But this can also become a new issue, after this gets merged.

This looks like a good thing to test. I am assuming we need a Redis server to test the scheduling functionality also?

@nhoening
Copy link
Contributor

No, that is only needed when --as-job is used in the CLI command to get a schedule.

Could be a follow-up though

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

fix dummy data generation

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

add docker name

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

fix docker commands

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

add docker container name

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

remove -it

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

run in background mode

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

fix docker exec

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

run docker in background

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

fix db upgrade

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

fix env var

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>

export env variable in actions

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…schedule time

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Thanks, great work!

.github/workflows/build.yml Outdated Show resolved Hide resolved
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening merged commit d2aed6a into main Sep 14, 2023
4 checks passed
@nhoening nhoening deleted the docker-ci branch September 14, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Docker image in Github Actions
2 participants