build : Using ruby and postgres to install and run our rails server for API testing.
test: I am cloning our Java tests from git and run it.
The problem, I need to reinstall EVERYTHING! after build job was ended.
What I want? I want to use workflows to test the image I edited in ‘build’ job. but from ‘test’ job.
Ah right, for your system installations? In my view, that’s not an appropriate use of workspaces - instead, create your own Docker image(s) for the build and pull them from your registry. You can use workspaces on top of that for your build artefacts as they go into test.
I am using ruby-2.5.1 docker image, and insalling a lot of things on it, how can I docker commit the whole container? then at the final build step I will push it to dockerhub and repull it afterwards.
You can’t push the container you’re using for build.
If you want to to create a build container, then create a separate repo and CI project for that, do an explicit Docker build, login and push. I do this on CircleCI for several microservices, and then pull them all when I need to test/deploy.