Skip to content

Commit

Permalink
fix(TCOMP-2260): merge TCOMP-2407
Browse files Browse the repository at this point in the history
  • Loading branch information
yyin-talend committed Apr 18, 2023
1 parent 6405480 commit c07b307
Show file tree
Hide file tree
Showing 11 changed files with 599 additions and 146 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ documentation/rebuildpdf.bat

# release process
.build/
.build_source/
.build_source/
# direnv
.envrc
.env
34 changes: 23 additions & 11 deletions .jenkins/scripts/docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,32 @@ set -xe
# Parameters:
# $1: docker tag version
# $2: should tag as latest
# $3: requested image, if not given, all will be pushed

tag="${1?Missing tag}"
latest="${2:-false}"
_TAG="${1?Missing tag}"
_IS_LATEST="${2-'false'}"
_ONLY_ONE_IMAGE="${3-''}"

dockerBuild() {
echo ">> Building and pushing $1:${tag}"
cd "images/${1}-image"
mvn package jib:build@build -Ddocker.talend.image.tag=${tag}
if [[ ${latest} == 'true' ]]; then
mvn package jib:build@build -Ddocker.talend.image.tag=latest
_IMAGE="${1}"
echo ">> Building and push $_IMAGE:${_TAG}"

mvn package jib:build@build \
--file "images/${_IMAGE}-image/pom.xml" \
--define docker.talend.image.tag="${_TAG}"

if [[ ${_IS_LATEST} == 'true' ]]; then
mvn package jib:build@build \
--file "images/${_IMAGE}-image/pom.xml" \
--define docker.talend.image.tag=latest
fi
cd ../..
}

dockerBuild "component-server"
dockerBuild "component-starter-server"
dockerBuild "remote-engine-customizer"
if [[ -n "${_ONLY_ONE_IMAGE}" ]]; then
dockerBuild "${_ONLY_ONE_IMAGE}"
else
dockerBuild "component-server"
dockerBuild "component-starter-server"
dockerBuild "remote-engine-customizer"
fi

584 changes: 477 additions & 107 deletions Jenkinsfile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ci/Jenkinsfile-scan
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final def veracodeCredentials = usernamePassword(
final def nexusCredentials = usernamePassword(
credentialsId: 'nexus-artifact-zl-credentials',
usernameVariable: 'NEXUS_USER',
passwordVariable: 'NEXUS_PASSWORD')
passwordVariable: 'NEXUS_PASS')

String git_branch_name = ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.talend.sdk.component.runtime.manager.service.MavenRepositoryResolver.M2_REPOSITORY;
import static org.talend.sdk.component.runtime.manager.service.MavenRepositoryResolver.STUDIO_MVN_REPOSITORY;
import static org.talend.sdk.component.runtime.manager.service.MavenRepositoryResolver.TALEND_COMPONENT_MANAGER_M2_REPOSITORY;
import static org.talend.sdk.component.runtime.manager.service.MavenRepositoryResolver.TALEND_COMPONENT_MANAGER_M2_SETTINGS;
Expand All @@ -39,6 +38,8 @@

