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
chore(cli): Implement gha generate cli release #26294
Changes from 119 commits
466497b
a11fc67
25b1e0c
a247184
ff53c1b
cd58610
559f0fc
afca953
2c1f05d
55176fd
9eb4065
2fbe8f7
27c38bb
1d99cf6
500c009
e036af1
8fc73a9
9a0e04a
5abbd0c
3366a42
9600835
b255212
e9daec6
4c1c736
5b33dc2
5ecc456
efdb49a
d990f70
3c19581
a3e2cdb
534ce43
c5f8e7a
e8e2b6f
0f2c617
0eab78d
b365232
8575411
0e8a3a5
489799e
a278db7
05d0ec8
25ae8a0
ba6d73d
601fc4e
2420663
6069650
f95d4e5
713575a
e62ae65
720210c
75ff143
f857c57
6585991
71fbddd
4be39e1
8951650
a946a21
c6818bb
f16b719
35a9e5f
729119e
09d9757
9c7bdbe
62b8c35
187f9e6
d5c7b78
35e1f07
1226677
7eeb9af
3975cda
85c5845
8dbabfb
9db60dc
5f97617
8c5ab31
4ce571f
fce8f02
1cd927b
1ce2d34
4cd8ecb
68ef39d
85f8a9d
ada10b8
ece1d71
a25ff05
3c4c615
201f4da
8629cf8
240ce0c
5d49c47
f5356f8
c2be9ef
fbb1929
b16441d
28be913
951b1b3
ed13573
fa739af
52d06ea
d404e9c
45741a7
25fc007
c8bf123
65e983d
00293fb
75c3208
40ccd97
9828a2c
e7e3418
e780a4b
727c492
f7c3e3f
9fae4fd
ad285d8
a639953
189120f
075e85a
36301b7
d41700e
771e0ee
1950ae1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,26 +5,143 @@ on: | |
version: | ||
description: 'Release version' | ||
required: true | ||
next: | ||
description: 'Next version' | ||
skipTests: | ||
description: 'Skip tests' | ||
default: true | ||
required: false | ||
packageType: | ||
description: 'Package type' | ||
default: 'uber-jar' | ||
required: false | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
JAVA_VERSION: 11 | ||
JAVA_DISTRO: temurin | ||
NEXT_VERSION: '1.0.0-SNAPSHOT' | ||
|
||
jobs: | ||
precheck: | ||
name: Pre-check | ||
runs-on: ubuntu-latest | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.vars.outputs.RELEASE_VERSION }} | ||
NEXT_VERSION: ${{ steps.vars.outputs.NEXT_VERSION }} | ||
RELEASE_VERSION: ${{ steps.version.outputs.RELEASE_VERSION }} | ||
NEXT_VERSION: ${{ steps.version.outputs.NEXT_VERSION }} | ||
HEAD: ${{ steps.version.outputs.HEAD }} | ||
steps: | ||
- name: Print inputs | ||
id: vars | ||
- name: Log GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: ${{ env.JAVA_DISTRO }} | ||
|
||
- name: Cache Maven | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Setup git config | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "actions@github.com" | ||
|
||
- name: Set release version | ||
id: version | ||
working-directory: ${{ github.workspace }}/tools/dotcms-cli | ||
run: | | ||
RELEASE_VERSION=${{ github.event.inputs.version }} | ||
NEXT_VERSION=${{ github.event.inputs.next }} | ||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT | ||
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_OUTPUT | ||
NEXT_VERSION=${{ env.NEXT_VERSION }} | ||
HEAD=${{ github.ref_name }} | ||
|
||
./mvnw -B -ntp versions:set versions:commit -DnewVersion=$RELEASE_VERSION | ||
|
||
git commit --allow-empty -a -m "🏁 Releasing version $RELEASE_VERSION" | ||
git push origin "$HEAD" | ||
|
||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" | ||
echo "NEXT_VERSION=$NEXT_VERSION" >> "$GITHUB_OUTPUT" | ||
echo "HEAD=$HEAD" >> "$GITHUB_OUTPUT" | ||
|
||
release: | ||
needs: [ precheck ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ needs.precheck.outputs.HEAD }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: ${{ env.JAVA_DISTRO }} | ||
|
||
- name: Cache Maven | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Prepare dotCMS license | ||
env: | ||
DOTCMS_LICENSE_KEY: ${{ secrets.DOTCMS_LICENSE }} | ||
run: | | ||
DOTCMS_LICENSE_PATH=${GITHUB_WORKSPACE}/tools/dotcms-cli/license | ||
mkdir -p ${DOTCMS_LICENSE_PATH} | ||
echo "${DOTCMS_LICENSE_KEY}" > ${DOTCMS_LICENSE_PATH}/license.dat | ||
echo "DOTCMS_LICENSE_FILE=${DOTCMS_LICENSE_PATH}/license.dat" >> "$GITHUB_ENV" | ||
|
||
- name: Build distribution | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Really with the multi-module build we should not replicate the mvnw executables and .mvn folder in the sub modules and rely on the top level version using relative path where required, otherwise, we may end up with inconsistencies in version when run through full build. |
||
./mvnw clean install -Dtest.failure.ignore=true -DskipTests=${{ github.event.inputs.skipTests }} -am -pl :dotcms-cli | ||
|
||
- name: Package distribution | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
./mvnw package -Dquarkus.package.type=${{ github.event.inputs.packageType }} -DskipTests=true -pl :dotcms-cli | ||
|
||
- name: Releaser | ||
env: | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
JRELEASER_PROJECT_VERSION: ${{ needs.precheck.outputs.VERSION }} | ||
JRELEASER_ARTIFACTORY_USERNAME: ${{ secrets.EE_REPO_USERNAME }} | ||
JRELEASER_ARTIFACTORY_PASSWORD: ${{ secrets.EE_REPO_PASSWORD }} | ||
JRELEASER_SLACK_WEBHOOK: ${{ secrets.RELEASE_SLACK_WEBHOOK }} | ||
JRELEASER_SLACK_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
tools/dotcms-cli/mvnw -B -Prelease jreleaser:full-release -Djreleaser.git.root.search=true -pl :dotcms-cli-parent -Dmaven.plugin.validation=VERBOSE | ||
|
||
- name: Setup git config | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "actions@github.com" | ||
|
||
- name: Set next version | ||
working-directory: ${{ github.workspace }}/tools/dotcms-cli | ||
run: | | ||
RELEASE_VERSION=${{ needs.precheck.outputs.RELEASE_VERSION }} | ||
NEXT_VERSION=${{ needs.precheck.outputs.NEXT_VERSION }} | ||
HEAD=${{ needs.precheck.outputs.HEAD }} | ||
|
||
./mvnw -B -ntp versions:set versions:commit -DnewVersion=$NEXT_VERSION | ||
|
||
git commit --allow-empty -a -m "⬆️ Next version $NEXT_VERSION" | ||
git push origin "$HEAD" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
|
||
|
||
import { DotSafeHtmlPipe } from './dot-safe-html/dot-safe-html.pipe'; | ||
|
||
@NgModule({ | ||
declarations: [ DotSafeHtmlPipe], | ||
exports: [ DotSafeHtmlPipe] | ||
declarations: [DotSafeHtmlPipe], | ||
exports: [DotSafeHtmlPipe] | ||
}) | ||
export class DotPipesModule {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './dot-diff/dot-diff.pipe'; | ||
export * from './dot-filter/dot-filter.pipe'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,18 @@ | |
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<compiler-plugin.version>3.8.1</compiler-plugin.version> | ||
<failsafe.useModulePath>false</failsafe.useModulePath> | ||
<maven.compiler.release>11</maven.compiler.release> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> | ||
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> | ||
<quarkus.platform.version>2.9.1.Final</quarkus.platform.version> | ||
<testcontainers.version>1.17.6</testcontainers.version> | ||
<failsafe-plugin.version>3.0.0-M5</failsafe-plugin.version> | ||
<test.failure.ignore>false</test.failure.ignore> | ||
<maven.plugin.jar.version>3.3.0</maven.plugin.jar.version> | ||
<immutables.version>2.8.2</immutables.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although we are not sharing the application bom because of of the use of quarkus, we still do not want duplication and different versions of some dependencies. e.g. in the main project we are using immutables 2.9.0. The way to handle this is to define the property in the parent/pom.xml which is shared and used in bom/application/pom.xml and in here. Only use a different version if we need to use a higher version here but are unable to due to other dependencies in core or other conficts with the version due to quarkus. |
||
<google.findbugs.version>3.0.2</google.findbugs.version> | ||
<jackson.module.model.version>1.2.2</jackson.module.model.version> | ||
<jackson.datatype.guava.version>2.13.3</jackson.datatype.guava.version> | ||
<docker.output.image.name>dotcms/dotcms-test</docker.output.image.name> | ||
<docker.version.tag>${project.version}</docker.version.tag> | ||
<testcontainers.docker.image>${docker.output.image.name}/${docker.version.tag}</testcontainers.docker.image> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
|
@@ -40,6 +36,7 @@ | |
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
|
@@ -53,7 +50,7 @@ | |
<dependency> | ||
<groupId>org.immutables</groupId> | ||
<artifactId>value</artifactId> | ||
<version>2.8.2</version> | ||
<version>${immutables.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
|
@@ -67,7 +64,7 @@ | |
<dependency> | ||
<groupId>com.google.code.findbugs</groupId> | ||
<artifactId>jsr305</artifactId> | ||
<version>3.0.2</version> | ||
<version>${google.findbugs.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
|
@@ -78,12 +75,18 @@ | |
<dependency> | ||
<groupId>com.github.jonpeterson</groupId> | ||
<artifactId>jackson-module-model-versioning</artifactId> | ||
<version>1.2.2</version> | ||
<version>${jackson.module.model.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-guava</artifactId> | ||
<version>2.13.3</version> | ||
<version>${jackson.datatype.guava.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.checkerframework</groupId> | ||
<artifactId>checker-qual</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
|
@@ -154,7 +157,6 @@ | |
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${compiler-plugin.version}</version> | ||
<configuration> | ||
<compilerArgs> | ||
<arg>-parameters</arg> | ||
|
@@ -165,7 +167,6 @@ | |
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${failsafe-plugin.version}</version> | ||
<configuration> | ||
<testFailureIgnore>${test.failure.ignore}</testFailureIgnore> | ||
</configuration> | ||
|
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.
We use a different cache structure for .m2 we would need to follow to be able to use cache created by main maven workflow. Change all the places this is used