forked from tektoncd/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This achieves a few things: 1. Creates Dockerfile for sync tool, so that it can be invoked from Tekton tasks. 2. Makes sync config directory configurable by flag, so that the tool can be ran from any directory. This defaults to sync/config (same as before). Symlinks are retainined in the root directory for requirements.txt and runtime.txt to satisfy Netlify Build requirements: https://docs.netlify.com/configure-builds/manage-dependencies/#python Issue: #34
- Loading branch information
1 parent
0039c98
commit 85a5dcb
Showing
7 changed files
with
55 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 @@ | ||
sync/requirements.txt |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
sync/runtime.txt |
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,12 @@ | ||
FROM python:3.7 | ||
|
||
WORKDIR /app | ||
# Only copy specific values instead of the entire directory. | ||
# We're primarily trying to avoid pulling in config/, since it's confusing that | ||
# it will not be used. | ||
COPY sync.py sync.py | ||
COPY requirements.txt requirements.txt | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
ENTRYPOINT [ "python3", "sync.py" ] |
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,11 +1,25 @@ | ||
# sync | ||
|
||
This directory includes a helper script for synchronizing contents | ||
from specified Tekton repositories to this repository. | ||
|
||
To run this script locally, set up a Python 3 environment with appropriate | ||
Google Cloud Platform credentials, and execute the following command: | ||
|
||
```bash | ||
cd .. | ||
pip install -r requirements.txt | ||
python sync/sync.py | ||
pip3 install -r requirements.txt | ||
python3 sync.py | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
USAGE: sync.py [flags] | ||
flags: | ||
|
||
sync.py: | ||
-c,--config: Config directory | ||
(default: 'config') | ||
|
||
Try --helpfull to get a list of all flags. | ||
``` |
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,6 @@ | ||
wget==3.2 | ||
PyYAML==5.1.2 | ||
google-cloud-storage==1.23.0 | ||
Jinja2==2.11.1 | ||
google-auth==1.14.0 | ||
absl-py==0.9.0 |
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 @@ | ||
3.7 |
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