Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<skip>true</skip> is not honored if <waitForStartup> is used #116

Open
RutledgePaulV opened this issue Jun 3, 2016 · 0 comments
Open

<skip>true</skip> is not honored if <waitForStartup> is used #116

RutledgePaulV opened this issue Jun 3, 2016 · 0 comments

Comments

@RutledgePaulV
Copy link

RutledgePaulV commented Jun 3, 2016

I have the following config being used with docker-maven-plugin 5.0.0

<plugin>
    <groupId>net.wouterdanes.docker</groupId>
    <artifactId>docker-maven-plugin</artifactId>
    <version>${docker-maven.version}</version>
    <executions>
        <execution>
            <id>${project.artifactId}</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>build-images</goal>
            </goals>
            <configuration>
                <images>
                    <image>
                        <id>${project.artifactId}</id>
                        <!-- specify the path to the dockerfile itself -->
                        <dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
                        <artifacts>
                            <artifact>
                                <!-- capture the build artifact -->
                                <file>${main-artifact}</file>
                            </artifact>
                            <artifact>
                                <!-- capture the stuff next to the docker file -->
                                <file>${project.basedir}/src/main/docker/</file>
                                <dest>/</dest>
                            </artifact>
                        </artifacts>
                    </image>
                </images>
            </configuration>
        </execution>
        <!--
                            runs the service as a docker container when the verify phase is reached.
                            we do this so that the integration tests can run against the containerized
                            version of the application thereby proving appropriate config and any
                            environment specific behavior.
                            -->
        <execution>
            <id>start</id>
            <goals>
                <goal>start-containers</goal>
            </goals>
            <phase>pre-integration-test</phase>
            <configuration>
                <skip>${skip.run}</skip>
                <forceCleanup>true</forceCleanup>
                <containers>
                    <container>
                        <id>${project.artifactId}</id>
                        <image>${project.artifactId}</image>
                        <waitForStartup>${startup.message}</waitForStartup></container>
                </containers>
            </configuration>
        </execution>
        <!--
                            Tags the built image with a variety of tags. In this way you can see what's
                            at the head of development for a particular branch, or what was built at a
                            particular time, or exactly which commit the code was on that the container
                            was built from based on the tags.
                            -->
        <execution>
            <id>release</id>
            <phase>install</phase>
            <goals>
                <goal>tag-images</goal>
            </goals>
            <configuration>
                <images>
                    <image>
                        <id>${project.artifactId}</id>
                        <tags>
                            <tag>${branchTag}</tag>
                            <tag>${timestampTag}</tag>
                            <tag>${commitTag}</tag>
                            <tag>${fullTag}</tag>
                        </tags>
                        <push>${push.docker.image}</push>
                    </image>
                </images>
            </configuration>
        </execution>
        <execution>
            <id>push-tags</id>
            <goals>
                <goal>push-images</goal>
            </goals>
            <phase>install</phase>
        </execution>
    </executions>
</plugin>

When I set -Dskip.run=false (used in the start-container) execution it still starts a container and waits for it. If I remove the "waitForStartup" then it skips the step as expected. I would expect the to work regardless of what the container config is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant