This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
public class ArchivoApiController { | |
@Autowired | |
private FileCreator fileCreator; | |
@GetMapping("/report") | |
public ResponseEntity<byte[]> generateReport(String filename) { | |
HttpHeaders header = new HttpHeaders(); | |
header.setContentType("application/octet-stream"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.poi.xssf.usermodel.XSSFSheet; | |
import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |
import org.springframework.stereotype.Component; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
def mvnHome | |
stage('Preparation') { | |
// Get some code from a Gitlab repository | |
git 'https://gitlab.com/joedayz/ContinuousIntegrationAndContinuousDeliveryApp.git' | |
mvnHome = tool 'M2' | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:latest | |
EXPOSE 8090 | |
ADD app.jar myApp.jar | |
ENTRYPOINT ["java","-jar","myApp.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
echo "Deploying app.jar to docker folder" | |
packageName=`ls target/continuousintegrationandcontinuousdeliveryapp*.jar` | |
versionid=`echo $packageName | awk -F "-" '{ print $2}'` | |
versionname=`echo $packageName | awk -F "-" '{ print $3}' | awk -F "." '{ print $1}'` | |
version=`echo $versionid-$versionname` | |
echo "version: $version" | |
cp -r $packageName deployment/app.jar | |
dockerImageName=onedaywillcome/myapp | |
dockerpid=`docker ps -a | grep $dockerImageName | grep "Up" | awk -F " " '{ print $1 }'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
group = "pe.com.mycompany.psi" | |
ext.providerName = "arnoldgamarram" | |
ext.providerId = "ws.arnoldgamarram" | |
ext.commonsIoVersion = "2.4" | |
ext.commonsLangVersion = "3.4" | |
ext.javaVersion = "1.8" | |
ext.janinoVersion = "2.7.8" | |
ext.jeeApiVersion = "6.0" | |
ext.jtopenVersion = "8.6" |