Skip to content

Commit

Permalink
Deploy metadata to maven
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdenise committed Jan 15, 2025
1 parent 7e1b1c3 commit 6abf5b9
Show file tree
Hide file tree
Showing 12 changed files with 703 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review]

env:
WILDFLY_GLOW: https://github.com/wildfly/wildfly-glow/releases/download/1.2.0.Beta1/wildfly-glow-1.2.0.Beta1.zip
WILDFLY_GLOW: https://github.com/wildfly/wildfly-glow/releases/download/1.3.0.Final/wildfly-glow-1.3.0.Final.zip
jobs:
build:
name: ${{ matrix.os }}-jdk${{ matrix.java }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'release'
types: [opened, synchronize, reopened, ready_for_review]
env:
WILDFLY_GLOW: https://github.com/wildfly/wildfly-glow/releases/download/1.2.0.Beta1/wildfly-glow-1.2.0.Beta1.zip
WILDFLY_GLOW: https://github.com/wildfly/wildfly-glow/releases/download/1.3.0.Final/wildfly-glow-1.3.0.Final.zip
jobs:
WildFly-build:
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build.yml@main
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/docs/target/
maven/docs/target/

# Igore IDEA files
.idea
maven/maven-metadata/target/
8 changes: 4 additions & 4 deletions add-wildfly-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ function addVersions() {
echo "$dir/versions.yaml file: adding ${newVersion} version"
sed -i "/^versions=*/s/$/, ${newVersion}/" "$dir/versions.yaml"

if [ -d "$dir/docs" ]; then
if [ -d "$dir/maven/docs" ]; then
if [ "$stability" = "Final" ]; then
echo "Generating documentation..."
cd $dir/maven/docs
# generate doc
cd $dir/docs
mvn clean install
cd $dir/..
echo "Documentation has been generated in docs/index.html"
cd $dir/../..
echo "Documentation has been generated in maven/docs/index.html"
fi
fi
fi
Expand Down
20 changes: 20 additions & 0 deletions deploy-maven-metadata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

echo "Deploying the maven metadata to nexus repository manager, tagging the repository and pushing to upstream..."

cd maven/maven-metadata
git pull --rebase upstream release

mvn build-helper:parse-version versions:set -DnewVersion='${parsedVersion.nextMajorVersion}.0' versions:commit
metadataVersion=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)

git add pom.xml
git commit -m "Maven metadata $metadataVersion"
git tag $metadataVersion

mvn clean deploy
echo "Maven metadata $metadataVersion has been deployed to the maven repo manager, make sure to log to the repo manager, close and release the repo."

git push upstream release
git push upstream $metadataVersion
echo "Maven metadata $metadataVersion has been deployed, repository has been tagged"
File renamed without changes.
565 changes: 563 additions & 2 deletions docs/index.html → maven/docs/index.html

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/pom.xml → maven/docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly.galleon.feature-packs</groupId>
<artifactId>wildfly-galleon-feature-packs-parent</artifactId>
<version>1.0</version>
</parent>
<groupId>org.wildfly.galleon.feature.packs</groupId>
<artifactId>wildfly-galleon-feature-packs-doc</artifactId>
<version>1.0.0.Final</version>
Expand All @@ -30,7 +34,6 @@
<properties>
<ec2-pub-ip-dash>1-2-3-4</ec2-pub-ip-dash>
<ec2-pub-ip>1.2.3.4</ec2-pub-ip>
<version.org.wildfly.glow>1.2.0.Beta1</version.org.wildfly.glow>
<version.org.asciidoctor>2.0.0</version.org.asciidoctor>
</properties>

Expand Down Expand Up @@ -75,7 +78,7 @@
<rulesPropertiesFile>${basedir}/rules.properties</rulesPropertiesFile>
<generateRuleDescriptions>true</generateRuleDescriptions>
<generateKnownFeaturePacks>true</generateKnownFeaturePacks>
<repoPath>${basedir}/..</repoPath>
<repoPath>${basedir}/../..</repoPath>
</configuration>
<executions>
<execution>
Expand Down
File renamed without changes.
56 changes: 56 additions & 0 deletions maven/maven-metadata/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2020 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wildfly.galleon.feature-packs</groupId>
<artifactId>wildfly-galleon-feature-packs-parent</artifactId>
<version>1.0</version>
</parent>
<groupId>org.wildfly.galleon.feature-packs</groupId>
<artifactId>wildfly-galleon-feature-packs-metadata</artifactId>
<version>1.0</version>
<packaging>pom</packaging>

<name>WildFly Galleon feature-packs maven metadata</name>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.glow</groupId>
<artifactId>wildfly-glow-doc-plugin</artifactId>
<version>${version.org.wildfly.glow}</version>
<configuration>
<targetDir>${basedir}/target</targetDir>
<repoPath>${basedir}/../..</repoPath>
</configuration>
<executions>
<execution>
<id>generate-maven-metadata</id>
<goals>
<goal>generate-maven-metadata</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
36 changes: 36 additions & 0 deletions maven/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2020 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>36</version>
</parent>
<groupId>org.wildfly.galleon.feature-packs</groupId>
<artifactId>wildfly-galleon-feature-packs-parent</artifactId>
<version>1.0</version>
<packaging>pom</packaging>

<name>WildFly Galleon feature-packs parent</name>
<properties>
<version.org.wildfly.glow>1.3.0.Final</version.org.wildfly.glow>
</properties>
</project>
20 changes: 14 additions & 6 deletions release_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ We are also preparing a new SNAPSHOT version (if needed). It all depends on the

The steps detailed here are fully automated in the script `add-wildfly-release.sh <new release version>` that you should execute to create a new release.

## Steps for Beta releases:
## Steps to add a new WildFly release

* Call `sh add-wildfly-release.sh <new release version>`
* Review the changes, commit, open PR against the `release` branch, merge when green.
* Call `sh deploy-maven-metadata.sh` WARNING: This script deploy the maven metadata to nexus repository manager, update, commit and push to the upstream release branch
* Log into the nexus repository manager, close/release the staged repository

## Details

### Steps for Beta releases:

* Add a new directory for the new WildFly version by copying the latest *.Beta1-SNAPSHOT directory and replacing the versions with the new released Beta version.
* Create the next *.Final-SNAPSHOT directory by copying the newly created directory and replacing the versions with the next *.Final-SNAPSHOT version.
Expand All @@ -18,7 +27,7 @@ don't contain issues that would imply to upgrade extra feature-packs for this ne
Beta and Final-SNAPSHOT files.
* Review your changes, commit and open PR against the release branch

## Steps for Final releases:
### Steps for Final releases:

* Add a new directory for the new WildFly version by copying the latest *.Final-SNAPSHOT directory and replacing the versions with the new released Final version.
* Create the next Major+1.0.0.Beta1-SNAPSHOT directory by copying the newly created directory and replacing the versions with the next Major+1.0.0.Beta1-SNAPSHOT version.
Expand All @@ -30,7 +39,7 @@ Beta and Final-SNAPSHOT files.
* Generate documentation: `cd docs; mvn clean install`
* Review your changes, commit and open PR against the release branch

## Steps for Micro releases:
### Steps for Micro releases:

* Add a new directory for the new WildFly version by copying the latest Major.Minor.Micro.Final-SNAPSHOT directory and replacing the versions with the new released Micro version.
* Add the new *.Final release to the list of releases in the `versions.yaml` file, field `versions`.
Expand All @@ -40,10 +49,9 @@ Beta and Final-SNAPSHOT files.
* Generate documentation: `cd docs; mvn clean install`
* Review your changes, commit and open PR against the release branch

## Steps for adding a SNAPSHOT.
### Steps for adding a SNAPSHOT.

Can occur if the main wildfly branch is updated to the new SNAPSHOT although the release is not yet ready (delay). This is required
to have the nightly SNAPSHOT CI to succeed.

* Add a new directory for the new SNAPSHOT WildFly version by copying the latest *.*-SNAPSHOT directory and replacing the versions with the X.X.X.[Beta1 | Final]-SNAPSHOT version.

* Add a new directory for the new SNAPSHOT WildFly version by copying the latest *.*-SNAPSHOT directory and replacing the versions with the X.X.X.[Beta1 | Final]-SNAPSHOT version.

0 comments on commit 6abf5b9

Please sign in to comment.