Skip to content

Commit

Permalink
Fix presubmit jobs in appengine-plugins
Browse files Browse the repository at this point in the history
cleanup top-level README.md to list the modules

The README in appengine-plugins-core module had the same content
as the top-level README. This change fixes the duplication.

Change-Id: Ibc8bede49a098575e2742dae7f9a43c1a0a91ee9
  • Loading branch information
suztomo committed Jul 22, 2024
1 parent c6b5066 commit 0e8ea93
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .kokoro/continuous.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
REM Use Java 8 for build
echo %JAVA_HOME%

cd github/appengine-plugins
cd git/appengine-plugins

if not exist "%HOME%\.m2" mkdir "%HOME%\.m2"
copy settings.xml "%HOME%\.m2"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -x
sudo /opt/google-cloud-sdk/bin/gcloud components update --quiet
sudo /opt/google-cloud-sdk/bin/gcloud components install app-engine-java --quiet

cd github/appengine-plugins
cd git/appengine-plugins

# Use GCP Maven Mirror
mkdir -p ${HOME}/.m2
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tar -xzf apache-maven-3.5.0-bin.tar.gz
M2_HOME="$(pwd)"/apache-maven-3.5.0
PATH=$PATH:$M2_HOME/bin

cd github/appengine-plugins
cd git/appengine-plugins

# Use GCP Maven Mirror
mkdir -p ${HOME}/.m2
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
# Display commands to stderr.
set -x

cd github/appengine-plugins
cd git/appengine-plugins

# Use GCP Maven Mirror
mkdir -p ${HOME}/.m2
Expand Down
95 changes: 7 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,10 @@
This repository hosts the Google App Engine Maven and Gradle plugins.
This repository hosts the Google App Engine Maven and Gradle plugins:

User documents:
- [app-maven-plugin](./app-maven-plugin): [App Engine Maven Plugin user document](https://cloud.google.com/appengine/docs/standard/java-gen2/using-maven)
- [app-gradle-plugin](./app-gradle-plugin): [App Engine Gradle Plugin user document](https://cloud.google.com/appengine/docs/standard/java-gen2/using-gradle)
- [appengine-plugins-core](./appengine-plugins-core): This is a shared utility library for the two above.

- [App Engine Maven Plugin](https://cloud.google.com/appengine/docs/standard/java-gen2/using-maven)
- [App Engine Gradle Plugin](https://cloud.google.com/appengine/docs/standard/java-gen2/using-gradle)
## Requirements

# Google App Engine Plugins Core Library

![experimental](https://img.shields.io/badge/stability-experimental-red.svg)

IMPORTANT:
This library is used by Google internal plugin development teams to share App Engine
related code. Its use for any other purpose is highly discouraged and unsupported.
Visit our [App Engine documentation](https://cloud.google.com/appengine/docs/admin-api/)
for more information on Google supported clients for App Engine administration.

# Requirements

This library requires Java 1.8 or higher to run.
This library requires Maven and Java 1.8 or higher to build.

You must also install the Cloud SDK command line interface (gcloud). If it isn't installed yet, follow [these instructions](https://cloud.google.com/sdk/).

You must also install the app-engine-java component:

gcloud components install app-engine-java

# Supported operations

The library implements the following operations:

* Deploy an application to standard or flexible environment
* Stage an application for deployment
* Run an application on the local server synchronously or asynchronously

# How to use

Build the library using the "mvn clean install" command at the repository root directory, where the pom.xml file is located. This produces the appengine-plugins-core-*version*-SNAPSHOT.jar file in the "target" directory that you can add to your application's class path.

To deploy a new version, a client calls the library in the following way:

```java
// All operations require the cloud SDK
CloudSdk cloudSdk = new CloudSdk.Builder().sdkPath(some-path).javaHome(some-java-home).build();


// Operations that use gcloud command line are initiated by the Gcloud object.
Gcloud gcloud = Gcloud.builder(sdk).setMetricsEnvironment("asdf","12").setCredentialFile(some-file).build()

// Similarly for AppCfg and the DevAppServer
AppCfg appcfg = AppCfg.builder(sdk).build()
DevServers localRun = DevServers.builder(sdk).build()

// Operations are started as processes, access to these processes is handled
// by implementations of ProcessHandler. To continue to interface with processes
// as before, use LegacyProcessHandler.
ProcessHandler handler = LegacyProcessHandler.builder()...configureHandler...build();
gcloud.newDeployment(handler).deploy(myDeployConfiguration);
```

## SDK Manager

This library provides a mechanism for installing, adding components to, and updating the Cloud SDK. The operations are intended to run asynchronously, either on an executor or through mechanisms provided by an IDE.

```java
// Create a new Managed SDK instance
ManagedCloudSdk sdk = ManagedCloudSdk.newManagedSdk("123.123.123") // SDK fixed at version.
ManagedCloudSdk sdk = ManagedCloudSdk.newManagedSdk() // 'LATEST' sdk, can be updated.

// Implement the listener interface to listen to operation output
MessageListener listener = new MessageListener() {...};

// Always check if operations are needed before running them
if (!sdk.isInstalled()) {
sdk.newInstaller().install(listener);
}

// use SdkComponent to reference a Cloud Sdk component
if (!sdk.hasComponent(SdkComponent.APP_ENGINE_JAVA)) {
sdk.newComponentInstaller().installComponent(SdkComponent.APP_ENGINE_JAVA, listener);
}

// updates will only occur on 'LATEST' sdks
if (!sdk.isUpToDate) {
sdk.newUpdater().update(listener);
}

// You can then create an SDK from a managed SDK instance
new CloudSdk.Builder().sdkPath(sdk.getSdkHome())...;
```
The libraries in this repository require Java 1.8 or higher to run.
This repository requires Maven and Java 1.8 or higher to build.

0 comments on commit 0e8ea93

Please sign in to comment.