website

The files for mattfehrenbach.xyz, a fork of a template.
git clone git://git.mattfehrenbach.xyz/website.git
Log | Files | Refs | LICENSE

Jenkinsfile (1081B)


      1 pipeline {
      2   agent any
      3   stages {
      4     stage('Build') {
      5       steps {
      6         fileOperations([folderCreateOperation('build'), fileCopyOperation(excludes: '', flattenFiles: false, includes: 'index.html', renameFiles: false, sourceCaptureExpression: '', targetLocation: 'build', targetNameExpression: ''), folderCopyOperation(destinationFolderPath: 'build/assets', sourceFolderPath: 'assets'), folderCopyOperation(destinationFolderPath: 'build/images', sourceFolderPath: 'images'), fileZipOperation(folderPath: 'build', outputFolderPath: '')])
      7         archiveArtifacts(artifacts: 'build.zip', fingerprint: true, onlyIfSuccessful: true)
      8       }
      9     }
     10 
     11     stage('Deploy') {
     12       steps {
     13         sh 'whoami'
     14         fileOperations([folderCreateOperation('staging'), fileUnZipOperation(filePath: 'build.zip', targetLocation: 'staging')])
     15         sh 'rm -r /var/www/mattfehrenbach/*'
     16         fileOperations([folderCopyOperation(destinationFolderPath: '/var/www/mattfehrenbach', sourceFolderPath: 'staging/build')])
     17       }
     18     }
     19 
     20   }
     21   post {
     22     success {
     23       deleteDir()
     24     }
     25 
     26   }
     27 }