Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initializes project - all set for development. #1

Merged
merged 3 commits into from
Jun 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- Thanks for filing an issue! Please use this template to provide more context for the issue . -->

**Description of the issue**:

**Expected behavior**:

**Steps to reproduce**: <!-- Please provide a minimal and precise series of steps -->

**Environment**: <!-- OS, Maven, and other relevant environment information -->

**`skaffold-maven-plugin` Configuration:**
```xml
PASTE YOUR pom.xml CONFIGURATION HERE
```

--- OR ---

**`skaffold-gradle-plugin` Configuration:**
```xml
PASTE YOUR build.gradle CONFIGURATION HERE
```

**Log output**: <!-- If applicable, provide relevant log output -->

**Additional Information**: <!-- Any additional information that may be helpful -->


<!-- Thanks for contributing! -->
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build
target
out
*.iml
*.ipr
*.iws
.idea
.gradle
/.settings
/.classpath
/.project
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These docs generate [googlecontainertools.github.io/skaffold-tools-for-java](https://googlecontainertools.github.io/skaffold-tools-for-java).
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-slate
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Documentation goes here
17 changes: 17 additions & 0 deletions kokoro/continuous.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@echo on

REM Java 9 does not work with Mockito mockmaker.
set JAVA_HOME=c:\program files\java\jdk1.8.0_152
set PATH=%JAVA_HOME%\bin;%PATH%

cd github/skaffold-java

REM Stops any left-over containers.
REM FOR /f "tokens=*" %%i IN ('docker ps -q') DO docker rm -vf %%i

REM TODO: Enable integration tests once docker works (b/73345382).
cd skaffold-plugins-core && call gradlew.bat clean build --info --stacktrace && ^
cd ../skaffold-maven-plugin && call mvnw.cmd clean install -B -U -X && ^
cd ../skaffold-gradle-plugin && call gradlew.bat clean build --info --stacktrace

exit /b %ERRORLEVEL%
24 changes: 24 additions & 0 deletions kokoro/continuous.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

# This project uses the same testing project as Jib.
echo ${JIB_INTEGRATION_TESTING_KEY} > ./keyfile.json

set -x

gcloud components install docker-credential-gcr

# For macOS to find docker-credential-gcr
export PATH=$PATH:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/

# docker-credential-gcr uses GOOGLE_APPLICATION_CREDENTIALS as the credentials key file
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/keyfile.json
docker-credential-gcr configure-docker

# Stops any left-over containers.
docker stop $(docker container ls --quiet) || true

(cd github/skaffold-java/skaffold-plugins-core; ./gradlew clean build integrationTest --info --stacktrace)
(cd github/skaffold-java/skaffold-maven-plugin; ./mvnw clean install -P integration-tests -B -U -X)
(cd github/skaffold-java/skaffold-gradle-plugin; ./gradlew clean build integrationTest --info --stacktrace)
17 changes: 17 additions & 0 deletions kokoro/presubmit.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@echo on

REM Java 9 does not work with Mockito mockmaker.
set JAVA_HOME=c:\program files\java\jdk1.8.0_152
set PATH=%JAVA_HOME%\bin;%PATH%

cd github/skaffold-java

REM Stops any left-over containers.
REM FOR /f "tokens=*" %%i IN ('docker ps -q') DO docker rm -vf %%i

REM TODO: Enable integration tests once docker works (b/73345382).
cd skaffold-plugins-core && call gradlew.bat clean build --info --stacktrace && ^
cd ../skaffold-maven-plugin && call mvnw.cmd clean install -B -U -X && ^
cd ../skaffold-gradle-plugin && call gradlew.bat clean build --info --stacktrace

exit /b %ERRORLEVEL%
16 changes: 16 additions & 0 deletions kokoro/presubmit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e
set -x

gcloud components install docker-credential-gcr
export PATH=$PATH:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/

# Stops any left-over containers.
docker stop $(docker container ls --quiet) || true

cd github/skaffold-java

(cd skaffold-plugins-core; ./gradlew clean build integrationTest --info --stacktrace)
(cd skaffold-maven-plugin; ./mvnw clean install -B -U -X)
(cd skaffold-gradle-plugin; ./gradlew clean build --info --stacktrace)
27 changes: 27 additions & 0 deletions proposals/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Design Documents and Proposals

This directory holds the approved design documents and proposals for changes and new features to the Skaffold-Java tools.

## Contribute

### Submit a Proposal

Submit a proposal by filing a pull request that adds a `<proposal_name>.md` file to this directory.

Follow the general layout of existing proposals. In general, make sure to include:

- Description of the problem
- Goals to achieve
- Proposed solution to the problem

Proposals are approved upon merge.

### Review a Proposal

Review pending proposals by commenting on [their pull requests](/../../pulls?q=is%3Aopen+is%3Apr+label%3Aproposal). Proposals in review are labelled with `proposal`.

For approved proposals, you may open revision pull requests with your suggestions for revision, or provide your comments in a new [issue](/../../issues/new?body=&lt;!--%20Please%20provide%20the%20link%20to%20the%20approved%20proposal%20you%20are%20commenting%20on.%20--&gt;) or messaging the [community](/../../#community).

### Implementing a Proposal

Pull requests should reference the proposal that they are implementing. Implemented proposals should be moved to `archives/` and marked with the version they will/have been released in.
11 changes: 11 additions & 0 deletions skaffold-gradle-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build
target
out
*.iml
*.ipr
*.iws
.idea
.gradle
/.settings
/.classpath
/.project
11 changes: 11 additions & 0 deletions skaffold-gradle-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file.
## [unreleased]

### Added

### Changed

### Fixed

## v0.1.0 - [release date]
5 changes: 5 additions & 0 deletions skaffold-gradle-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

# Skaffold tools for Java

In development
148 changes: 148 additions & 0 deletions skaffold-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
plugins {
id 'java-gradle-plugin'
id 'checkstyle'
id 'com.github.sherter.google-java-format' version '0.6'

// For local install
id 'maven'

// Error-prone checker
id 'net.ltgt.apt' version '0.15'
id 'net.ltgt.errorprone' version '0.0.14'

// Prepare release
id 'net.researchgate.release' version '2.6.0'
// Gradle Plugin Portal publish
id 'com.gradle.plugin-publish' version '0.9.10'
}

group 'com.google.cloud.tools'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

repositories {
// Use jcenter for gradle plugin portal releases.
jcenter()
}

sourceSets {
main {
java.srcDir file('../skaffold-plugins-core/src/main/java')
resources.srcDir file('../skaffold-plugins-core/src/main/resources')
}
test {
java.srcDir file('../skaffold-plugins-core/src/test/java')
resources.srcDir file('../skaffold-plugins-core/src/test/resources')
}
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
srcDir file('../skaffold-plugins-core/src/integration-test/java')
}
resources {
srcDir file('src/integration-test/resources')
srcDir file('../skaffold-plugins-core/src/integration-test/resources')
}
}
}

configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}

dependencies {
// These are copied over from skaffold-plugins-core and are necessary for the skaffold-plugins-core sourcesets.
compile 'com.google.guava:guava:23.6.1-jre'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.18.3'

compile gradleApi()

// NullAway errorprone plugin
annotationProcessor 'com.uber.nullaway:nullaway:0.4.6'
errorprone 'com.google.errorprone:error_prone_core:2.3.1'
}

task wrapper(type: Wrapper) {
gradleVersion = '4.8'
}

// Integration tests must be run explicitly
task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
integrationTest.dependsOn test

test {
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
}

// Adds NullAway errorprone checks.
tasks.withType(JavaCompile) {
if (!name.toLowerCase().contains('test')) {
options.compilerArgs += ['-Xep:NullAway:ERROR', '-XepOpt:NullAway:AnnotatedPackages=com.google.cloud.tools']
}
}

tasks.withType(Test) {
reports.html.setDestination file("${reporting.baseDir}/${name}")
}

/* GOOGLE JAVA FORMAT */
googleJavaFormat {
toolVersion = '1.6'
}
check.dependsOn verifyGoogleJavaFormat
/* GOOGLE JAVA FORMAT */

/* CHECKSTYLE */
checkstyle {
toolVersion = '8.10.1'

// get the google_checks.xml file from the checkstyle jar and take out the java checks
def googleChecks = resources.text.fromArchiveEntry(configurations.checkstyle[0], 'google_checks.xml').asString()
def fileExtensionsBefore = '<property name="fileExtensions" value="java, properties, xml"/>'
def fileExtensionsAfter = '<property name="fileExtensions" value="properties, xml"/>'
def googleChecksNoJava = googleChecks.replace(fileExtensionsBefore, fileExtensionsAfter)
assert !googleChecks.equals(googleChecksNoJava)

config = resources.text.fromString(googleChecksNoJava)

maxErrors = 0
maxWarnings = 0
}
/* CHECKSTYLE */

/* RELEASE */
// Prepare release
release {
tagTemplate = 'v$version-gradle'
git {
requireBranch = /^gradle_release_v\d+.*$/ //regex
}
}
// Gradle Plugin Portal releases
pluginBundle {
website = 'https://github.com/GoogleContainerTools/skaffold-tools-for-java/'
vcsUrl = 'https://github.com/GoogleContainerTools/skaffold-tools-for-java/'

plugins {
skaffoldPlugin {
id = 'com.google.cloud.tools.skaffold'
displayName = 'Skaffold tools for Java'
description = 'Develop containerized Java applications on Kubernetes'
tags = ['google', 'java', 'containers', 'docker', 'kubernetes', 'microservices']
}
}
}
tasks.publishPlugins.dependsOn integrationTest
/* RELEASE */
1 change: 1 addition & 0 deletions skaffold-gradle-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = 0.1.0-SNAPSHOT
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Jun 08 00:48:31 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
Loading