-
Bug
-
Resolution: Not A Defect
-
Critical
We're building a rails app into a Docker container, and as part of that in our Dockerfile we:
`RUN bundle exec rake assets:precompile`
This uses sprockets to compile the assets, generates a manifest file into the Docker image, and synchronizes the assets to S3 for exposure on the CDN. Asset synchronization occurs via credentials exposed in the environment of the user running the docker build command.
This works locally, but it appears that this plugin doesn't run the build command in the same environment that the jenkins user runs, nor does it respect the environment variables injected into the workspace by jenkins.
I'm not sure if this is a bug or a feature request, but either way, it'd be cool if this worked.
Not sure what you mean by environment variables - in a docker build - it can't really be parametrised by environment variables (the idea is that it runs the same, the Dockerfile is self describing).
Can you explain more the steps you are doing? The environment from jenkins is provided the same as for a freestyle step when running the docker command - but that won't mean anything when running a docker build.
I am probably not understanding what you are doing exactly - I gather in your image somewhere are pre-compiled assets you need to publish? what does it look like when you script it from outside?