简体   繁体   中英

How do I add a timer to my gitlab-ci job to make it stop within 1 minute in gitlab-ci.yml

I have a spring boot application and I am configuring gitlab-ci.yml to run my integration tests. In order to achieve that I need my spring boot app running.

I am able to bring up my app using spring-boot-maven-plugin but the job I configured does not complete since the app is running and times out at 1 hour.

Is there a way to end a gitlab-ci job after a minute or two?

here is my gitlab-ci.yml config

server_start:
  stage: test
  script:
    - mvn spring-boot:start

Are there other examples of how to configure the gitlab-ci.yml to check if the server is up?

Timeout per job is currently unavailable. See open issue

You can define a 'global' timeout :

Settings > CI/CD > General pipelines settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM