Package org.jfrog.build.api.builder

Examples of org.jfrog.build.api.builder.PromotionStatusBuilder


            try {
                buildStartDate = new SimpleDateFormat(Build.STARTED_FORMAT).parse(buildStartedIso);
            } catch (ParseException e) {
                throw new IllegalArgumentException("Build start date format error: " + buildStartedIso, e);
            }
            builder.addStatus(new PromotionStatusBuilder(Promotion.STAGED).timestampDate(buildStartDate)
                    .comment(comment).repository(stagingRepository)
                    .ciUser(clientConf.info.getPrincipal()).user(clientConf.publisher.getUsername()).build());
        }
    }
View Full Code Here


    public void testStatusAddMethod() {
        Build build = new Build();
        assertNull(build.getStatuses(), "Default status list should be null.");

        PromotionStatus promotionStatus = new PromotionStatusBuilder(Promotion.RELEASED).repository("bla").
                timestamp("bla").user("bla").build();
        build.addStatus(promotionStatus);

        assertFalse(build.getStatuses().isEmpty(), "Status object should have been added.");
        assertEquals(build.getStatuses().get(0), promotionStatus, "Unexpected status object.");

        PromotionStatus anotherPromotionStatus = new PromotionStatusBuilder(Promotion.RELEASED).repository("bla").
                timestamp("bla").user("bla").build();
        build.addStatus(anotherPromotionStatus);

        assertEquals(build.getStatuses().size(), 2, "Second status object should have been added.");
        assertEquals(build.getStatuses().get(1), anotherPromotionStatus, "Unexpected status object.");
View Full Code Here

TOP

Related Classes of org.jfrog.build.api.builder.PromotionStatusBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.