Skip to content

Commit

Permalink
Fixed #586: Check/implement what other CI/CD automation might be needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonis committed Jun 19, 2017
1 parent 4662f5a commit 1fba758
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 68 deletions.
12 changes: 6 additions & 6 deletions Examples/restcomm-helloworld/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,7 @@
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="android-jain-sip-ri-1.2.293" level="project" />
<orderEntry type="library" exported="" name="restcomm-android-sdk-1.0.1-BETA6-83" level="project" />
<orderEntry type="library" exported="" name="core-1.54.0.0" level="project" />
<orderEntry type="library" exported="" name="prov-1.54.0.0" level="project" />
<orderEntry type="library" exported="" name="log4j-1.2.17" level="project" />
<orderEntry type="library" exported="" name="support-v4-25.1.1" level="project" />
<orderEntry type="library" exported="" name="pkix-1.54.0.0" level="project" />
<orderEntry type="library" exported="" name="support-compat-25.1.1" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-25.1.1" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-25.1.1" level="project" />
Expand All @@ -111,5 +105,11 @@
<orderEntry type="library" exported="" name="support-core-utils-25.1.1" level="project" />
<orderEntry type="library" exported="" name="support-fragment-25.1.1" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-25.1.1" level="project" />
<orderEntry type="module" module-name="restcomm.android.sdk" exported="" />
<orderEntry type="library" exported="" name="android-jain-sip-ri-1.2.293" level="project" />
<orderEntry type="library" exported="" name="core-1.54.0.0" level="project" />
<orderEntry type="library" exported="" name="prov-1.54.0.0" level="project" />
<orderEntry type="library" exported="" name="log4j-1.2.17" level="project" />
<orderEntry type="library" exported="" name="pkix-1.54.0.0" level="project" />
</component>
</module>
4 changes: 2 additions & 2 deletions Examples/restcomm-helloworld/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ repositories {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//testCompile 'junit:junit:4.12'
//compile project(':restcomm.android.sdk')
compile 'org.restcomm:restcomm-android-sdk:1.0.1-BETA6-83'
compile project(':restcomm.android.sdk')
//compile 'org.restcomm:restcomm-android-sdk:1.0.1-BETA6-83'
compile 'com.android.support:appcompat-v7:25.1.1'
//compile 'com.android.support:design:24.2.0'
//compile 'com.android.support:support-v4:24.2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.restcomm.android.sdk.RCDevice;
import org.restcomm.android.sdk.RCDeviceListener;
import org.restcomm.android.sdk.RCPresenceEvent;
import org.restcomm.android.sdk.util.RCException;
//import org.webrtc.VideoRenderer;
//import org.webrtc.VideoRendererGui;
//import org.webrtc.VideoTrack;
Expand Down Expand Up @@ -178,8 +179,13 @@ public void onServiceConnected(ComponentName className, IBinder service)
//params.put(RCDevice.ParameterKeys.SIGNALING_JAIN_SIP_LOGGING_ENABLED, prefs.getBoolean(RCDevice.ParameterKeys.SIGNALING_JAIN_SIP_LOGGING_ENABLED, true));

if (!device.isInitialized()) {
device.initialize(getApplicationContext(), params, this);
device.setLogLevel(Log.VERBOSE);
try {
device.initialize(getApplicationContext(), params, this);
device.setLogLevel(Log.VERBOSE);
}
catch (RCException e) {
Log.e(TAG, "RCDevice Initialization Error: " + e.errorText);
}
}

serviceBound = true;
Expand Down Expand Up @@ -258,47 +264,11 @@ public void onStartListening(RCDevice device, RCDeviceListener.RCConnectivitySta

}

public void onStopListening(RCDevice device)
{

}

public void onStopListening(RCDevice device, int errorCode, String errorText)
{
Log.i(TAG, errorText);
}

public boolean receivePresenceEvents(RCDevice device)
{
return false;
}

public void onPresenceChanged(RCDevice device, RCPresenceEvent presenceEvent)
{

}

public void onIncomingConnection(RCDevice device, RCConnection connection)
{
Log.i(TAG, "Connection arrived");
this.pendingConnection = connection;
}

public void onIncomingMessage(RCDevice device, String message, HashMap<String, String> parameters)
{
final HashMap<String, String> finalParameters = parameters;
final String finalMessage = message;

runOnUiThread(new Runnable() {
@Override
public void run()
{
String newText = finalParameters.get("username") + ": " + finalMessage + "\n";
Log.i(TAG, "Message arrived: " + newText);
}
});
}

public void onConnectivityUpdate(RCDevice device, RCConnectivityStatus connectivityStatus)
{

Expand Down Expand Up @@ -360,7 +330,7 @@ public void onDigitSent(RCConnection connection, int statusCode, String statusTe
{
}

public void onMessageSent(RCDevice device, int statusCode, String statusText)
public void onMessageSent(RCDevice device, int statusCode, String statusText, String jobId)
{
}

Expand All @@ -372,18 +342,19 @@ public void onInitialized(RCDevice device, RCDeviceListener.RCConnectivityStatus
{
}

public void onInitializationError(int errorCode, String errorText)
{
}

// Resume call after permissions are checked
private void resumeCall()
{
if (connectParams != null) {
connection = device.connect(connectParams, this);
if (connection == null) {
Log.e(TAG, "Error: error connecting");
return;
try {
connection = device.connect(connectParams, this);
if (connection == null) {
Log.e(TAG, "Error: error connecting");
return;
}
}
catch (RCException e) {
Log.e(TAG, "Error: not connected" + e.errorText);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ public RCConnection connect(HashMap<String, Object> parameters, RCConnectionList
*
* @param message Message text
* @param parameters Parameters used for the message, such as 'username' that holds the recepient for the message
* @return status for the send action
* @return Job Id (string) of the the job created to asynchronously handle the transmission of the message, so that we can correlate the status when it arrives later
*/
public String sendMessage(String message, Map<String, String> parameters) throws RCException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ enum RCConnectivityStatus {
}

/**
* RCDevice initialized successfully. For regular scenarios (i.e. non-registrarless) this means that registration is successful.
* For registrarless scenarios this means that RCDevice is initialized properly (with no registration)
* RCDevice initialized either successfully or with error (check statusCode and statusText). For regular scenarios (i.e. non-registrarless) success
* means that this means that registration is successful. For registrar-less scenarios success means that RCDevice is initialized properly (with no registration)
*
* @param device Device of interest
* @param connectivityStatus Connectivity status
Expand Down
17 changes: 9 additions & 8 deletions scripts/main.bash
Original file line number Diff line number Diff line change
Expand Up @@ -75,35 +75,36 @@ else
echo "-- Skipping Documentation Generation."
fi

# Build SDK and publish to maven repo (trusted build)
if [ "$CURRENT_BRANCH" == $RELEASE_BRANCH ] && [[ -z "$SKIP_SDK_PUBLISH_TO_MAVEN_REPO" || "$SKIP_SDK_PUBLISH_TO_MAVEN_REPO" == "false" ]]

# Build and upload Olympus to Test Fairy (strusted build only)
if [ "$CURRENT_BRANCH" == $RELEASE_BRANCH ] && [[ -z "$SKIP_TF_UPLOAD" || "$SKIP_TF_UPLOAD" == "false" ]]
then
if [ -z $TRUSTED_BUILD ]
then
echo "Cannot generate doc in an untrusted build, skipping"
else
if ! ./scripts/publish-sdk.bash
if ! ./scripts/upload-olympus-to-testfairy.bash
then
exit 1
fi
fi
else
echo "-- Skipping SDK publishing."
echo "-- Skipping Test Fairy upload."
fi

# Build and upload Olympus to Test Fairy
if [ "$CURRENT_BRANCH" == $RELEASE_BRANCH ] && [[ -z "$SKIP_TF_UPLOAD" || "$SKIP_TF_UPLOAD" == "false" ]]
# Build SDK and publish to maven repo (trusted build)
if [ "$CURRENT_BRANCH" == $RELEASE_BRANCH ] && [[ -z "$SKIP_SDK_PUBLISH_TO_MAVEN_REPO" || "$SKIP_SDK_PUBLISH_TO_MAVEN_REPO" == "false" ]]
then
if [ -z $TRUSTED_BUILD ]
then
echo "Cannot generate doc in an untrusted build, skipping"
else
if ! ./scripts/upload-olympus-to-testfairy.bash
if ! ./scripts/publish-sdk.bash
then
exit 1
fi
fi
else
echo "-- Skipping Test Fairy upload."
echo "-- Skipping SDK publishing."
fi

2 changes: 0 additions & 2 deletions scripts/update-doc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ echo "== Updating Reference Documentation"
echo "== "
echo

git status

if [ -z $GITHUB_OAUTH_TOKEN ]
then
echo "-- Error: GITHUB_OAUTH_TOKEN environment variable missing"
Expand Down

0 comments on commit 1fba758

Please sign in to comment.