update jenkinsfile
This commit is contained in:
@@ -108,9 +108,12 @@ export const ClientNavbar: FC<{
|
||||
item => !('href' in item)
|
||||
).map(item => item.title)
|
||||
)
|
||||
|
||||
console.log('existingCourseNames', 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)))
|
||||
|
||||
console.log('filteredTopLevelNavbarItems', filteredTopLevelNavbarItems)
|
||||
// or even better, remove all old doc page generated links
|
||||
// this don't make sense because it will destroy the navbar structure highlight for children pages
|
||||
// const filteredTopLevelNavbarItems = topLevelNavbarItems.filter(item => !('firstChildRoute' in item))
|
||||
|
||||
@@ -60,41 +60,6 @@ export default {
|
||||
type: 'page',
|
||||
href: '/Math401'
|
||||
},
|
||||
CSE332S_link: {
|
||||
title: 'CSE332S',
|
||||
type: 'page',
|
||||
href: '/CSE332S'
|
||||
},
|
||||
CSE347_link: {
|
||||
title: 'CSE347',
|
||||
type: 'page',
|
||||
href: '/CSE347'
|
||||
},
|
||||
CSE442T_link: {
|
||||
title: 'CSE442T',
|
||||
type: 'page',
|
||||
href: '/CSE442T'
|
||||
},
|
||||
CSE5313_link: {
|
||||
title: 'CSE5313',
|
||||
type: 'page',
|
||||
href: '/CSE5313'
|
||||
},
|
||||
CSE510_link: {
|
||||
title: 'CSE510',
|
||||
type: 'page',
|
||||
href: '/CSE510'
|
||||
},
|
||||
CSE559A_link: {
|
||||
title: 'CSE559A',
|
||||
type: 'page',
|
||||
href: '/CSE559A'
|
||||
},
|
||||
CSE5519_link: {
|
||||
title: 'CSE5519',
|
||||
type: 'page',
|
||||
href: '/CSE5519'
|
||||
},
|
||||
/* Math Courses Start */
|
||||
Math3200: {
|
||||
title: 'Math3200',
|
||||
@@ -146,6 +111,41 @@ export default {
|
||||
}
|
||||
},
|
||||
/* Math Courses End */
|
||||
CSE332S_link: {
|
||||
title: 'CSE332S',
|
||||
type: 'page',
|
||||
href: '/CSE332S'
|
||||
},
|
||||
CSE347_link: {
|
||||
title: 'CSE347',
|
||||
type: 'page',
|
||||
href: '/CSE347'
|
||||
},
|
||||
CSE442T_link: {
|
||||
title: 'CSE442T',
|
||||
type: 'page',
|
||||
href: '/CSE442T'
|
||||
},
|
||||
CSE5313_link: {
|
||||
title: 'CSE5313',
|
||||
type: 'page',
|
||||
href: '/CSE5313'
|
||||
},
|
||||
CSE510_link: {
|
||||
title: 'CSE510',
|
||||
type: 'page',
|
||||
href: '/CSE510'
|
||||
},
|
||||
CSE559A_link: {
|
||||
title: 'CSE559A',
|
||||
type: 'page',
|
||||
href: '/CSE559A'
|
||||
},
|
||||
CSE5519_link: {
|
||||
title: 'CSE5519',
|
||||
type: 'page',
|
||||
href: '/CSE5519'
|
||||
},
|
||||
/* CSE Courses Start */
|
||||
CSE332S: {
|
||||
title: 'CSE332S',
|
||||
|
||||
76
docker/Jenkinsfile
vendored
Normal file
76
docker/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- 13003:80
|
||||
- 13000:80
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user