-
Notifications
You must be signed in to change notification settings - Fork 5
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/CD for VTEX IO #672
Comments
Hey @FabricioJuliatto-DBC ! I'm also excited to create this kind of thing. One of the things I was thinking to solve this kind of problem is to send ApiKey and ApiToken to retrieve a OAuth Token and put in Just create a script that sends the follow curl:
And the response should look like this: {
"applicationId": "vtex",
"token": "358a5bea-07d0-4122-888a-54ab70b5f02f"
} I'll test and then come back to post if it worked. |
I'm taking a look at the VTEX ID documentations, I think it's the way, as the segment I mentioned above doesn't generate a token for authentication (JWT).
|
Hey! Maybe I found the solution! I've spent a few hours since then. I've tried to rewrite toolbelt login method. Then studying about VTEX providers I found one they didn't list. The provider key is called Some searches on github VTEX's repositories related to Look at this code snippet: const payload = {
appkey: '<your-vtex-app-key>',
apptoken: '<your-vtex-app-token>',
}
return fetch(
`http://api.vtexcommercestable.com.br/api/vtexid/apptoken/login?an=${ACCOUNT}`,
{
method: 'POST',
body: JSON.stringify(payload),
headers: { 'Content-Type': 'application/json' },
}
)
.then((res) => res.json())
.then((res) => res.token) I changed the base to: That's it Bro! If the solution was good, give a reaction! PS: This file that i've found do exactly what you need. Because it's saves the token to |
Hi, I'm trying to do this same thing with no success. |
hi all, I am also trying to setup CICD for my application. I am able to login to vtex as a part of CI. Main problem now is, when I run any of below commnds
It prompts to enter "Y/N" options, which needs to be avoided in CI/CD. There is --yes flag which can be passed but it is not available for some of the above commands. Any idea how to resolve this? |
Hi , how could to solve the login on the CI? You can pass and argument in the shell to answer Y or N: echo Y | vtex link |
right way is: |
Hi @rgangarde, how could to solve the login on the CI? |
I'm using with GitHub actions this pipeline and works good! |
Hi @ericklb84, where should I write the bash commands to automatically respond to prompts? And when should I run them? |
Hy Team, can i get the details of whole ci for vtex deployment. |
What are you trying to accomplish? Please describe.
I am trying to setup a CI/CD pipeline for a new VTEX store. For example, I would like to be able to automatically release a new version of an app after a merge to main. However, I am not aware of any way of making releases other than using Toolbelt and I don't know how to use it in an automated environment. The main issue is the login: the OAuth dialog requires a human to interact with it. Is there any supported way of using Toolbelt in CI/CD or is there another supported way of publishing and deprecating apps that would allow me to do it without human intervention? Thanks!
The text was updated successfully, but these errors were encountered: