Workflow when I want to test edited container

Hello,

I have 2 jobs in my config:

  • 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.

Any ideas?

It sounds like you want to preserve part of the file system between jobs. For that, I think you need workspaces.

I saw it, and it partly resolve the problem.
I want the entire machine to be in my workspace, not specific path, how can I do that? wildcards?

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.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.