Skip to content

Commit 8eb9ad7

Browse files
Automating the release process (#848)
* automating the release process * adding a tar.gz version of the installer
1 parent 78d4ea1 commit 8eb9ad7

File tree

4 files changed

+178
-0
lines changed

4 files changed

+178
-0
lines changed

ReleaseProcess.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# WebLogic Deploy Tooling Project Release Process
2+
This document describes the process that should be followed to create a WebLogic Deploy Tooling (WDT) release.
3+
4+
## Prerequisites
5+
- A local installation of WebLogic Server 12.2.1.x must be available.
6+
- The person running the release process must have admin privileges on the [WebLogic Deploy Tooling GitHub repo](https://github.com/oracle/weblogic-deploy-tooling) since the release process pushes to the master branch directly.
7+
- The person running the release process needs to create a GitHub Personal Access Token for the repository with (at least) the `repo:status`, `repo_deployment`, `public_repo`, and `security_events` privileges.
8+
- The person running the release needs a server added to their Maven `settings.xml` where the GitHub Personal Access Token is stored, as shown below. Note that this token can either be stored in plain text of encrypted using [Maven password encryption](https://maven.apache.org/guides/mini/guide-encryption.html).
9+
10+
```xml
11+
<servers>
12+
<server>
13+
<id>github</id>
14+
<passphrase>store plain text or encrypted token here</passphrase>
15+
</server>
16+
</servers>
17+
```
18+
19+
## Software Release Process
20+
The best practice is to write the release notes that will be published to GitHub prior to starting the steps below.
21+
22+
1. Set (and export) the environment variable `WLST_DIR` to `<WLS-install-dir>/oracle_common/common/bin`, replacing `<WLS-install-dir>` with the full path to the WLS 12.2.1.x installation directory.
23+
2. In the weblogic-deploy-tooling project directory, create a file called `release.properties` with content similar to the example shown below. Note that the example is configured to cut the 1.9.11 release.
24+
25+
```properties
26+
tag=release-1.9.11
27+
releaseVersion=1.9.11
28+
developmentVersion=1.9.12-SNAPSHOT
29+
```
30+
31+
3. In the weblogic-deploy-tooling project directory, run the `mvn -B -P release release:prepare release:perform` command. If your SSH private key has a passphrase, watch the build closely since it will prompt for your passphrase multiple times. Failure to enter it in a timely manner may result in a failure.
32+
4. If the build fails, run the `mvn -B -P release release:rollback` command to undo it and start over from Step 2 after correcting the issue.
33+
5. Once the software has been released, move on to the GitHub Release Process.
34+
35+
## GitHub Release Process
36+
Note that this process relies on the WDT installers being in your local Maven repository. As such, it is critical for the same user to run these steps on the same machine as the steps from the previous section!
37+
38+
1. Save the release notes in the file `<wdt-project-directory>/target/ReleaseNotes.md`.
39+
2. Run the command `mvn -f github-release.xml -DreleaseVersion=<release version number> verify` to create the draft GitHub Release.
40+
3. Log into [GitHub](https://github.com/oracle/weblogic-deploy-tooling), go to the Releases page, review/edit the draft release, and then publish the release.

github-release.xml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2017, 2021, Oracle and/or its affiliates.
4+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
5+
-->
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
8+
<modelVersion>4.0.0</modelVersion>
9+
10+
<groupId>com.oracle.weblogic.lifecycle</groupId>
11+
<artifactId>weblogic-deploy-github-release</artifactId>
12+
<version>1.0</version>
13+
<packaging>pom</packaging>
14+
15+
<properties>
16+
<releaseVersion>${env.VERSION_NUMBER}</releaseVersion>
17+
18+
<weblogic-deploy-installer-name>weblogic-deploy</weblogic-deploy-installer-name>
19+
<release-github-repository>oracle/weblogic-deploy-tooling</release-github-repository>
20+
21+
<release-settings-xml-server-id>github</release-settings-xml-server-id>
22+
<release-notes-file-name>${project.build.directory}/ReleaseNotes.md</release-notes-file-name>
23+
<release-installer-stage-dir>${project.build.directory}/installers</release-installer-stage-dir>
24+
<release-zip-installer-name>${weblogic-deploy-installer-name}.zip</release-zip-installer-name>
25+
<release-tgz-installer-name>${weblogic-deploy-installer-name}.tar.gz</release-tgz-installer-name>
26+
</properties>
27+
<build>
28+
<pluginManagement>
29+
<plugins>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-dependency-plugin</artifactId>
33+
<version>2.8</version>
34+
</plugin>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-enforcer-plugin</artifactId>
38+
<version>3.0.0-M2</version>
39+
</plugin>
40+
<plugin>
41+
<groupId>io.rhpatrick.mojo</groupId>
42+
<artifactId>github-maven-plugin</artifactId>
43+
<version>0.6</version>
44+
</plugin>
45+
</plugins>
46+
</pluginManagement>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-enforcer-plugin</artifactId>
51+
<executions>
52+
<execution>
53+
<id>enforce-build-environment</id>
54+
<goals>
55+
<goal>enforce</goal>
56+
</goals>
57+
<configuration>
58+
<rules>
59+
<requireProperty>
60+
<property>releaseVersion</property>
61+
<message>You must specify a release version number using -DreleaseVersion=x.y.z</message>
62+
<regex>\d+\.\d+\.\d+</regex>
63+
<regexMessage>You must provide a three place release number</regexMessage>
64+
</requireProperty>
65+
</rules>
66+
</configuration>
67+
</execution>
68+
</executions>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-dependency-plugin</artifactId>
73+
<executions>
74+
<execution>
75+
<id>stage-installer-artifacts</id>
76+
<goals>
77+
<goal>copy</goal>
78+
</goals>
79+
<configuration>
80+
<outputDirectory>${release-installer-stage-dir}</outputDirectory>
81+
<artifactItems>
82+
<artifactItem>
83+
<groupId>${project.groupId}</groupId>
84+
<artifactId>weblogic-deploy-installer</artifactId>
85+
<version>${releaseVersion}</version>
86+
<type>zip</type>
87+
<overWrite>true</overWrite>
88+
<destFileName>${release-zip-installer-name}</destFileName>
89+
</artifactItem>
90+
<artifactItem>
91+
<groupId>${project.groupId}</groupId>
92+
<artifactId>weblogic-deploy-installer</artifactId>
93+
<version>${releaseVersion}</version>
94+
<type>tar.gz</type>
95+
<overWrite>true</overWrite>
96+
<destFileName>${release-tgz-installer-name}</destFileName>
97+
</artifactItem>
98+
</artifactItems>
99+
</configuration>
100+
</execution>
101+
</executions>
102+
</plugin>
103+
<plugin>
104+
<groupId>io.rhpatrick.mojo</groupId>
105+
<artifactId>github-maven-plugin</artifactId>
106+
<executions>
107+
<execution>
108+
<id>create-draft-github-release</id>
109+
<goals>
110+
<goal>create-release</goal>
111+
</goals>
112+
<phase>verify</phase>
113+
<configuration>
114+
<repositoryId>${release-github-repository}</repositoryId>
115+
<serverId>${release-settings-xml-server-id}</serverId>
116+
<tag>release-${releaseVersion}</tag>
117+
<name>WebLogic Deploy Tooling ${releaseVersion}</name>
118+
<descriptionFile>${release-notes-file-name}</descriptionFile>
119+
<draft>true</draft>
120+
<assets>
121+
<fileSet>
122+
<directory>${release-installer-stage-dir}</directory>
123+
<includes>
124+
<include>${release-zip-installer-name}</include>
125+
<include>${release-tgz-installer-name}</include>
126+
</includes>
127+
</fileSet>
128+
</assets>
129+
</configuration>
130+
</execution>
131+
</executions>
132+
</plugin>
133+
</plugins>
134+
</build>
135+
</project>

installer/src/assembly/zip.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<id>zip</id>
99
<formats>
1010
<format>zip</format>
11+
<format>tar.gz</format>
1112
</formats>
1213

1314
<fileSets>

system-test/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<artifactId>weblogic-deploy</artifactId>
1414
<groupId>com.oracle.weblogic.lifecycle</groupId>
1515
<version>1.9.11-SNAPSHOT</version>
16+
<relativePath>../pom.xml</relativePath>
1617
</parent>
1718

1819
<properties>
@@ -117,6 +118,7 @@
117118
<goal>enforce</goal>
118119
</goals>
119120
<configuration>
121+
<skip>${skip-system-test-execution}</skip>
120122
<rules>
121123
<requireProperty>
122124
<property>mw_home</property>

0 commit comments

Comments
 (0)