famous-car-78664
03/07/2024, 4:02 PMhelm_artifact
and helm_deployment
defined:
helm_artifact(
name="myapp",
artifact="myapp",
version="0.1.3",
repository="<https://gitlab.com/api/v4/projects/{REDACTED_PROJECT_ID}/packages/helm/stable>"
)
helm_deployment(
name="staging",
chart=":myapp",
values={
"image.tag": "xxxx-mytag",
"postgres.password": f"{env('RDS_PASSWORD')}",
},
release_name="myapp",
namespace="default",
)
But I can't get past this error when running pants package ::
in Gitlab CI:
Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/bin/pants", line 8, in <module>
sys.exit(main())
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 112, in main
PantsLoader.main()
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 108, in main
cls.run_default_entrypoint()
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 91, in run_default_entrypoint
exit_code = runner.run(start_time)
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/bin/pants_runner.py", line 142, in run
runner = LocalPantsRunner.create(
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 153, in create
specs = calculate_specs(
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/init/specs_calculator.py", line 75, in calculate_specs
(changed_addresses,) = session.product_request(
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 582, in product_request
return self.execute(request)
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 523, in execute
self._raise_on_error([t for _, t in throws])
File "/root/.cache/nce/f60c448851c3b3112b179a56f168ee90d8597297cfc45d3ca7178c6715f6cba8/bindings/venvs/2.19.0/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 507, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Pulling Helm Chart 'myapp' with version 0.1.3.' failed with exit code 1.
stdout:
stderr:
Error: looks like "<https://gitlab.com/api/v4/projects/{REDACTED_PROJECT_ID}/packages/helm/stable>" is not a valid chart repository or cannot be reached: failed to fetch <https://gitlab.com/api/v4/projects/{REDACTED_PROJECT_ID}/packages/helm/stable/index.yaml> : 401 Unauthorized
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
NoneType: None
FATAL: exception not rethrown
I tried to login using helm repo add
(which is working), but still can't get pants to use credentials. What am I missing ?curved-television-6568
03/07/2024, 4:15 PMfamous-car-78664
03/08/2024, 1:29 PMexport $(helm env)
to make sure variables where set (path to conf etc.)curved-television-6568
03/08/2024, 1:36 PMpants --keep-sandboxes=always
it logs all sandboxes used, and in there is a __run.sh
which you can run to emulate what pants does. Comparing that to running the commands directly in your own env and narrowing down what the differences are..famous-car-78664
03/08/2024, 1:52 PM