Skip to content

Commit

Permalink
[KYUUBI #887] [GA] Daily publish snapshot
Browse files Browse the repository at this point in the history
<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request

Closes #887 from pan3793/publish-snapshot.

Closes #887

5b2044a [Cheng Pan] Pin ubuntu-20.04 in GA
98945a1 [Cheng Pan] Remove Kyuubi local cache before deploy
f29cb6e [Cheng Pan] [GA] Daily publish snapshot

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
  • Loading branch information
pan3793 committed Aug 3, 2021
1 parent c6bee7c commit 962d721
Show file tree
Hide file tree
Showing 7 changed files with 263 additions and 63 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
rat:
name: Check License
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
Expand All @@ -29,7 +29,7 @@ jobs:

build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
tpcds:
name: TPC-DS Tests
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
SPARK_LOCAL_IP: localhost
steps:
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
./build/mvn test -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds -Dmaven.plugin.scalatest.exclude.tags=''
minikube-it:
name: Minikube Integration Test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
profiles:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Snapshot

on:
schedule:
- cron: '0 0 * * *'

jobs:
publish-snapshot:
if: ${{ startsWith(github.repository, 'apache/') }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
branch:
- master
- branch-1.3
steps:
- name: Checkout repository
uses: actions/checkout@master
with:
ref: ${{ matrix.branch }}
- name: Cache Maven local repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: snapshot-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
snapshot-maven-
- name: Install Java 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Publish snapshot
env:
ASF_USERNAME: ${{ secrets.NEXUS_USER }}
ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
run: |
rm -rf ~/.m2/repository/org/apache/kyuubi
./build/mvn clean deploy -DskipTests -Pspark-provided -s ./build/release/asf-settings.xml
34 changes: 34 additions & 0 deletions build/release/asf-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>apache.snapshots.https</id>
<username>${env.ASF_USERNAME}</username>
<password>${env.ASF_PASSWORD}</password>
</server>
<server>
<id>apache.releases.https</id>
<username>${env.ASF_USERNAME}</username>
<password>${env.ASF_PASSWORD}</password>
</server>
</servers>
</settings>
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession
import org.slf4j.LoggerFactory

// scalastyle:off line.size.limit
/**
* Usage:
* If you want to generate 10GB data with new database `tpcds_sf10`, you can run the cmd:
* `$SPARK_HOME/bin/spark-submit --conf spark.sql.tpcds.scale.factor=10 --conf spark.sql.tpcds.database=tpcds_sf10 --class org.apache.kyuubi.tpcds.DataGenerator kyuubi-tpcds-*.jar`
* <p>
* Run following command to generate 10GB data with new database `tpcds_sf10`.
* {{{
* `$SPARK_HOME/bin/spark-submit \
* --conf spark.sql.tpcds.scale.factor=10 \
* --conf spark.sql.tpcds.database=tpcds_sf10 \
* --class org.apache.kyuubi.tpcds.DataGenerator \
* kyuubi-tpcds-*.jar`
* }}}
*/
// scalastyle:on line.size.limit
object DataGenerator {
private val logger =
LoggerFactory.getLogger(this.getClass.getSimpleName.stripSuffix("$"))
Expand Down
11 changes: 11 additions & 0 deletions kyuubi-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,15 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 962d721

Please sign in to comment.