-
Notifications
You must be signed in to change notification settings - Fork 529
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
Preview environments w/ Okteto #773
Conversation
5f1d3d0
to
97cbad6
Compare
Your preview environment pr-773-bttf has been deployed. Preview environment endpoints are available at: |
5c89d07
to
a54416f
Compare
a54416f
to
2176a2e
Compare
a69aba2
to
009893c
Compare
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: pr-${{ github.event.number }}-bttf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okteto won't let preview environment names end in anything other than the Okteto's user's name, so in this case bttf
has to be appended
- APP_ORIGIN=https://growthbook-3000-${OKTETO_NAMESPACE}.cloud.okteto.net | ||
- API_HOST=https://growthbook-3100-${OKTETO_NAMESPACE}.cloud.okteto.net | ||
- JWT_SECRET=${JWT_SECRET} | ||
- IS_CLOUD=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if there's a way to configure the env or specifically IS_CLOUD based on build parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding correctly, I think that's pretty much what we're doing ... This docker compose file is where we configure the builds to be built by okteto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I meant is letting the PR author (user) pass in some sort of env variable into the job / docker-compose file. For example, we could manually override the IS_CLOUD={true|false} or other properties. Something like this...
https://blog.geralexgr.com/github/parameters-and-variables-github-workflows
Anyhow don't let this block you, just an idea for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Makes sense, I did not know github allowed that for its workflows ... In any case, these defaults we've selected should work for the majority of cases ... Good to know we have this option for the future if we need it
Using Okteto Cloud to power preview environments via GitHub Actions
Once merged these changes should enable preview environments for all feature branches pushed to the repo moving forward
For the time being, it's running under my free-tier Okteto account which should be sufficient for now (but still under test for use across the team)