https://garden.io logo
Gitlab Runner not finding Garden Artifacts
c

curved-farmer-35040

01/12/2023, 9:19 PM
Hey Team! Odd question, has anyone had any issues with a GitLab runner not finding artifacts in the .garden folder? Running some unit tests in a container, and I am ssh'ing into my runner and can see the artifacts being copied into that folder as the test is running. Yet, GitLab is complaining it can't find them? Looked around at the GitLab docs, not sure if GitLab is ignoring the .garden folder because it is in .gitignore. I am running parent-child pipelines, and I can see that each garden command is also deleting the .garden folder which could be causing the timing issues. Very vague but I don't have much else to go on! Can see the artifacts myself, but for some reason, my GitLab runner cannot.
q

quaint-dress-831

01/16/2023, 6:25 PM
Your assumption appears to be correct but it is possible to disable this behavior according to this StackOverflow comment: https://stackoverflow.com/a/59778640
Let me know if that solves it for you. I will be going on vacation from tomorrow through the rest of the week but will try and delegate.
c

curved-farmer-35040

01/22/2023, 9:41 PM
@quaint-dress-831 thank for that link, I tried researching similar things but somehow missed that Stackoverflow comment, apologies, frustrating when you ask a question that google can answer. I'll let you know my results.
m

mammoth-flag-56137

01/23/2023, 1:25 AM
@curved-farmer-35040 are you using a shell runner?
c

curved-farmer-35040

01/23/2023, 1:35 AM
@mammoth-flag-56137 yeah I am
m

mammoth-flag-56137

01/23/2023, 1:35 AM
you'll likely have weird behaviour then
you may want to consider using some sort of container executor like dockermachine
c

curved-farmer-35040

01/24/2023, 10:03 PM
@mammoth-flag-56137 yeah I am getting that feeling, using the shell runner has just been incredibly inconsistent
q

quaint-dress-831

01/25/2023, 2:38 AM
@glamorous-caravan-26619, one of our specialists, was working on a GitLab CI example. I'm pinging him here and will ask on our internal Slack what's the status
m

mammoth-flag-56137

01/25/2023, 3:01 AM
we do all our deployments with garden on gitlab runners, happy to answer any questions
q

quaint-dress-831

01/26/2023, 10:00 AM
@mammoth-flag-56137 can you give some more info on what sort of weird behavior a user would encounter using a shell runner? How does your org do it? Can you give a code snippet?
m

mammoth-flag-56137

01/26/2023, 10:02 AM
Shell runners use the host operating system including binaries etc, and there's not perfect isolation of build dir
q

quaint-dress-831

01/26/2023, 10:03 AM
By host operating system you mean the host OS of the GitLab runner, right?
m

mammoth-flag-56137

01/26/2023, 10:03 AM
Yes
q

quaint-dress-831

01/26/2023, 10:04 AM
If the runner code (the YAML in your
.gitlab-ci.yml
) isn't proprietary I'd love to take a peek 👀
m

mammoth-flag-56137

01/26/2023, 10:05 AM
It's open source, see gitlab
Oh
q

quaint-dress-831

01/26/2023, 10:05 AM
Yeah sorry I didn't specify haha
m

mammoth-flag-56137

01/26/2023, 10:05 AM
I'll set a reminder for Monday to sanitise a copy of it
q

quaint-dress-831

01/26/2023, 10:06 AM
That would be amazing thank you!! 🙇‍♂️
What's your org just out of curiosity? And company size? (Not trying to sell you on Cloud just curious)
You can also DM me privately if you'd prefer to keep it outside public eyes
m
There's nothing about it ignoring stuff in gitignore
Might just be pathing .garden wrong or it's outside the build directory
SaaS company with about 20 employees, I'm the only one doing sre full time
@quaint-dress-831 this is non-functional but illustrative of how we do deploys with garden, i'm working on shifting to terraform 1.3
q

quaint-dress-831

01/30/2023, 9:55 PM
This is a WEALTH of knowledge, thank you @mammoth-flag-56137 🙏🏼
m

mammoth-flag-56137

01/30/2023, 10:39 PM
i cant claim credit, my former boss architected it, i just maintain it