class MavenRepositoryResolverTest {

static String M2_REPOSITORY = ".m2" + File.separator + "repository";

private final MavenRepositoryResolver resolver = new MavenRepositoryDefaultResolver();

final MavenRepositoryDefaultResolver mavenSettingsOnlyResolver = new MavenRepositoryDefaultResolver() {
Expand All @@ -63,7 +64,7 @@ public Path get(final String path) {
}
};

private final String fallback = System.getProperty("user.home") + "/" + M2_REPOSITORY;
private final String fallback = System.getProperty("user.home") + File.separator + M2_REPOSITORY;

private final Path repository = Paths.get(new File("target/test-classes").getAbsolutePath());

Expand Down Expand Up @@ -164,7 +165,8 @@ void discoverFromSettingsWindowsPath() {
mavenSettingsOnlyResolver.setHandler(handlerNoExistCheck);
final Path m2 = mavenSettingsOnlyResolver.discover();
assertNotNull(m2);
assertEquals("C:/Users/maven/repository", m2.toString());
assertEquals("C:" + File.separator + "Users" + File.separator + "maven" + File.separator + "repository",
m2.toString());
System.clearProperty(TALEND_COMPONENT_MANAGER_M2_SETTINGS);
}

Expand All @@ -174,7 +176,8 @@ void discoverFromSettingsTildePath() {
mavenSettingsOnlyResolver.setHandler(handlerNoExistCheck);
final Path m2 = mavenSettingsOnlyResolver.discover();
assertNotNull(m2);
assertEquals(System.getProperty("user.home") + "/mvn_home_dev/repository", m2.toString());
assertEquals(System.getProperty("user.home") + File.separator + "mvn_home_dev" + File.separator + "repository",
m2.toString());
System.clearProperty(TALEND_COMPONENT_MANAGER_M2_SETTINGS);
}

Expand All @@ -184,7 +187,8 @@ void discoverFromSettingsUserHomeProperty() {
mavenSettingsOnlyResolver.setHandler(handlerNoExistCheck);
final Path m2 = mavenSettingsOnlyResolver.discover();
assertNotNull(m2);
assertEquals(System.getProperty("user.home") + "/mvn_home_dev/repository", m2.toString());
assertEquals(System.getProperty("user.home") + File.separator + "mvn_home_dev" + File.separator + "repository",
m2.toString());
System.clearProperty(TALEND_COMPONENT_MANAGER_M2_SETTINGS);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@


== Version 1.56.0

=== Bug

- link:https://jira.talendforge.org/browse/TCOMP-2355[TCOMP-2355^]: Error on language support for xx_YY language files link:search.html?query=component-server[component-server^,role='dockey']



=== Work Item

- link:https://jira.talendforge.org/browse/TCOMP-2405[TCOMP-2405^]: Upgrade snakeyaml to 2.0 link:search.html?query=build[build^,role='dockey']

== Version 1.55.0

=== Bug
Expand Down Expand Up @@ -702,6 +714,14 @@






== Version 1.38.9

=== Work Item

- link:https://jira.talendforge.org/browse/TCOMP-2412[TCOMP-2412^]: Upgrade tomcat to 9.0.69 link:search.html?query=component-server[component-server^,role='dockey']

== Version 1.38.8

Expand Down Expand Up @@ -1481,12 +1501,6 @@




== Version 1.1.15.2

=== Work Item

- link:https://jira.talendforge.org/browse/TCOMP-1752[TCOMP-1752^]: Make component-runtime class loader find classes in RemoteEngine JobServer

== Version 1.1.15

Expand Down Expand Up @@ -1521,6 +1535,12 @@
- link:https://jira.talendforge.org/browse/TCOMP-1578[TCOMP-1578^]: Upgrade asciidoctor-pdf to v1.5.0-beta.7
- link:https://jira.talendforge.org/browse/TCOMP-1581[TCOMP-1581^]: Support JUnit5 meta annotations for our extensions

== Version 1.1.15.2

=== Work Item

- link:https://jira.talendforge.org/browse/TCOMP-1752[TCOMP-1752^]: Make component-runtime class loader find classes in RemoteEngine JobServer

== Version 1.1.15.1

=== New Feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name":"Romain Manni-Bucau"
},
{
"commits":689,
"commits":695,
"description":"Software engineer @Talend.\r\n\r\nComponents team member.\n\nBlog: undx.github.io",
"gravatar":"https://avatars.githubusercontent.com/u/265575?v=4",
"id":"undx",
Expand Down Expand Up @@ -50,7 +50,7 @@
"name":"ypiel"
},
{
"commits":27,
"commits":28,
"description":"",
"gravatar":"https://avatars.githubusercontent.com/u/7742508?v=4",
"id":"yyin-talend",
Expand All @@ -70,6 +70,13 @@
"id":"wwang-talend",
"name":"wang wei"
},
{
"commits":15,
"description":"QA Automation @ Talend Nantes",
"gravatar":"https://avatars.githubusercontent.com/u/1255625?v=4",
"id":"acatoire",
"name":"Axel CATOIRE"
},
{
"commits":10,
"description":"",
Expand Down Expand Up @@ -98,13 +105,6 @@
"id":"jsomsanith-tlnd",
"name":"Jimmy Somsanith"
},
{
"commits":8,
"description":"QA Automation @ Talend Nantes",
"gravatar":"https://avatars.githubusercontent.com/u/1255625?v=4",
"id":"acatoire",
"name":"Axel CATOIRE"
},
{
"commits":8,
"description":"",
Expand Down
5 changes: 5 additions & 0 deletions documentation/src/main/antora/site-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ content:
- '!component-runtime-1.38.5'
- '!component-runtime-1.38.6'
- '!component-runtime-1.38.7'
- '!component-runtime-1.38.8'
- '!component-runtime-1.39.0'
- '!component-runtime-1.39.1'
- '!component-runtime-1.39.2'
Expand All @@ -70,6 +71,10 @@ content:
- '!component-runtime-1.50.3'
- '!component-runtime-1.51.0'
- '!component-runtime-1.51.1'
- '!component-runtime-1.52.0'
- '!component-runtime-1.52.1'
- '!component-runtime-1.53.0'
- '!component-runtime-1.54.0'
branches:
- HEAD
start_path: documentation/src/main/antora
Expand Down
2 changes: 1 addition & 1 deletion images/component-server-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
<TALEND_COMPONENT_SERVER_MAVEN_REPOSITORY>${TALEND_HOME}/connectors</TALEND_COMPONENT_SERVER_MAVEN_REPOSITORY>
<TALEND_VAULT_CACHE_VAULT_DECRYPT_ENDPOINT>v1/tenants-keyrings/decrypt/{x-talend-tenant-id}</TALEND_VAULT_CACHE_VAULT_DECRYPT_ENDPOINT>
<CLASSPATH>${docker.talend.dir.base}component-kit/custom/*:${docker.talend.dir.base}custom/*:${TALEND_HOME}/extensions/*:${docker.talend.dir.app}resources:${docker.talend.dir.app}classes</CLASSPATH>
<JDK_JAVA_OPTIONS>--add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED -Dlog4j.configurationFile=${docker.talend.dir.app}conf/log4j2-component-server-TEXT.xml</JDK_JAVA_OPTIONS>
<JDK_JAVA_OPTIONS>--add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.net.nio=ALL-UNNAMED -Dlog4j.configurationFile=${docker.talend.dir.app}conf/log4j2-component-server-TEXT.xml</JDK_JAVA_OPTIONS>
</environment>
<labels>
<com.talend.docker.cmd>docker run -d -p ${docker.image.port}:${docker.image.port} ${docker.image.to}</com.talend.docker.cmd>
Expand Down
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,19 @@
</build>

<profiles>
<profile>
<id>private_repository</id>
<!--
This profile is used by the CI or for development branch deployment.
Its overwrite the snapshotRepository with a private one.
-->
<distributionManagement>
<snapshotRepository>
<id>talend.snapshots</id>
<url>https://artifacts-zl.talend.com/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>travis</id>
<properties>
Expand Down
36 changes: 31 additions & 5 deletions reporting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<!--
documentation.skip is false by default
It is useful in case you want to build the whole project without the documentation.
Example: The CI is using it on developers branches.
If set to false, the "documentation" maven profile will not be used.
-->
<documentation.skip>false</documentation.skip>
</properties>

<dependencies>
Expand Down Expand Up @@ -187,11 +194,6 @@
<artifactId>remote-engine-customizer-image</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.talend.sdk.component</groupId>
<artifactId>documentation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.talend.sdk.component</groupId>
<artifactId>talend-component-kit-intellij-plugin</artifactId>
Expand Down Expand Up @@ -241,4 +243,28 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>documentation</id>
<!--
This profile can be controlled with "documentation.skip" property in case you want to build
the whole project with/without the documentation.
-->
<activation>
<property>
<name>documentation.skip</name>
<value>false</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.talend.sdk.component</groupId>
<artifactId>documentation</artifactId>
<version>${project.version}</version>
<optional>${documentation.skip}</optional>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

0 comments on commit c07b307

Please sign in to comment.