-
Notifications
You must be signed in to change notification settings - Fork 8
Move python requirements to file #192
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
Conversation
/assign @eifrach @eifrach I have tested the container layer effects of changing
|
Containerfile
Outdated
# Copy application files to eco-ci-cd folder | ||
COPY . . | ||
|
||
# Install ansible and ansible-lint | ||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so to improve layring it's better to install the requirement before coping the code
this will insure that change of code will not re-run the requirement layer
# Copy application files to eco-ci-cd folder | |
COPY . . | |
# Install ansible and ansible-lint | |
RUN pip3 install --no-cache-dir -r requirements.txt | |
# Copy requirements file | |
COPY requirements.txt . | |
# Install ansible and ansible-lint | |
RUN pip3 install --no-cache-dir -r requirements.txt | |
# Copy application files to eco-ci-cd folder | |
COPY . . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eifrach good point 👍
do you like it better now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with a note
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eifrach The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
4b13df6
to
352b1d2
Compare
- update the list of packages: - del: `requests`, `paramiko` (installed as dependencies) - add: `jsonpatch` (missing package) - pip requirements in `pip.txt` - update `Containerfile`: - do `COPY` of `pip.txt` and `requirements.yml` before their install Signed-off-by: Maxim Kovgan <[email protected]>
352b1d2
to
9ce7355
Compare
/lgtm |
/unhold |
changes:
requests
,paramiko
(they get installed as dependencies)jsonpatch
(missing package)COPY
before pip installtests:
1. ensure
pip3 freeze
changes as expected:2. ensure adding a line in
requirements.txt
updates a layer (modifies the layer):as expected.