40 lines
		
	
	
		
			No EOL
		
	
	
		
			848 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			No EOL
		
	
	
		
			848 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
| node {
 | |
|     def app
 | |
| 
 | |
|     stage('Clone repository') {
 | |
|         // Let's make sure we have the repository cloned to our workspace
 | |
|         checkout scm
 | |
|     }
 | |
| 
 | |
|     stage('Install dependencies') {
 | |
|         // Install dependencies for build later
 | |
|         sh 'composer update'
 | |
|         sh 'yarn install'
 | |
|     }
 | |
| 
 | |
|     stage('Composer Vulnr test') {
 | |
|         snykSecurity(
 | |
|             snykInstallation: 'snyk-local',
 | |
|             targetFile: 'composer.lock',
 | |
|         )
 | |
|     }
 | |
| 
 | |
|     stage('npm vulnr test') {
 | |
|         snykSecurity(
 | |
|             snykInstallation: 'snyk-local',
 | |
|             targetFile: 'package.json',
 | |
|         )
 | |
|     }
 | |
| 
 | |
|     stage('Deploy staging') {
 | |
|         // Deploy to staging host
 | |
|         sh 'vendor/bin/dep deploy staging'
 | |
|     }
 | |
| 
 | |
|     /*
 | |
|     stage('Test staging') {
 | |
|         // Run phpunit tests on staging host
 | |
|         bin/phpunit COMMAND
 | |
|     }
 | |
|     */
 | |
| } |