Git Product home page Git Product logo

opensourceguide's Introduction

Opensource Guide

This guide is for who want to restrucure own's system to open source. There are some simple steps.

Table of Contents

Getting Started

CI/CD Pipeline]

Planing

Develop

CI/CD

Travis

  • Travis CI, Github계정으로 회원가입
  • 연동시킬 Repository 활성화
  • Project root경로에 .travis.yml 작성
language: java
jdk:
  - openjdk11  # using jdk11 at least for sonarcloud

branches:
  only:
    - master

# Travis CI 서버의 Home
cache:
  directories:
    - $HOME/.m2

# CI 실행 완료시 메일로 알람
notifications:
  email:
    recipients:
      - [email protected]
      
  • Github Readme.md에 Travis badge 추가

Build

Code Coverage - CodeCov

  • codecov 사이트 가입 후 repository 활성화
  • travis.yml script추가
script: "mvn cobertura:cobertura"
after_success:
  - bash <(curl -s https://codecov.io/bash)
  - codecov
env:
   - CODECOV_TOME=583d22f4-1c33-4b5f-91ad-a370a0290fab
  • pom.xml plugin 추가
<plugin>
	<groupId>org.codehaus.mojo</groupId>
	<artifactId>cobertura-maven-plugin</artifactId>
	<version>2.7</version>
	<configuration>
		<formats>
			<format>html</format>
			<format>xml</format>
		</formats>
		<check />
	</configuration>
</plugin>

Code Quality - SonarCloud

  • SonarCloud와 Github연결
  • SonarCloud 회원가입(https://sonarcloud.io/)
  • Allow to access for github repository
  • get secure key
gem install travis
travis login --github-token ghp_uS****************wtN0iiSxg
travis encrypt SOMEVAR="fe7fe6**********e014803dfa8f" -r giyeonYu/OSS

ghp_uS******wtN0iiSxg => github token fe7fe6e014803dfa8f => travis token

  • edit .travis.yml
addons:
  sonarcloud:
    organization: "giyeonyu"
    token:
      secure: "**************************" # encrypted value of your token

script:
  # the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
  - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.login=c1a58ac2e42e06851dd4e9c8de969a76a1d53a1f

sonarcloud needs over jdk11 at least.

Verify

Release

Feedback

Documentation

Site - Gatsby Static Site Generator

# Insatllation with 'git clone'
git clone [email protected]:<user>/<repository> my-site
cd my-site
# Installation dependency
yarn insatll       
# To develop
yarn develop
# To build
yarn build
# To start
gatsby develop
  • Git Repository에 Push
  • Git Page 연동
    • 해당 repository의 Settings
    • Pages에서 해당 branch, root 로 설정하여 저장 image

Etc

Telegram Notify

1.Add ./github/workflow/main.xml for github action

name: telegram message
on: [push]
jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: send custom message
      uses: appleboy/telegram-action@master
      with:
        to: ${{ secrets.TELEGRAM_TO }}
        token: ${{ secrets.TELEGRAM_TOKEN }}
        message: |
          The ${{ github.event_name }} event triggered final step.
          echo This event is a pull request that had an assignee removed.

2.Add repository secrets

  • Settings -> Secrets

opensourceguide's People

Contributors

ygygood avatar

Watchers

 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.