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

Update and move dockerfile-cli, add to auto build #793

Merged
merged 1 commit into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile-cli → docker/Dockerfile-cli
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ WORKDIR $GOPATH/src/github.com/Masterminds
RUN git clone https://github.com/Masterminds/glide.git
RUN cd glide && git checkout v0.12.3 && make bootstrap-dist && make install

RUN mkdir -p $GOPATH/src/github.com/uber/cadence
COPY . $GOPATH/src/github.com/uber/cadence
WORKDIR $GOPATH/src/github.com/uber/cadence
RUN make cadence
ENV CADENCE_HOME $GOPATH/src/github.com/uber/cadence
RUN git clone https://github.com/uber/cadence.git $CADENCE_HOME
WORKDIR $CADENCE_HOME
RUN cd $CADENCE_HOME && make cadence

FROM phusion/baseimage:0.10.1

Expand Down
6 changes: 4 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ cd $GOPATH/src/github.com/uber/cadence/docker
docker-compose up
```

View metrics at localhost:8080/dashboard
View metrics at localhost:8080/dashboard
View Cadence-Web at localhost:8088
Use Cadence-CLI with `docker run --rm ubercadence/cli:master`


Using a pre-built image
Expand Down Expand Up @@ -79,7 +81,7 @@ docker push ubercadence/server:master
image: ubercadence/server:THE.LATEST.VERSION
ports
```
3. Create the tar.gz file and upload to relase page
3. Create the tar.gz file and upload to release page
```bash
cd github.com/uber/cadence/docker
tar -cvf docker.tar.gz *
Expand Down
9 changes: 7 additions & 2 deletions docker/auto-build-docker-image.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#/bin/bash
#!/bin/bash
git pull
curr_cm_id=`git show-ref --heads`
last_cm_id=`cat .last_cm_id.txt`
cm_msg=`git log -1 --abbrev-commit`
if [ "$last_cm_id" == "$curr_cm_id" ]; then
echo "Last commit doesn't change."
else
echo "Last commit changed. Start building..." && docker build . -t ubercadence/server:master --build-arg git_branch=master && docker push ubercadence/server:master && mail -s "Docker image auto build succeeded HEAD: $curr_cm_id tag: master" [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected] <<< "commit info: $cm_msg " && echo $curr_cm_id > .last_cm_id.txt && echo "build succ!"
echo "Last commit changed. Start building..." \
&& docker build . -t ubercadence/server:master --build-arg git_branch=master \
&& docker push ubercadence/server:master \
&& docker build . -f Dockerfile-cli -t ubercadence/cli:master --build-arg git_branch=master \
&& docker push ubercadence/cli:master \
&& mail -s "Docker image auto build succeeded HEAD: $curr_cm_id tag: master" [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected] <<< "commit info: $cm_msg " && echo $curr_cm_id > .last_cm_id.txt && echo "build succ!"
fi
1 change: 1 addition & 0 deletions tools/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ also start workflow, show workflow history, signal workflow ... and many other t
## How
- Run `make bins`
- You should see an executable `cadence`
- (Optional) You could also use docker image `ubercadence/cli`, by replacing all the following `./cadence ...` with `docker run --rm ubercadence/cli:master ...`

## Quick Start
Run `./cadence` to view help message. There are some top level commands and global options.
Expand Down