Skip to content

Commit

Permalink
Adds demo to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
ivotron committed Dec 9, 2017
1 parent 32d08df commit 2760c30
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ language: bash
services: docker
script:
- ./build-me.sh
- docker run --rm -v `pwd`/docs/ci/demo:/demo --entrypoint=/demo falsifiable/popper
- cd popper/_check && ./build_images
- docker build -t falsifiable/jenkins docs/ci/jenkins/docker
10 changes: 10 additions & 0 deletions docs/ci/demo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -ex
mkdir /tmp/mypaper
cd /tmp/mypaper
git init
popper init
popper init mypipeline
popper ci travis
cd pipelines/mypipeline
popper check
8 changes: 6 additions & 2 deletions popper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM golang:1.9

ADD . /go/src/github.com/systemslab/popper

WORKDIR /go/src/github.com/systemslab/popper
RUN go get ./
RUN go build

RUN go get ./ && \
go build

ENTRYPOINT ["/go/bin/popper"]
5 changes: 5 additions & 0 deletions popper/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ name is 'paper', then a 'paper' folder is created. Otherwise, an pipeline named
if len(args) > 1 {
log.Fatalln("This command takes one argument at most.")
}
if !sh.Test("dir", popperFolder) {
if err := sh.Command("git", "clone", "https://github.com/systemslab/popper", popperFolder).Run(); err != nil {
log.Fatalln(err)
}
}
if !sh.Test("dir", ".git") {
log.Fatalln("Can't find .git folder. Are you on the root folder of project?")
}
Expand Down

0 comments on commit 2760c30

Please sign in to comment.