Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor permissions with dump plugin #53

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions suggestion-enas/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,26 @@ parts:
- requirements.txt

suggestion-enas:
plugin: nil
plugin: dump
source: https://github.com/kubeflow/katib.git
source-tag: "v0.17.0"
source-depth: 1
source-type: git
override-build: |
# Move files to dedicated location
mkdir -p ${CRAFT_PART_INSTALL}/opt/katib/pkg
mkdir -p ${CRAFT_PART_INSTALL}/opt/katib/cmd/suggestion/nas/enas/v1beta1
cp -r pkg/* ${CRAFT_PART_INSTALL}/opt/katib/pkg
cp -r cmd/suggestion/nas/enas/v1beta1/* ${CRAFT_PART_INSTALL}/opt/katib/cmd/suggestion/nas/enas/v1beta1

# Change permissions on the folder for the _daemon_ user
chown -R 584792:584792 ${CRAFT_PART_INSTALL}/opt/katib/cmd/suggestion/nas/enas/v1beta1
chmod -R 755 ${CRAFT_PART_INSTALL}/opt/katib/cmd/suggestion/nas/enas/v1beta1
organize:
pkg: opt/katib/pkg
cmd/suggestion/nas/enas/v1beta1/main.py: opt/katib/cmd/suggestion/nas/enas/v1beta1/main.py
cmd/suggestion/nas/enas/v1beta1/requirements.txt: opt/katib/cmd/suggestion/nas/enas/v1beta1/requirements.txt
stage:
- opt/katib/pkg
- opt/katib/cmd/suggestion/nas/enas/v1beta1/main.py
- opt/katib/cmd/suggestion/nas/enas/v1beta1/requirements.txt
permissions:
- path: opt/katib
owner: 584792
group: 584792
- path: opt/katib/*
owner: 584792
group: 584792

security-team-requirement:
plugin: nil
Expand Down
Loading