Our build pipeline is running in a Docker environment. Also the openapi schema is fetched in a previous stage and passed on to the next stage for generating the client bindings.
This makes two adjustments necessary I want to introduce with this PR:
Currently in the generate.sh script the client bindings are fetched from an running Pulp API. A new variable USE_LOCAL_API_JSON is introduced. If this variable is set, the script assumes that the openapi schema is already present in the working directory. If the variable is unset, the behavior of the script does not change.
When spawning up the openapi-generator-cli container the current working directory is mounted. If we run the generate.sh script inside a docker container we have to mount the working directory on the parent container and pass it to the sibling container (i.e. the openapi-generator-cli container) with the --volumes-from option. A new variable PARENT_CONTAINER_ID is introduced. If this variable is set, the volumes mounted for the openapi-generator-cli container are mounted using the --volumes-from option. If the variable is unset, the behavior of the script does not change.
Besides that the first commit adds a section to the Readme about the usage of the PULP_API variable.
Our build pipeline is running in a Docker environment. Also the openapi schema is fetched in a previous stage and passed on to the next stage for generating the client bindings. This makes two adjustments necessary I want to introduce with this PR:
generate.sh
script the client bindings are fetched from an running Pulp API. A new variableUSE_LOCAL_API_JSON
is introduced. If this variable is set, the script assumes that the openapi schema is already present in the working directory. If the variable is unset, the behavior of the script does not change.openapi-generator-cli
container the current working directory is mounted. If we run thegenerate.sh
script inside a docker container we have to mount the working directory on the parent container and pass it to the sibling container (i.e. theopenapi-generator-cli
container) with the--volumes-from
option. A new variablePARENT_CONTAINER_ID
is introduced. If this variable is set, the volumes mounted for theopenapi-generator-cli
container are mounted using the--volumes-from
option. If the variable is unset, the behavior of the script does not change.Besides that the first commit adds a section to the Readme about the usage of the
PULP_API
variable.