R
Railway2y ago
Samir

CD using Gitlab to Railway Project

Hey, I am trying to deploy my springboot application from Gitlab to railway. Here is my gitlab-ci.yml (Pipeline config file).
11 Replies
Percy
Percy2y ago
Project ID: 5fd14833-a31b-49bc-b9a8-09e1d6952946
Samir
Samir2y ago
5fd14833-a31b-49bc-b9a8-09e1d6952946
root
root2y ago
That looks like it should work; does it not?
Samir
Samir2y ago
Here is the output I am getting
Samir
Samir2y ago
Sorry I left out key details in the original post my bad! I set up a token called GITLAB_DEPLOY in Project settings, Tokens, in Railway. I then created a environment variable called RAILWAY_SERVICE_NAME with the value of that token in GitLab.
root
root2y ago
Did you set the RAILWAY_TOKEN environment variable in GitLab to that token?
Samir
Samir2y ago
So, I've got these variables in GitLab
Samir
Samir2y ago
Okay so I was previously assigning the project token to the service token and expecting that to work. I messed up there but this guide did confuse me a little https://blog.railway.app/p/gitlab-ci-cd. @aleks just wondering, why do we have to set the RAILWAY_TOKEN environment variable?
Brody
Brody2y ago
how else would you expect to authenticate the railway cli
Samir
Samir2y ago
True lol. I was tired I guess but I think at the time I got confused by the guide to be honest also I thought the token I generated off the project tokens would’ve done it for me. I think the guide could be improved slightly to be honest.
Brody
Brody2y ago
ive read over the guide, i think its pretty straight forward and easy to understand, you where tired so no worries
Want results from more Discord servers?
Add your server