Unverified Commit 5abebe6e authored by BoYiZhang's avatar BoYiZhang Committed by GitHub
Browse files

Merge pull request #1 from apache/dev

update code from apache
parents 9b75bebf 48d7612c
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -45,17 +45,29 @@ jobs:
  Compile-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/checkout@v2
      # In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
      - name: checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Compile
        run: mvn -U -B -T 1C clean install -Prelease -Dmaven.compile.fork=true -Dmaven.test.skip=true
        run: mvn -B clean compile package -Prelease -Dmaven.test.skip=true
  License-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/checkout@v2
      # In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
      - name: checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
+75 −0
Original line number Diff line number Diff line
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

on: ["pull_request"]
env:
  DOCKER_DIR: ./docker
  LOG_DIR: /tmp/dolphinscheduler

name: e2e Test

jobs:

  build:
    name: Test
    runs-on: ubuntu-latest
    steps:

      - uses: actions/checkout@v2
      # In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
      - name: checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - uses: actions/cache@v1
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Build Image
        run: |
          export VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT</version>" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'`
          sh ./dockerfile/hooks/build
      - name: Docker Run
        run: |
          VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT</version>" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'`
          mkdir -p /tmp/logs
          docker run -dit -e POSTGRESQL_USERNAME=test -e POSTGRESQL_PASSWORD=test -v /tmp/logs:/opt/dolphinscheduler/logs -p 8888:8888 dolphinscheduler:$VERSION all
      - name: Check Server Status
        run: sh ./dockerfile/hooks/check
      - name: Prepare e2e env
        run: |
          sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip
          wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
          sudo dpkg -i google-chrome*.deb
          sudo apt-get install -f -y
          wget -N https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip
          unzip chromedriver_linux64.zip
          sudo mv -f chromedriver /usr/local/share/chromedriver
          sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
      - name: Run e2e Test
        run: cd ./e2e && mvn -B clean test
      - name: Collect logs
        if: failure()
        uses: actions/upload-artifact@v1
        with:
          name: dslogs
          path: /tmp/logs

+14 −2
Original line number Diff line number Diff line
@@ -34,7 +34,13 @@ jobs:
      matrix:
        os: [ubuntu-latest, macos-latest]
    steps:
      - uses: actions/checkout@v1
      - uses: actions/checkout@v2
      # In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
      - name: checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - name: Set up Node.js
        uses: actions/setup-node@v1
        with:
@@ -49,7 +55,13 @@ jobs:
  License-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/checkout@v2
      # In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
      - name: checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
+20 −5
Original line number Diff line number Diff line
@@ -15,12 +15,16 @@
# limitations under the License.
#

on: ["push", "pull_request"]
on:
  pull_request:
  push:
    branches:
      - dev
env:
  DOCKER_DIR: ./docker
  LOG_DIR: /tmp/dolphinscheduler

name: Test Coveralls Parallel
name: Unit Test

jobs:

@@ -29,9 +33,13 @@ jobs:
    runs-on: ubuntu-latest
    steps:

      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/checkout@v2
      # In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
      - name: checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - uses: actions/cache@v1
        with:
          path: ~/.m2/repository
@@ -44,10 +52,17 @@ jobs:
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Git fetch unshallow
        run: |
          git fetch --unshallow
          git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
          git fetch origin
      - name: Compile
        run: |
          export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
          mvn test -B -Dmaven.test.skip=false
      - name: Upload coverage report to codecov
        run: |
          CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)
      - name: Run SonarCloud Analysis
        run: >
+67 −27
Original line number Diff line number Diff line
* First from the remote repository *https://github.com/apache/incubator-dolphinscheduler.git* fork code to your own repository

* there are three branches in the remote repository currently:
     * master normal delivery branch
            After the stable version is released, the code for the stable version branch is merged into the master branch.
# Development

    * dev daily development branch
            The daily development branch, the newly submitted code can pull requests to this branch.
Start by forking the dolphinscheduler GitHub repository, make changes in a branch and then send a pull request.

## Set up your dolphinscheduler GitHub Repository

* Clone your own warehouse to your local
There are three branches in the remote repository currently:
  - `master` : normal delivery branch. After the stable version is released, the code for the stable version branch is merged into the master branch.
            
    `git clone https://github.com/apache/incubator-dolphinscheduler.git`
  - `dev` : daily development branch. The daily development branch, the newly submitted code can pull requests to this branch.
  
* Add remote repository address, named upstream
  - `x.x.x-release` : the stable release version.

   `git remote add upstream https://github.com/apache/incubator-dolphinscheduler.git`
So, you should fork the `dev` branch.

* View repository:
After forking the [dolphinscheduler upstream source repository](https://github.com/apache/incubator-dolphinscheduler/fork) to your personal repository, you can set your  personal development environment.

    `git remote -v`
```sh
$ cd <your work direcotry>
$ git clone < your personal forked dolphinscheduler repo>
$ cd incubator-dolphinscheduler
```

## Set git remote as ``upstream``

Add remote repository address, named upstream

> There will be two repositories at this time: origin (your own warehouse) and upstream (remote repository)
```sh
git remote add upstream https://github.com/apache/incubator-dolphinscheduler.git
```

View repository:

* Get/update remote repository code (already the latest code, skip it)
```sh
git remote -v
```

   `git fetch upstream`
There will be two repositories at this time: origin (your own warehouse) and upstream (remote repository)

Get/update remote repository code (already the latest code, skip it).

* Synchronize remote repository code to local repository

```sh
git fetch upstream
```

Synchronize remote repository code to local repository

```sh
git checkout origin/dev
git merge --no-ff upstream/dev
```
@@ -41,24 +59,46 @@ git checkout -b dev-1.0 upstream/dev-1.0
git push --set-upstream origin dev1.0
```

* After modifying the code locally, submit it to your own repository:
## Create your feature branch
Before making code changes, make sure you create a separate branch for them.

```sh
$ git checkout -b <your-feature>
```

## Commit changes
After modifying the code locally, submit it to your own repository:

`git commit -m 'test commit'`
`git push`
```sh

git commit -m 'information about your feature'
```

## Push to the branch

* Submit changes to the remote repository

* On the github page, click on the new pull request.
Push your locally committed changes to the remote origin (your fork).

```
$ git push origin <your-feature>
```

## Create a pull request

After submitting changes to your remote repository, you should click on the new pull request On the following github page.

<p align = "center">
<img src = "http://geek.analysys.cn/static/upload/221/2019-04-02/90f3abbf-70ef-4334-b8d6-9014c9cf4c7f.png" width ="60%"/>
</p>

* Select the modified local branch and the branch to merge past to create a pull request.

Select the modified local branch and the branch to merge past to create a pull request.

<p align = "center">
<img src = "http://geek.analysys.cn/static/upload/221/2019-04-02/fe7eecfe-2720-4736-951b-b3387cf1ae41.png" width ="60%"/>
</p>

*  Next, the administrator is responsible for **merging** to complete the pull request
Next, the administrator is responsible for **merging** to complete the pull request.



Loading