Here is my .gitlab-ci.yml
stages:
- build
- unit_test_1
- unit_test_2
- perf_test
job1:
stage: build
script:
- bash build.sh
allow_failure: true
job2:
stage: unit_test_1
script:
- bash ./all/deployment/testframwork/unit_test_1.sh
allow_failure: true
Here build.sh
creates a build and stores all binary in build directory. But after completion of job1 this directory is deleting.
But I am using that directory for running my 2nd job.
How can i achieve this ?
Artifacts expire after 30 days by default. You can define a custom expiration time. The latest artifacts do not expire if keep latest artifacts is enabled.
One way to allow more jobs to run simultaneously is to simply register more runners. Each installation of GitLab Runner can register multiple distinct runner instances. They operate independently of each other and don't all need to refer to the same coordinating server.
Fortunately, http://gitlab.com seems to be sharing only docker runners. docker runners are generally safe* because every build runs in a new container, so there's nothing to worry.
Use build artifacts. You should use expire_in with the artifacts so the build dir is not stored in your gitlab forever. To control what dir gets what artifacts use dependencies
job1:
artifacts:
path: build
expire_in: 1 week
job2:
dependencies:
-job1
job3:
dependencies: []
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With