Compare commits

...

2 Commits

Author SHA1 Message Date
Teriuihi 8b6e65bad1 Add Jenkinsfile for CI/CD pipeline
This Jenkinsfile sets up a simple CI/CD pipeline with three stages: 'Gradle' for building the project, 'Archive' for saving build artifacts, and 'discord' for sending build notifications. The pipeline uses npm for package management and build steps, and integrates with Discord for build result notifications.
2024-08-04 23:07:12 +02:00
Teriuihi 97ba9cc087 Update build settings and homepage URL for forms app
Changed the homepage URL in package.json to a relative path and adjusted the build command's PUBLIC_URL. Also updated caniuse-lite version in package-lock.json and modified BrowserRouter basename in App.tsx.
2024-08-04 22:57:18 +02:00
4 changed files with 30 additions and 9 deletions

21
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,21 @@
pipeline {
agent any
stages {
stage('Gradle') {
steps {
sh 'npm install'
sh 'npm run build'
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: 'build/**', followSymlinks: false
}
}
stage('discord') {
steps {
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
}
}
}
}

12
package-lock.json generated
View File

@ -6285,9 +6285,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001574",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz",
"integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==",
"version": "1.0.30001647",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001647.tgz",
"integrity": "sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg==",
"funding": [
{
"type": "opencollective",
@ -25106,9 +25106,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001574",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz",
"integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg=="
"version": "1.0.30001647",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001647.tgz",
"integrity": "sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg=="
},
"case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",

View File

@ -1,5 +1,5 @@
{
"homepage": "https://alttd.com/forms",
"homepage": ".",
"name": "forms",
"version": "0.1.0",
"private": true,
@ -22,7 +22,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "set \"PUBLIC_URL=/forms\" && react-scripts build",
"build": "set \"PUBLIC_URL=/\" && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},

View File

@ -12,7 +12,7 @@ function App() {
return (
<div className="app-container">
<Header/>
<BrowserRouter basename="/forms">
<BrowserRouter basename="/">
<Routes>
<Route path="/" element={<Home/>}/>
<Route path="/contact" element={<ContactForm/>}/>