diff --git a/Jenkinsfile b/Jenkinsfile index d8a1fcc4..204a4dae 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,30 @@ pipeline { } stages { + stage('Fetch Cache') { + options { + cache(caches: [ + arbitraryFileCache( + cacheName: 'Next', + cacheValidityDecidingFile: '', + excludes: '', + includes: '**/*', + path: "./.nx/cache" + ), + arbitraryFileCache( + cacheName: 'NodeJS', // Added a cache name for better clarity + cacheValidityDecidingFile: '', + excludes: '', + includes: '**/*', + path: "./node_modules" // Use the HOME environment variable for home directory + ) + ], defaultBranch: 'dev', maxCacheSize: 256000, skipSave: true) + } + steps { + echo 'Start fetching Cache.' + } + } + stage('Checkout Repository') { steps { checkout scm @@ -38,20 +62,46 @@ pipeline { sh 'npm run build 2>&1 | tee build_report.log' // Captures build output } } + + stage('Save Cache') { + options { + cache(caches: [ + arbitraryFileCache( + cacheName: 'Next', + cacheValidityDecidingFile: '', + excludes: '', + includes: '**/*', + path: "./.nx/cache" + ), + arbitraryFileCache( + cacheName: 'NodeJS', // Added a cache name for better clarity + cacheValidityDecidingFile: '', + excludes: '', + includes: '**/*', + path: "./node_modules" // Use the HOME environment variable for home directory + ) + ], defaultBranch: 'dev', maxCacheSize: 256000, skipRestore: true) + } + steps { + echo 'Start saving Cache.' + } + } } post { always { junit '**/reports/junit.xml' archiveArtifacts artifacts: 'reports/**', fingerprint: true - archiveArtifacts artifacts: 'build_report.log', fingerprint: true + archiveArtifacts artifacts: 'build_report.log', fingerprint: true cleanWs(cleanWhenNotBuilt: false, notFailBuild: true) } success { echo 'Build completed successfully!' + } failure { echo 'Build failed!' + } } } diff --git a/README.md b/README.md index 36ec342f..7e5f30b6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- + Postiz Logo diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..cbec0de0 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +v1.38.1