gitlab runner test

This commit is contained in:
박정민 2024-08-01 09:35:52 +09:00
parent fe8e5f1bd0
commit 1fc4ec876e
3 changed files with 28 additions and 4 deletions

23
backend/.gitlab-ci.yml Normal file
View File

@ -0,0 +1,23 @@
deploy-to-server:
stage: deploy
only:
- backend
before_script:
- echo 'start deployment'
- whoami
script:
- cd /home/ubuntu/gitlab_runner/
- git pull origin backend
- cd backend
# - kill $(lsof -t -i:8000)
- ./gradlew build
# - cd /home/ubuntu/s03p12a112/backend/target/
# - setsid nohup java -jar backend-0.0.1-SNAPSHOT.jar > /dev/null 2>&1 &
# - cd /home/ubuntu/s03p12a112/frontend/
# - sudo npm install
# - sudo npm run build
# - sudo service nginx restart
after_script:
- echo 'deployment is done'
tags:
- edu

View File

@ -21,7 +21,7 @@ public class WebConfiguration implements WebMvcConfigurer {
this.jwtInterceptor = jwtInterceptor;
}
//
@Override
public void addCorsMappings(CorsRegistry registry) {
registry

View File

@ -98,7 +98,7 @@ public class Controller {
Random random = new Random();
System.out.println();
int randomNumber = 100 + random.nextInt(9000);
String randStr = String.valueOf(randomNumber);
@ -110,8 +110,9 @@ public class Controller {
String roomName = lecture.getTitle();
String participantName = userService.getUserName(userId);
System.out.println(participantName);
System.out.println(participantName+randStr);
AccessToken token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
token.setName(participantName+randStr);
token.setIdentity(participantName+randStr);
@ -129,7 +130,7 @@ public class Controller {
String roomName = lecture.getTitle();
String participantName = userService.getUserName(userId);
System.out.println(participantName);
AccessToken token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
token.setName(participantName+randStr);