Closed WladyX closed 9 months ago
Includes from my self hosted gitlab gets downloaded just fine.
Can you show the contents of your packer.yml?
cat packer.yml
include:
- helper/runonly.yml
- helper/tags_cc.yml
- helper/notifier.yml
- helper/cleanup_jobs.yml
- helper/stages.yml
- packer/vars.yml
- packer/validate.yml
- packer/build.yml
is there any verbose/debug flag i could use to get more logs? thank you for your support!
I've replaced the above suspecting maybe there is an issue with include with the following:
cat packer.yml
build-job:
stage: build
script:
- echo "Hello, $GITLAB_USER_LOGIN!"
test-job1:
stage: test
script:
- echo "This job tests something"
test-job2:
stage: test
script:
- echo "This job tests something, but takes more time than test-job1."
- echo "After the echo commands complete, it runs the sleep command for 20 seconds"
- echo "which simulates a test that runs 20 seconds longer than test-job1"
- sleep 20
deploy-prod:
stage: deploy
script:
- echo "This job deploys something from the $CI_COMMIT_BRANCH branch."
environment: production
pushed to the pipelines repo, did not make any difference.
Ok, i found the issue, i use a custom ssh port and i have specified that in ~/.ssh/config:
Host gitlab.mydomain.com
Port 2222
looks like gitlab-ci-local is ignoring this. i modified the remote like this:
/packerox $ cat .git/config|grep url -B1
[remote "origin"]
#url = git@gitlab.mydomain.com:wxs/sched/packerox.git
url = git@gitlab.mydomain.com:2222/wxs/sched/packerox.git
and gitlab-ci-local started to work.
So question becomes now: is it possible to make gitlab-ci-local respect ~/.ssh/config
in the same way that git does ?
We are going to rely solely on git remote -v for getting include URLs.
But I will investigate, why you werent seeing any real error messages printed.
Don't wanna snoop around in peoples ssh dirs
thing is that with the url modified git does not work for some reason, git-ci-local works, but git does not:
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found or you don't have permission to view it.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
can i override the remote only for gitlab-ci-local?
Not that I know of.
A --remote-gitlab-url
cli option feature request will be pretty easy to implement.
Cool, should i create an issue for that, or you'll keep it in mind?
In my case i think a --remote-port
would be more useful as i could add it to the zsh alias as it is common for all projects. For --remote-gitlab-url
i would need to specify for each project, but any of them would be very useful for me.
Thank you!
Make a feature request issue, for what ever feature you would like 🤣
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior i would expect the list of jobs
Host information MacOS 14.2 gitlab-ci-local 4.46.0
Containerd binary OrbStack
Additional context
no errror reported but the folders are empty:
my remote is:
i guess this is expected because the include is not downloaded.
any ideeas on what i am doing wrong or what i could try? thank you