Giter VIP home page Giter VIP logo

swec-content's Introduction

Software Engineering Course

Prerequisites

  • Allocate Ubuntu 16.04 VM
  • Clone repository with helpers
    > cd ~
    > mkdir projects
    > cd projects
    > git clone https://github.com/swe-course/swec-content.git
    
  • Install prerequisites
    > cd swec-content
    > ./prereq.sh
    

Nexus

  • Up Nexus instance
    > cd ~/projects/swec-content/nexus
    > ./nexus-up.sh -d
    
  • Access point http://<host-ip-address>:8081, user/pass admin/admin123
  • Create new maven2 hosted repository, name: saas-template

Github

  • Create personal access token with repo, admin:repo_hook

SonarQube

  • Up SonarQube instance
    > cd ~/projects/swec-content/sonarqube
    > ./sonarqube-up.sh -d
    
  • Access point http://<host-ip-address>:9000, user/pass admin/admin
  • Install "Github" plugin and restart Sonar, using hint at the top of the page
  • Generate access token

Jenkins

  • Install
    > tln install jenkins
    
  • Access point http://<host-ip-address>:8080
  • Apply fix(es) for "ALPN callback dropped: SPDY and HTTP/2 are disabled. Is alpn-boot on the boot class path?"
    • Check your Java version

      > java -version

      openjdk version "1.8.0_171" OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11) OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

    • Find corresponding alpn boot library

      https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html#alpn-versions
      
      OpenJDK version ALPN version
      1.8.0u171 8.1.12.v20180117
    • Copy link to the corresponding ALPN jar from 'ALPN version' folder

      http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/
      

      http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.12.v20180117/alpn-boot-8.1.12.v20180117.jar

    • Goto JVM folder

      > cd /usr/lib/jvm
      
    • Download jar file

      > wget http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.12.v20180117/alpn-boot-8.1.12.v20180117.jar
      
    • Goto folder

      > cd /etc/default
      
    • Open for editing jenkins file

    • Modify property JAVA_ARGS variable from

      JAVA_ARGS="-Djava.awt.headless=true"
      

      too

      JAVA_ARGS="-Djava.awt.headless=true -Xbootclasspath/p:/usr/lib/jvm/alpn-boot-8.1.12.v20180117.jar -Dhudson.DNSMultiCast.disabled=true"
      
    • Restart Jenkins

      systemctl stop jenkins && systemctl start jenkins
      
  • Install plugins
    > cd ~/projects/swec-content/jenkins
    > ./install-plugins.sh
    

Configure plugins

Goto Manage Manage Jenkins/Configure System

  • Configure "SonarQube servers" instance, name SonarQube
  • "GitHub" instance + Github access credentials using created token
  • "GitHub Pull Request Builder"

Configure tools

Goto Manage Manage Jenkins/Global Tool Configuration

  • Configure "SonarQube Scanner", name - SonarQube Scanner

Create new 'Pipeline' job

  • Specify your fork url

  • Add job parameters

    Parameter name Value
    SONARQUBE_SERVER SonarQube
    SONARQUBE_SCANNER SonarQube Scanner
    SONARQUBE_ACCESS_TOKEN -
    GITHUB_ACCESS_TOKEN -
    NEXUS_HOST http://<host-ip-address>:8081
    NEXUS_REPO saas-template
    NEXUS_USER admin
    NEXUS_PASS admin123
    SERVICES_GJ_PORT 8182
  • Configure "GitHub Pull Request Builder"

    • Add your user into WhiteList
  • "GitHub hook trigger for GITScm polling"

  • Set pipeline definitions

    • Select Pipeline script from SCM
    • Select SCM Git
    • Set repository url
      https://github.com/<YOU_ACCOUNT|ORG>/saas-template.git
      
    • Use git repo Refspec (Advanced button):
      +refs/heads/*:refs/remotes/origin/* +refs/pull/*:refs/remotes/origin/pr/*
      
    • Add additional branch
      ${sha1}
      

Gonfigure branch(es)

  • Mark master branch as protected at Repository Settings

Create new 'Multibranch Pipeline' job

swec-content's People

Contributors

vladyslavkurmaz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.