I'm trying to build a docker image as a part of my project's pipeline and pass some credentials as secrets. The compromised line is
DOCKER_BUILDKIT=1 docker build --secret id=ARTIFACTORY_USERNAME --secret id=ARTIFACTORY_PASSWORD -f "$DOCKERFILE" context
I'm getting the following error
could not parse secrets: [id=ARTIFACTORY_USERNAME id=ARTIFACTORY_PASSWORD]: failed to stat ARTIFACTORY_USERNAME: stat ARTIFACTORY_USERNAME: no such file or directory
The strange thing is that this works in the same machine where Jenkins executes it if I execute it manually.
Is there something that Jenkins does between starting the execution and reaching the script that could be messing with this?