The main website of PHENOM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Jenkinsfile 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. pipeline {
  2. agent {
  3. docker {
  4. image 'node:latest'
  5. args '-v $HOME/.npm:/root/.npm -v $HOME/.cache:/root/.cache'
  6. }
  7. }
  8. stages {
  9. stage('Build') {
  10. environment { HOME="." }
  11. steps {
  12. sh 'npm ci'
  13. sh 'npm run build'
  14. }
  15. }
  16. stage('Archive') {
  17. steps {
  18. archiveArtifacts '.nuxt/**, static/**, assets/**, package.json, package-lock.json'
  19. }
  20. }
  21. stage('Deploy') {
  22. steps {
  23. sshPublisher(publishers: [sshPublisherDesc(configName: 'phenom@phenomic.net', transfers: [sshTransfer(cleanRemote: true, excludes: '', execCommand: '''cd ./PHENOMIC.net
  24. npm ci
  25. pm2 restart phenomic''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'PHENOMIC.net', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '.nuxt/**, static/**, assets/**, package.json, package-lock.json')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
  26. }
  27. }
  28. }
  29. post {
  30. always {
  31. cleanWs()
  32. }
  33. }
  34. }