Rekovni
Rekovni

Reputation: 7394

GitLab CI use untracked files in repository

I'm evaluating GitLab CI/CD at the moment and trying to get the pipelines working, however am having a simple(?) problem.

I'm trying to automate the build process by automatically updating ISO images. However these ISO images are not tracked by the repository and ignored in a .gitignore file. But this leads to the issue of when I try run make that it can't find the ISO image...

I'm just using a simple .gitlab-ci.yml file:

stages:
  - build

build:
  stage: build
  script:
    - make

And when I try running this in the GitLab CI interface, it clones the repository (without the ISO images), and then fails, as there is no rule to that make target (as the ISO images are missing). I have tried moving the files into the "build" directory which GitLab creates, however that gives the error of saying it has failed to remove ...

How do I use the local repository rather than having GitLab clone the repository to a "build" location?

Upvotes: 1

Views: 1479

Answers (1)

Jakub Kania
Jakub Kania

Reputation: 16487

You can't use Gitlab CI with the files that are on your computer, at least you shouldn't. You could do it with an ssh-executor that will login to a machine that stores the iso files (and it should be a server rather than your development machine) or you could have the docker executor pull them from ftp/object store. For testing purposes you can run the builds locally on your machine.

Upvotes: 1

Related Questions