Setup Development Environment - hqzhang/cloudtestbed GitHub Wiki

  1. Create github project
    1. sign up github if you donot have.
    2. click new repository: mycloudtest
    3. select public and initial readme and then click create repository
  2. Clone project at local
    1. click clone or download and copy url
    2. from ubuntu machine git clone https://github.com/hqzhang/mycloudtest.git
    3. vim main.c and input #include<stdio.h> main(){ printf("Hello World!\n"); }
    4. vim makefile all: gcc -o test main.c
    5. make
    6. run it ../test Hello World!
  3. Push code into remote repository.
    1. git add main.c
    2. git add makefile
    3. git commit -m "just for test"
    4. git push origin master
  4. Use Jenkins run automatically.
    1. install jenkins
    2. click New item: jentest and select Freestyle project
    3. click jentest and click config
    4. in Source Code Management: select git and then https://github.com/hqzhang/mycloudtest.git add the github account and passwd.
    5. in Build: add buid step: execute shell: make ./test click save.
    6. click build now
    7. click build number and then click console output:
Started by user hongqi
Building in workspace /var/lib/jenkins/workspace/jentest
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/hqzhang/mycloudtest.git # timeout=10
Fetching upstream changes from https://github.com/hqzhang/mycloudtest.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress https://github.com/hqzhang/mycloudtest.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision d27de8c2960466d7049646306417e2923204709e (refs/remotes/origin/master)
Commit message: "est"
 > git config core.sparsecheckout # timeout=10
 > git checkout -f d27de8c2960466d7049646306417e2923204709e
 > git rev-list c1e1646a2ea50166f430efe33557b2ce5c83460e # timeout=10
[jentest] $ /bin/sh -xe /tmp/jenkins4994886145237652159.sh
+ pwd
/var/lib/jenkins/workspace/jentest
+ make
gcc -otest main.c
+ ./test
Hello World!
Build step 'Execute shell' marked build as failure
Finished: SUCESS
⚠️ **GitHub.com Fallback** ⚠️