diff --git a/.gitignore b/.gitignore index 85856f4b8af069c976bb3fe8b01a8b28a64c7e7b..5bd7e0c353909ca8bc3b3709875840a148f8aa6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ resources/ public/ package-lock.json +node_modules/ +assets/js/version-switcher.js diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5ccb2ad0be68a4502f8e3075783e08b1d64a5b87..0c8c4770a45b6dadc6eb91c643aabca6fc166908 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,8 +1,8 @@ # Developing the Tekton website -- [Setting up your dev environment](#setup) -- [Running locally](#running-locally) -- [tekton.dev](#tekton.dev) +- [Developing the Tekton website](#developing-the-tekton-website) + - [Running Locally](#running-locally) + - [tekton.dev](#tektondev) ## Running Locally @@ -36,13 +36,12 @@ To run the [Makefile](Makefile) you will need more dependencies and flags: To run the makefile locally, you'll have to set the env var: -* `SKIP_BACKGROUND` (see [#38](https://github.com/tektoncd/website/issues/38)) to avoid having to supply GCP credentials * [`DEPLOY_PRIME_URL`](https://docs.netlify.com/configure-builds/environment-variables/) to the path to your website files For example: ```bash -SKIP_BACKGROUND=1 DEPLOY_PRIME_URL=localhost make preview-build +DEPLOY_PRIME_URL=localhost make preview-build ``` ## tekton.dev diff --git a/content/en/featured-background.jpeg b/content/en/featured-background.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5b3ceb029efdd0391899f1ccbed4e3aeef81b987 Binary files /dev/null and b/content/en/featured-background.jpeg differ diff --git a/sync/sync.py b/sync/sync.py index 419833a6a7d032e5a8afd9103492477da7a5d26e..9a100d670b312f68a16b6c6c3d24271de2b11d00 100644 --- a/sync/sync.py +++ b/sync/sync.py @@ -20,18 +20,9 @@ TEMPLATE_DIR = './templates' VAULT_DIR = './content/en/vault' BUCKET_NAME = 'tekton-website-assets' -SKIP_BACKGROUND = os.environ.get('SKIP_BACKGROUND') GCP_NETLIFY_ENV_CRED = os.environ.get('GCP_CREDENTIAL_JSON') GCP_PROJECT = os.environ.get('GCP_PROJECT') -if not SKIP_BACKGROUND: - if GCP_NETLIFY_ENV_CRED: - credentials = service_account.Credentials.from_service_account_info(json.loads(GCP_NETLIFY_ENV_CRED)) - gcs_client = storage.Client(project=GCP_PROJECT, - credentials=credentials) - else: - gcs_client = storage.Client() - gcs_bucket = gcs_client.get_bucket(BUCKET_NAME) jinja_env = Environment(loader=FileSystemLoader(TEMPLATE_DIR)) @@ -103,12 +94,6 @@ def prepare_vault_landing_page(component_versions): f.write(md) -def download_background_image(): - if not SKIP_BACKGROUND: - blob = gcs_bucket.blob('featured-background.jpeg') - blob.download_to_filename('./content/en/featured-background.jpeg') - - def scan(dir_path): entries = os.scandir(dir_path) sync_config_paths = [] @@ -132,4 +117,3 @@ if __name__ == '__main__': component_versions = get_component_versions(sync_configs) prepare_version_switcher_script(component_versions) prepare_vault_landing_page(component_versions) - download_background_image()