-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into topic/chandan/logging_config
- Loading branch information
Showing
150 changed files
with
4,397 additions
and
1,519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This .gitignore is a placeholder so that we can store .cache/ in github. | ||
# We are including a pre-created .cache in Github so that when | ||
# we run docker-compose in WSL2 during dev linting, WSL2 does not attempt | ||
# to create .cache/ with root as the owner. The contents of .cache | ||
# should never be pushed back upstream to the main cartography repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
build/ | ||
*.egg-info/ | ||
venv/ | ||
.git/ | ||
.compose | ||
.cache | ||
.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file is for docker-compose dev use so that mounting | ||
# Neo4j volumes doesn't fail with permissions errors. | ||
GID=1000 | ||
UID=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ build/ | |
.compose | ||
generated | ||
dist/ | ||
.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,21 @@ | ||
FROM ubuntu:focal | ||
# This is a thin distribution of the cartography software. | ||
# It is published at ghcr.io. | ||
FROM python:3.10-slim | ||
|
||
WORKDIR /srv/cartography | ||
# the UID and GID to run cartography as | ||
# (https://github.com/hexops/dockerfile#do-not-use-a-uid-below-10000). | ||
ARG uid=10001 | ||
ARG gid=10001 | ||
|
||
ENV PATH=/venv/bin:$PATH | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.10-dev python3-pip python3-setuptools openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev curl make git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
WORKDIR /var/cartography | ||
ENV HOME=/var/cartography | ||
|
||
# Installs pip supported by python3.10 | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.10 get-pip.py | ||
RUN pip install cartography | ||
|
||
# Create cartography user so that we can give it ownership of the directory later for unit&integ tests | ||
RUN groupadd cartography && \ | ||
useradd -s /bin/bash -d /home/cartography -m -g cartography cartography | ||
USER ${uid}:${gid} | ||
|
||
# Installs python dependencies | ||
COPY setup.py test-requirements.txt ./ | ||
RUN pip install -e . && \ | ||
pip install -r test-requirements.txt && \ | ||
# Grant write access to the directory for unit and integration test coverage files | ||
chmod -R a+w /srv/cartography | ||
# verify that the binary at least runs | ||
RUN cartography -h | ||
|
||
# Install cartography, setting the owner so that tests work | ||
COPY --chown=cartography:cartography . /srv/cartography | ||
|
||
USER cartography | ||
|
||
# Sets the directory as safe due to a mismatch in the user that cloned the repo | ||
# and the user that is going to run the unit&integ tests. | ||
RUN git config --global --add safe.directory /srv/cartography | ||
RUN /usr/bin/git config --local user.name "cartography" | ||
ENTRYPOINT ["cartography"] | ||
CMD ["-h"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Process for becoming a maintainer | ||
Generally, express interest. This usually includes things like: | ||
- Contributing 2+ PRs to Cartography. | ||
- Regularly participating in discussion on GitHub, on Slack, or in our live video meetings. | ||
|
||
# Maintainer responsibilities | ||
- Hang out on Slack; delayed response is perfectly acceptable | ||
- Triage GitHub issues and perform pull request reviews for other maintainers and the community. | ||
- Deeply understand the project's best practices and development patterns. | ||
|
||
# When does a maintainer lose maintainer status | ||
- If a maintainer is no longer interested or cannot perform the maintainer duties listed above, they should volunteer to be moved to emeritus status. | ||
- If we do not hear from you in over a year, we may remove you from maintainer status without notice. | ||
|
||
# Conflict resolution | ||
We handle conflicts on a case-by-case basis. In general, let's talk it out (Slack, video call, etc). For larger issues we may need to involve more people to come to a decision. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.