Build issue with kaniko (OD-1880)
Closed
Sagar Bud opened 2 weeks ago

Hello @robin,

I have one angular project. In this project I have run build.sh file to create dist directory and use this directory to copy data while build the docker image. Is there any option to run the build.sh file before build the docker file in Build Docker Image (Kaniko) option?

If i run the build.sh file(it will generate dist directory as a Artifact) before the Kaniko build stage. how we can pass this Artifact in Kaniko build stage? Because in Kaniko stage we can run only build command and i want to run the build.sh file before build command.

Robin Shen commented 2 weeks ago

You may run build.sh via a command step before the Kaniko step. As long as the generated dist directory is placed under job workspace, you can access it from Kaniko step via build context property.

Sagar Bud commented 2 weeks ago

Hello @robin

Thank you for the update.

I will check it and update you. Meanwhile, is Onedev provide deploy key feature like gitlab? if yes, kindly provide the doc for the same. You can refer the below URL for deploy key feature in GitLab. https://docs.gitlab.com/ee/user/project/deploy_keys/

Thanks

Robin Shen commented 2 weeks ago

No deploy key currently. You may use access token instead.

Robin Shen changed state to 'Closed' 2 weeks ago
Previous Value Current Value
Open
Closed
Sagar Bud changed state to 'Open' 1 week ago
Previous Value Current Value
Closed
Open
Sagar Bud commented 1 week ago

Hello @robin

Thank you for the update.

We're using access token while clone the private repo but it give the error(remote: You do not have permission to pull from this project). We have already assigned project owner permission to the user.

We're cloning the private repo while building the docker file using docker kaniko (kubernetes executor). Also, I have checked same docker file is running with docker and shell executor. Is there any user identities we need pass or do you have any solution for the same?

Robin Shen changed state to 'Closed' 7 days ago
Previous Value Current Value
Open
Closed
Robin Shen commented 7 days ago

This issue duplicates OD-1892

issue 1 of 1
Type
Question
Priority
Major
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-1880
Please wait...
Page is in error, reload to recover