Re: [Scons-dev] Builder with custom decider and non-file based target

2016-08-04 Thread Dirk Bächle

Hi Oleg,

On 04.08.2016 13:55, Left Right wrote:

Hello list.

I'm trying to come up with a builder for Docker images. Docker images
are built based on a Dockerfile template and a bunch of other sources
one way or another related to the template. The output, however, isn't
a file strictly speaking. The builder should combine two Docker
operations: build+push, thus the final build artifact is the image
residing in Docker registry (a server with it's own database,
accessible via HTTP).

What I'd like to accomplish is the following:
1. Create Docker Builder s.t. given the Dockerfile and other auxiliary
files will call "docker build", then "docker push" to produce the
build artifact and to put it in the Docker registry.
2. Prevent building images if a query to Docker registry for a
previously built image succeeds.

I'm now looking at target_factory of SCons.Builder, but I'm not sure
this is the way to proceed. Please advise.



SCons works file-centric, meaning it expects that input and output to the single Builders (build steps) are actual files. So, as 
soon as you try to manage your images "proxy-wise" on a remote server you'll run into problems.

There is probably no easy workaround and you have to code the "remote" 
functionality in Python directly...

Best regards,

Dirk

___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


[Scons-dev] Builder with custom decider and non-file based target

2016-08-04 Thread Left Right
Hello list.

I'm trying to come up with a builder for Docker images. Docker images
are built based on a Dockerfile template and a bunch of other sources
one way or another related to the template. The output, however, isn't
a file strictly speaking. The builder should combine two Docker
operations: build+push, thus the final build artifact is the image
residing in Docker registry (a server with it's own database,
accessible via HTTP).

What I'd like to accomplish is the following:
1. Create Docker Builder s.t. given the Dockerfile and other auxiliary
files will call "docker build", then "docker push" to produce the
build artifact and to put it in the Docker registry.
2. Prevent building images if a query to Docker registry for a
previously built image succeeds.

I'm now looking at target_factory of SCons.Builder, but I'm not sure
this is the way to proceed. Please advise.

Thanks.

Oleg
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev