-
Notifications
You must be signed in to change notification settings - Fork 91
Automating the release process #848
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
448b56d
automating the release process
robertpatrick 4679e9b
removing unneceesary plugin from the main pom
robertpatrick c09bfd7
tweaking formatting
robertpatrick 922466b
fixing a typo
robertpatrick 5028a16
adding a tar.gz version of the installer
robertpatrick 77c34f3
tweaking wording to make things clearer
robertpatrick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# WebLogic Deploy Tooling Project Release Process | ||
This document describes the process that should be followed to create a WebLogic Deploy Tooling (WDT) release. | ||
|
||
## Prerequisites | ||
- A local installation of WebLogic Server 12.2.1.x must be available. | ||
- 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. | ||
- 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. | ||
- 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). | ||
|
||
```xml | ||
<servers> | ||
<server> | ||
<id>github</id> | ||
<passphrase>store plain text or encrypted token here</passphrase> | ||
</server> | ||
</servers> | ||
``` | ||
|
||
## Software Release Process | ||
The best practice is to write the release notes that will be published to GitHub prior to starting the steps below. | ||
|
||
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. | ||
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. | ||
|
||
```properties | ||
tag=release-1.9.11 | ||
releaseVersion=1.9.11 | ||
developmentVersion=1.9.12-SNAPSHOT | ||
``` | ||
|
||
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. | ||
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. | ||
5. Once the software has been released, move on to the GitHub Release Process. | ||
|
||
## GitHub Release Process | ||
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! | ||
|
||
1. Save the release notes in the file `<wdt-project-directory>/target/ReleaseNotes.md`. | ||
2. Run the command `mvn -f github-release.xml -DreleaseVersion=<release version number> verify` to create the draft GitHub Release. | ||
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. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2017, 2021, Oracle and/or its affiliates. | ||
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
--> | ||
<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.oracle.weblogic.lifecycle</groupId> | ||
<artifactId>weblogic-deploy-github-release</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<releaseVersion>${env.VERSION_NUMBER}</releaseVersion> | ||
|
||
<weblogic-deploy-installer-name>weblogic-deploy</weblogic-deploy-installer-name> | ||
<release-github-repository>oracle/weblogic-deploy-tooling</release-github-repository> | ||
|
||
<release-settings-xml-server-id>github</release-settings-xml-server-id> | ||
<release-notes-file-name>${project.build.directory}/ReleaseNotes.md</release-notes-file-name> | ||
<release-installer-stage-dir>${project.build.directory}/installers</release-installer-stage-dir> | ||
<release-zip-installer-name>${weblogic-deploy-installer-name}.zip</release-zip-installer-name> | ||
<release-tgz-installer-name>${weblogic-deploy-installer-name}.tar.gz</release-tgz-installer-name> | ||
</properties> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>2.8</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<version>3.0.0-M2</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.rhpatrick.mojo</groupId> | ||
<artifactId>github-maven-plugin</artifactId> | ||
<version>0.6</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>enforce-build-environment</id> | ||
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<rules> | ||
<requireProperty> | ||
<property>releaseVersion</property> | ||
<message>You must specify a release version number using -DreleaseVersion=x.y.z</message> | ||
<regex>\d+\.\d+\.\d+</regex> | ||
<regexMessage>You must provide a three place release number</regexMessage> | ||
</requireProperty> | ||
</rules> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>stage-installer-artifacts</id> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${release-installer-stage-dir}</outputDirectory> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>weblogic-deploy-installer</artifactId> | ||
<version>${releaseVersion}</version> | ||
<type>zip</type> | ||
<overWrite>true</overWrite> | ||
<destFileName>${release-zip-installer-name}</destFileName> | ||
</artifactItem> | ||
<artifactItem> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>weblogic-deploy-installer</artifactId> | ||
<version>${releaseVersion}</version> | ||
<type>tar.gz</type> | ||
<overWrite>true</overWrite> | ||
<destFileName>${release-tgz-installer-name}</destFileName> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.rhpatrick.mojo</groupId> | ||
<artifactId>github-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>create-draft-github-release</id> | ||
<goals> | ||
<goal>create-release</goal> | ||
</goals> | ||
<phase>verify</phase> | ||
<configuration> | ||
<repositoryId>${release-github-repository}</repositoryId> | ||
<serverId>${release-settings-xml-server-id}</serverId> | ||
<tag>release-${releaseVersion}</tag> | ||
<name>WebLogic Deploy Tooling ${releaseVersion}</name> | ||
<descriptionFile>${release-notes-file-name}</descriptionFile> | ||
<draft>true</draft> | ||
<assets> | ||
<fileSet> | ||
<directory>${release-installer-stage-dir}</directory> | ||
<includes> | ||
<include>${release-zip-installer-name}</include> | ||
<include>${release-tgz-installer-name}</include> | ||
</includes> | ||
</fileSet> | ||
</assets> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
<id>zip</id> | ||
<formats> | ||
<format>zip</format> | ||
<format>tar.gz</format> | ||
</formats> | ||
|
||
<fileSets> | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
installers? or installer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a second installer with a tar.gz extension