https://prefect.io logo
j

jpuris

07/30/2023, 4:32 PM
Heya! Is there Gitlab CI/CD example for
prefect deploy
? ☀️ I've found the PrefectHQ/actions-prefect-deploy, but the company is committed on using Gitlab 😞
1
The target flow is run on kubernetes with Prefect worker. We use Prefect project and normally would run
Copy code
prefect deploy --no-promt --name <deployment_name>
on our local dev machines. I'm looking to automate this step as part of Gitlab pipeline.
j

jawnsy

07/30/2023, 5:07 PM
We don’t have a GitLab example right now, but thanks for letting us know about your interest! We’re not too familiar with GitLab as we use GitHub at Prefect, but we’d be happy to review a contribution from you if you end up building one It might be possible for you to use the Migrating from GitLab CI/CD to GitHub Actions guide in reverse — the action we’ve built is relatively simple and really just runs a few shell commands
💙 1
j

jpuris

07/30/2023, 5:13 PM
Thank you @jawnsy! The example in github actions runs
Copy code
prefect --no-prompt deploy --name "$name"
I'd imagine this would not work, when you've got following build steps in the
prefect.yaml
Copy code
- prefect_docker.deployments.steps.build_docker_image

- prefect_docker.deployments.steps.push_docker_image
As that requires docker engine available. I'm just curious, what would you need to do to make it work in github actions? This would help me to put together the gitlab version of it..
j

jawnsy

07/30/2023, 5:16 PM
GitHub Actions has a docker engine available in it, I don’t know much about how the GitLab runners work, it’s possible you’ll need to figure out docker-in-docker (if your GitLab runners are in Kubernetes). This looks possibly helpful: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
👍 1
j

jpuris

07/30/2023, 5:17 PM
This is helpful, thank you! I'll get back to this thread once I've got this working
🙌 1