gitlab runner test
This commit is contained in:
parent
fe8e5f1bd0
commit
1fc4ec876e
23
backend/.gitlab-ci.yml
Normal file
23
backend/.gitlab-ci.yml
Normal 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
|
@ -21,7 +21,7 @@ public class WebConfiguration implements WebMvcConfigurer {
|
|||||||
|
|
||||||
this.jwtInterceptor = jwtInterceptor;
|
this.jwtInterceptor = jwtInterceptor;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
registry
|
registry
|
||||||
|
@ -98,7 +98,7 @@ public class Controller {
|
|||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
|
System.out.println();
|
||||||
int randomNumber = 100 + random.nextInt(9000);
|
int randomNumber = 100 + random.nextInt(9000);
|
||||||
|
|
||||||
String randStr = String.valueOf(randomNumber);
|
String randStr = String.valueOf(randomNumber);
|
||||||
@ -110,8 +110,9 @@ public class Controller {
|
|||||||
|
|
||||||
String roomName = lecture.getTitle();
|
String roomName = lecture.getTitle();
|
||||||
String participantName = userService.getUserName(userId);
|
String participantName = userService.getUserName(userId);
|
||||||
|
System.out.println(participantName);
|
||||||
|
|
||||||
|
System.out.println(participantName+randStr);
|
||||||
AccessToken token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
|
AccessToken token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
|
||||||
token.setName(participantName+randStr);
|
token.setName(participantName+randStr);
|
||||||
token.setIdentity(participantName+randStr);
|
token.setIdentity(participantName+randStr);
|
||||||
@ -129,7 +130,7 @@ public class Controller {
|
|||||||
|
|
||||||
String roomName = lecture.getTitle();
|
String roomName = lecture.getTitle();
|
||||||
String participantName = userService.getUserName(userId);
|
String participantName = userService.getUserName(userId);
|
||||||
|
System.out.println(participantName);
|
||||||
|
|
||||||
AccessToken token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
|
AccessToken token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
|
||||||
token.setName(participantName+randStr);
|
token.setName(participantName+randStr);
|
||||||
|
Loading…
Reference in New Issue
Block a user