This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Older style. Not what is in repo on GitHub. --> | |
<target name="jenkins-glassfish-deploy-updated" depends="clean, default, test" | |
description="Clean, build, test and deploy application to GlassFish"> | |
<exec failonerror="true" executable="cmd" description="Deploy to GlassFish"> | |
<arg value="/c" /> | |
<arg value="asadmin --echo=true --host=localhost --port=4848 --user=admin | |
--passwordfile=pwdfile_domain1 --secure=false | |
deploy --force=true --name=HelloGlassFish --contextroot=/HelloGlassFish dist\HelloGlassFish.war" /> | |
</exec> | |
</target> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.blogpost</groupId> | |
<artifactId>HelloGlassFishMaven</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<name>HelloGlassFishMaven</name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# contents of all three files shown here | |
# development domain properties file | |
glassfish.domain=development | |
glassfish.host=glassfish4-app-server | |
glassfish.adminport=5050 | |
glassfish.user=admin | |
glassfish.pwdfile=pwdfile_development | |
# testing domain properties file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\gstaffor>asadmin create-domain --domaindir "%GLASSFISH_HOME%\domains" --adminport 7070 --instanceport 7071 production | |
Enter admin user name [Enter to accept default "admin" / no password]>admin | |
Enter the admin password [Enter to accept default of no password]> | |
Enter the admin password again> | |
Using port 7070 for Admin. | |
Using port 7071 for HTTP Instance. | |
Using default port 7676 for JMS. | |
Using default port 3700 for IIOP. | |
Using default port 8181 for HTTP_SSL. | |
Using default port 3820 for IIOP_SSL. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description>Clean, compile, assemble, test, and deploy application, using Maven, Git, and GlassFish</description> | |
<logRotator class="hudson.tasks.LogRotator"> | |
<daysToKeep>-1</daysToKeep> | |
<numToKeep>5</numToKeep> | |
<artifactDaysToKeep>-1</artifactDaysToKeep> | |
<artifactNumToKeep>-1</artifactNumToKeep> | |
</logRotator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description>Clean, compile, assemble, test, and deploy application, using Maven, Git, and GlassFish</description> | |
<logRotator class="hudson.tasks.LogRotator"> | |
<daysToKeep>-1</daysToKeep> | |
<numToKeep>5</numToKeep> | |
<artifactDaysToKeep>-1</artifactDaysToKeep> | |
<artifactNumToKeep>-1</artifactNumToKeep> | |
</logRotator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started by user Jenkins User | |
Building in workspace C:\workspace\GitMavenGlassFish_Build | |
Cloning the remote Git repository | |
Cloning repository C:\Users\gstaffor\Documents\GitServer\glassfish-maven-cd-blogpost.git | |
git --version | |
git version 1.8.4.msysgit.0 | |
Checking out Revision 6c69a20cd549246cbde1f70ea7aaa66e61505eb3 (origin/master) | |
Deleting old artifacts from #53 | |
[GitMavenGlassFish_Build] $ "C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\Maven_3.1.1\bin\mvn.bat" -f HelloGlassFishMaven\pom.xml -s "C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\Maven_3.1.1\conf\settings_paychex_proxy.xml" -Denvironment=testing -Dmaven.repo.local=C:\workspace\GitMavenGlassFish_Build\.repository clean install -e | |
[INFO] Error stacktraces are turned on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started by upstream project "GitMavenGlassFish_Build" build number 55 | |
originally caused by: | |
Started by user Jenkins User | |
Building in workspace C:\workspace\GitMavanGlassFish_Deploy | |
Copied 4 artifacts from "GitMavenGlassFish_Build" build number 55 | |
[GitMavanGlassFish_Deploy] $ "C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\Maven_3.1.1\bin\mvn.bat" -f HelloGlassFishMaven\pom.xml -s "C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\Maven_3.1.1\conf\settings_paychex_proxy.xml" -Denvironment=testing -Dglassfish.properties.file.argument=testing -Dmaven.repo.local=C:\workspace\GitMavanGlassFish_Deploy\.repository properties:read-project-properties glassfish:redeploy -e | |
[INFO] Error stacktraces are turned on. | |
[INFO] Scanning for projects... | |
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom | |
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Call Jenkins to start build and pass environment parameter | |
# | |
echo "executing post-receive hook" | |
echo "environment=testing" | |
echo "user=jenkins" | |
# cURL POST request using jenkins user with API token | |
curl -u jenkins:{your-api-token-here} \ | |
--data "delay=0sec&environment=testing" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --bare {path-to-existing-local-repository}\{name-of-repository} {name-of-repository}.git |