OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Gitlab CI, artefacts

  • Thread starter Thread starter IzaeDA
  • Start date Start date
I

IzaeDA

Guest
I am doing my first CI project and I have recently got confused about artefacts...

Say I have config with next jobs:

Code:
cleanup_build:
  tags:
    - block_autotest
  stage: cleanup
  script:
    - Powershell $env:P7_TESTING_INSTALLATION_PATH\client\p7batch.exe --log-level=error --run $env:JOBS_FOLDER_PATH\clear.py

install_block:
  tags:
    - block_autotest
  stage: installation
  script:
    - Powershell $env:P7_TESTING_INSTALLATION_PATH\client\p7batch.exe --log-level=error --run $env:JOBS_FOLDER_PATH\setup_block.py

"install_block" job is not to be done if the job "cleanup_build" has failed. So, I have to create some kind of artifact after "cleanup_build" has succeeded so this artefact is visible at the stage "installation" for the job "install_block". At the job "install_block" I could use python to address the artifact and ensure the one exists.

Also I have created a speciad folder for artifacts:

Code:
ARTEFACTS_FOLDER_PATH: $CI_PROJECT_DIR\autotest\artefacts

So within the job "cleanup_build" I create a file "clean" at the artefact folder. But it seems that CI reloads repository at project directory, because if I leave just "cleanup_build" job (delete "install_block" from yml) I can see the "clean" file at the project, but if I leave both jobs this file dissapears before "install_block" job begins...
<p>I am doing my first CI project and I have recently got confused about artefacts...</p>
<p>Say I have config with next jobs:</p>
<pre><code>cleanup_build:
tags:
- block_autotest
stage: cleanup
script:
- Powershell $env:P7_TESTING_INSTALLATION_PATH\client\p7batch.exe --log-level=error --run $env:JOBS_FOLDER_PATH\clear.py

install_block:
tags:
- block_autotest
stage: installation
script:
- Powershell $env:P7_TESTING_INSTALLATION_PATH\client\p7batch.exe --log-level=error --run $env:JOBS_FOLDER_PATH\setup_block.py
</code></pre>
<p>"install_block" job is not to be done if the job "cleanup_build" has failed. So, I have to create some kind of artifact after "cleanup_build" has succeeded so this artefact is visible at the stage "installation" for the job "install_block". At the job "install_block" I could use python to address the artifact and ensure the one exists.</p>
<p>Also I have created a speciad folder for artifacts:</p>
<pre><code>ARTEFACTS_FOLDER_PATH: $CI_PROJECT_DIR\autotest\artefacts
</code></pre>
<p>So within the job "cleanup_build" I create a file "clean" at the artefact folder. But it seems that CI reloads repository at project directory, because if I leave just "cleanup_build" job (delete "install_block" from yml) I can see the "clean" file at the project, but if I leave both jobs this file dissapears before "install_block" job begins...</p>
 

Latest posts

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top