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

Won't work without having requirements.txt in the root of the repo? #23

Closed
moshevayner opened this issue Jun 10, 2020 · 2 comments
Closed
Assignees

Comments

@moshevayner
Copy link

Hey there!
We're trying to use structor in order to add versioning to Kubernetes/kops docs site (https://kops.sigs.k8s.io).
For that, I've downloaded the file and ran it as following:

$ sudo ./structor -o kubernetes -r kops --dockerfile-url=https://raw.githubusercontent.com/kubernetes/kops/master/images/mkdocs/Dockerfile --menu.js-url="https://raw.githubusercontent.com/containous/structor/master/traefik-menu.js.gotmpl" --rqts-url=https://raw.githubusercontent.com/kubernetes/kops/master/images/mkdocs/requirements.txt --exp-branch=master --debug

However, it failed with the following output:

2020/06/09 22:53:56 Run Structor command with config : &{Owner:kubernetes RepositoryName:kops Debug:true DockerfileURL:https://raw.githubusercontent.com/kubernetes/kops/master/images/mkdocs/Dockerfile DockerfileName:docs.Dockerfile ExperimentalBranchName:master ExcludedBranches:[] DockerImageName:doc-site Menu:0xc00006eac0 RequirementsURL:https://raw.githubusercontent.com/kubernetes/kops/master/images/mkdocs/requirements.txt NoCache:false ForceEditionURI:false}
2020/06/09 22:53:56 Temp directory: /tmp/structor663483782
2020/06/09 22:53:56 Latest tag: v1.17.0
2020/06/09 22:53:56 git branch --remotes --list origin\/v*
2020/06/09 22:53:56 Generating doc for version master
2020/06/09 22:53:56 git worktree add /tmp/structor663483782/master origin/master
2020/06/09 22:53:59 Found mkdocs.yml for building documentation in /tmp/structor663483782/master.
2020/06/09 22:53:59 git worktree prune
Error: stat /tmp/structor663483782/master/requirements.txt: no such file or directory
Usage:
  structor [flags]
  structor [command]

Available Commands:
  help        Help about any command
  version     Display version

Flags:
      --debug                    Debug mode.
      --dockerfile-name string   Search and use this Dockerfile in the repository (in './docs/' or in './') for building documentation. (default "docs.Dockerfile")
  -d, --dockerfile-url string    Use this Dockerfile when --dockerfile-name is not found. Can be a file path. [required]
      --exclude strings          Exclude branches from the documentation generation.
      --exp-branch string        Build a branch as experimental.
      --force-edit-url           Add a dedicated edition URL for each version.
  -h, --help                     help for structor
      --image-name string        Docker image name. (default "doc-site")
      --menu.css-file string     File path of the template of the CSS file use for the multi version menu.
      --menu.css-url string      URL of the template of the CSS file use for the multi version menu.
      --menu.js-file string      File path of the template of the JS file use for the multi version menu.
      --menu.js-url string       URL of the template of the JS file use for the multi version menu.
      --no-cache                 Set to 'true' to disable the Docker build cache.
  -o, --owner string             Repository owner. [required]
  -r, --repo-name string         Repository name. [required]
      --rqts-url string          Use this requirements.txt to merge with the current requirements.txt. Can be a file path.
      --version                  version for structor

Use "structor [command] --help" for more information about a command.

stat /tmp/structor663483782/master/requirements.txt: no such file or directory

It seems like even though I used --rqts-url and pointed it to the path of our mkdocs image, it still tries to locate it in the root of the repo and fails.

Is there any option to override that requirement?

Thanks much!

@ldez
Copy link
Contributor

ldez commented Jun 10, 2020

Hello,

currently --rqts-url is used to force some version in the "basic" requirements.txt.

      --rqts-url string          Use this requirements.txt to merge with the current requirements.txt. Can be a file path.

I need to think about a way to handle the case when the "basic" requirements.txt is missing.

@ldez ldez assigned ldez and mmatur Jun 10, 2020
@moshevayner
Copy link
Author

Thanks @ldez !
Would it make sense to change the "hard" requirement for the basic file and just make sure that all the necessary modules exist in the one provided through --rqts-url?

@moshevayner moshevayner closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2024
@mmatur mmatur removed their assignment Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants