I'm trying to use Karate Netty jar in a gitlab-ci pipeline. I'm pulling in an image that contains the jar as a step in the pipeline. I am able to execute tests just fine for unsecured services. Like so:
karate-test:
stage: acceptance-test
image:
name: registry.gitlab.opr.business.org/karate-universe:0.0.3
entrypoint: [ "" ]
script:
- java -jar /karate.jar -e dev src/test/karate/acceptance-test.feature -o /target/karate
environment:
name: Test
artifacts:
paths:
- /target/karate
Now I'm trying to pass credentials into a karate feature for a secured service but cannot find the capabilities from the jar interface.
I've tried passing the credentials like so:
- java -jar /karate.jar -e dev src/test/karate/acceptance-test.feature -o /target/karate -Duser.password ${REQUEST_PASSWORD} -Duser.id ${REQUEST_USER}
REQUEST_PASSWORD and REQUEST_USER are gitlab variables that are available to me in gitlab-ci.
When I run the pipeline, I get:
Unmatched arguments [-Duser.password, -Duser.id]
Does Karate Netty have the capabilities of being able to pass variables for karate-config use like regular Karate does? I cannot keep secrets in the karate-config file itself.