check passed.

This commit is contained in:
Zheyuan Wu
2025-10-25 01:18:03 -05:00
parent f89b3cb70d
commit e4995c8118
4 changed files with 94 additions and 3 deletions

View File

@@ -105,9 +105,11 @@ export const ClientNavbar: FC<{
// filter out titles for elements in topLevelNavbarItems with non empty route
const existingCourseNames = new Set(
topLevelNavbarItems.filter(
item => !('href' in item) && item.route !== ''
item => !('href' in item)
).map(item => item.title)
)
console.log(existingCourseNames)
// filter out elements in topLevelNavbarItems with url but have title in existingCourseNames
const filteredTopLevelNavbarItems = topLevelNavbarItems.filter(item => !('href' in item && existingCourseNames.has(item.title)))
@@ -116,7 +118,7 @@ export const ClientNavbar: FC<{
const items = filteredTopLevelNavbarItems
console.log(topLevelNavbarItems)
console.log(filteredTopLevelNavbarItems)
const themeConfig = useThemeConfig()
const pathname = useFSRoute()

View File

@@ -34,6 +34,11 @@ export default {
type: 'page',
href: '/Math4111',
},
CSE559A_link: {
title: 'CSE 559A',
type: 'page',
href: '/CSE559A',
},
/* Math Courses End */
Math4201: {
title: 'Math 4201',

84
docker/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,84 @@
pipeline {
environment {
registry = "trance0/notenextra"
version = "1.2"
NODE_OPTIONS = "--max-old-space-size=8192"
// NEXT_SEARCH_ALGOLIA_APP_ID = "${NEXT_SEARCH_ALGOLIA_APP_ID}"
// NEXT_SEARCH_ALGOLIA_API_KEY = "${NEXT_SEARCH_ALGOLIA_API_KEY}"
// NEXT_SEARCH_ALGOLIA_INDEX_NAME = "${NEXT_SEARCH_ALGOLIA_INDEX_NAME}"
}
agent any
stages {
stage('Cleanup Workspace') {
steps {
// Using Workspace Cleanup Plugin (if installed and configured)
cleanWs()
}
}
stage('Checkout') {
steps {
checkout([
$class: 'GitSCM',
branches: [[ name: '*/main' ]],
userRemoteConfigs: [[
url: 'https://github.com/Trance-0/NoteNextra',
]]
])
}
}
stage('Build and test'){
parallel {
stage('Build Math') {
steps {
script {
echo "Building docker image ${registry}-math:${version}.${env.BUILD_ID}"
def customImage = docker.build("${registry}-math:v${version}.${env.BUILD_ID}",
"-f ./docker/math/Dockerfile",
"--no-cache --progress=plain",
"-t notenextra-math:latest"
)
echo "Logging in to docker hub"
// docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-creds') {
// echo "Pushing docker image ${registry}:v${version}.${env.BUILD_ID}"
// customImage.push()
// }
echo "skipping push due to conflicted servers"
}
}
}
stage('Build CSE') {
steps {
script {
echo "Building docker image ${registry}-cse:${version}.${env.BUILD_ID}"
def customImage = docker.build("${registry}-cse:v${version}.${env.BUILD_ID}",
"-f ./docker/cse/Dockerfile",
"--no-cache --progress=plain",
"-t notenextra-cse:latest"
)
echo "Logging in to docker hub"
// docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-creds') {
// echo "Pushing docker image ${registry}:v${version}.${env.BUILD_ID}"
// customImage.push()
// }
echo "skipping push due to conflicted servers"
}
}
}
}
}
stage('Deploy') {
steps {
script {
echo "Stopping existing container"
sh 'docker compose -f ./docker/docker-compose.yaml down'
echo "Removing existing container"
sh 'docker compose -f ./docker/docker-compose.yaml rm -f'
echo "Deploying docker image ${registry}-math:${version}.${env.BUILD_ID} and ${registry}-cse:${version}.${env.BUILD_ID} with docker compose"
sh 'docker compose -f ./docker/docker-compose.yaml up -d'
}
}
}
}
}

View File

@@ -24,7 +24,7 @@ services:
nginx:
image: nginx:latest
ports:
- 13003:80
- 13000:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on: