在没有Jenkinsfile的情况下在詹金斯中与Docker并行运行赛普拉斯

时间:2020-05-07 19:18:12

标签: docker jenkins jenkins-pipeline pom.xml cypress

我目前正在使用docker构建我的web应用并运行cypress。我的应用程序不使用Jenkinsfile,而是使用pom.xml文件。从高层次看,像这样:

// JENKINS grabs my pom.xml file and executes it
// pom.xml executes a bash script that runs the 2 commands below to build and run my docker container

// shell script code
docker build -t cypress:myApp . // COPIES APP INTO CONTAINER
docker run -i cypress:myApp // ENTRYPOINT calls a shell script which builds the app

// Inside the container the following commands are run
cd <path to app directory>
npm i
npm run build
npm run cypress

// If installing deps work and tests pass, i use volumes to get production assets out
// of my container and back on the host machine for my pox.xml to grab and deploy

如果我不使用Jenkinsfile(使用pom.xml),有没有办法在不同的从属之间协调我的测试。我可以在容器内这样做吗?

Cypress github在这里有一个示例设置:https://github.com/cypress-io/cypress-example-kitchensink/blob/master/Jenkinsfile使用Jenkinsfile和parallel标志。但是由于我没有使用Jenkinsfile,因此此设置不适用于我。我有其他选择吗?谢谢!

0 个答案:

没有答案