Skip to content

Commit

Permalink
Merge branch 'master' into jmfrancois/chore/update-webapps-dependencies
Browse files Browse the repository at this point in the history
# Conflicts:
#	component-tools-webapp/src/main/frontend/package-lock.json
#	component-tools-webapp/src/main/frontend/package-template.json
#	pom.xml
  • Loading branch information
undx committed Nov 16, 2023
2 parents 7973cdf + 4410cfd commit 3205474
Show file tree
Hide file tree
Showing 2,198 changed files with 62,731 additions and 28,364 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2006-2018 Talend Inc. - www.talend.com
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/maven.yml_disable
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,7 @@ jobs:
-e -B \
-gs .travis/settings.xml \
-pl images/component-server-image \
-pl images/component-server-vault-proxy-image \
-am &&
cd images/component-server-vault-proxy-image &&
mvn clean install jib:build@build \
-e -B \
-gs ../../.travis/settings.xml \
-Dtalend.server.image.registry=registry.hub.docker.com/ \
-Possrh -Prelease -Ptravis -Pgpg2 \
-Dspotless.apply.skip=true -Dcheckstyle.skip=true -Drat.skip=true -DskipTests -Dinvoker.skip=true &&
cd - &&
cd images/component-server-image &&
mvn clean install jib:build@build \
Expand Down
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
33 changes: 33 additions & 0 deletions .jenkins/jenkins_pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v1
kind: Pod
spec:
imagePullSecrets:
- name: talend-registry
containers:
- name: main
# 3.0.9-20220930152032 is the last root version of custom-builder
image: 'artifactory.datapwn.com/tlnd-docker-dev/talend/common/tsbi/custom-builder:3.0.9-20220930152032'
command: [ cat ]
tty: true
volumeMounts: [
{ name: efs-jenkins-component-runtime-m2, mountPath: /root/.m2/repository},
{ name: efs-jenkins-connectors-asdf, mountPath: /root/.asdf/installs, subPath: installs }
]
resources: {requests: {memory: 6G, cpu: '4.0'}, limits: {memory: 8G, cpu: '5.0'}}
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
- name: docker-daemon
image: artifactory.datapwn.com/docker-io-remote/docker:19.03.1-dind
env:
- name: DOCKER_TLS_CERTDIR
value: ""
securityContext:
privileged: true
volumes:
- name: efs-jenkins-component-runtime-m2
persistentVolumeClaim:
claimName: efs-jenkins-component-runtime-m2
- name: efs-jenkins-connectors-asdf
persistentVolumeClaim:
claimName: efs-jenkins-connectors-asdf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (C) 2006-2021 Talend Inc. - www.talend.com
#!/usr/bin/env bash
#
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,6 +13,14 @@
# 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.
name: blog
title: Talend Component Kit Blog
version: master
#

set -xe

main() {
asdf install
asdf reshim
asdf current
}

main "$@"
49 changes: 32 additions & 17 deletions .jenkins/scripts/docker_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2021 Talend Inc. - www.talend.com
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,21 +19,36 @@ set -xe

# Parameters:
# $1: docker tag version
main() {
local tag="${1?Missing tag}"

echo ">> Building and pushing component-server:${tag}"
cd images/component-server-image
mvn verify dockerfile:build -P ci-tsbi
docker tag "talend/common/tacokit/component-server:${tag}" "artifactory.datapwn.com/tlnd-docker-dev/talend/common/tacokit/component-server:${tag}"
docker push "artifactory.datapwn.com/tlnd-docker-dev/talend/common/tacokit/component-server:${tag}"
echo ">> Building and pushing component-server-vault-proxy:${tag}"
cd ../component-server-vault-proxy-image
mvn verify dockerfile:build -P ci-tsbi
docker tag "talend/common/tacokit/component-server-vault-proxy:${tag}" "artifactory.datapwn.com/tlnd-docker-dev/talend/common/tacokit/component-server-vault-proxy:${tag}"
docker push "artifactory.datapwn.com/tlnd-docker-dev/talend/common/tacokit/component-server-vault-proxy:${tag}"
#TODO starter and remote-engine-customizer
cd ../..
# $2: should tag as latest (true/false) default is false
# $3: requested image, if not given, all will be pushed

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

dockerBuild() {
_IMAGE="${1}"
printf ">> Building and push %s:%s\n" "{$_IMAGE}" "${_TAG}"
if [[ ${_IS_LATEST} == 'true' ]]; then
printf ">>THe image will be tagged as LATEST\n"
fi

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
}

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

2 changes: 1 addition & 1 deletion .jenkins/scripts/docker_login.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2021 Talend Inc. - www.talend.com
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
14 changes: 13 additions & 1 deletion .jenkins/scripts/git_login.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2021 Talend Inc. - www.talend.com
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -27,6 +27,18 @@ main() {
git config --global credential.username ${username}
git config --global credential.helper '!echo password=${password}; echo'
git config --global credential.name "jenkins-build"

{
printf "machine github.com\n"
printf "login %s\n" "${username}"
printf "password %s\n" "${password}"

printf "machine api.github.com\n"
printf "login %s\n" "${username}"
printf "password %s\n" "${password}"
} > ~/.netrc

chmod 600 ~/.netrc
}

main "$@"
42 changes: 42 additions & 0 deletions .jenkins/scripts/mvn_sonar_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# 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.
#

set -xe

# Execute sonar analysis
# $1: Sonar analyzed branch
# $@: the extra parameters to be used in the maven commands
main() (
branch="${1?Missing branch name}"; shift
extraBuildParams=("$@")

declare -a LIST_FILE_ARRAY=( $(find $(pwd) -type f -name 'jacoco.xml') )
LIST_FILE=$(IFS=, ; echo "${LIST_FILE_ARRAY[*]}")

# Why sonar plugin is not declared in pom.xml: https://blog.sonarsource.com/we-had-a-dream-mvn-sonarsonar
# TODO https://jira.talendforge.org/browse/TDI-48980 (CI: Reactivate Sonar cache)
mvn sonar:sonar \
--define 'sonar.host.url=https://sonar-eks.datapwn.com' \
--define "sonar.login=${SONAR_LOGIN}" \
--define "sonar.password=${SONAR_PASSWORD}" \
--define "sonar.branch.name=${branch}" \
--define "sonar.coverage.jacoco.xmlReportPaths='${LIST_FILE}'" \
--define "sonar.analysisCache.enabled=false" \
"${extraBuildParams[@]}"
)

main "$@"
53 changes: 53 additions & 0 deletions .jenkins/scripts/mvn_sonar_pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# 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.
#

set -xe

# Execute sonar analysis
# $1: Sonar analyzed branch
# $2: Sonar target branch for compare
# $3: PR id
# $@: the extra parameters to be used in the maven commands
main() (
branch="${1?Missing branch name}"; shift
target_branch="${1?Missing target branch name}"; shift
pull_request_id="${1?Missing pull request id}"; shift
extraBuildParams=("$@")

declare -a LIST_FILE_ARRAY=( $(find $(pwd) -type f -name 'jacoco.xml') )
LIST_FILE=$(IFS=, ; echo "${LIST_FILE_ARRAY[*]}")

# Fetch target branch for Sonar diff purpose
git fetch origin "${target_branch}":"${target_branch}"

# Why sonar plugin is not declared in pom.xml: https://blog.sonarsource.com/we-had-a-dream-mvn-sonarsonar
# TODO https://jira.talendforge.org/browse/TDI-48980 (CI: Reactivate Sonar cache)
mvn sonar:sonar \
--define 'sonar.host.url=https://sonar-eks.datapwn.com' \
--define "sonar.login=${SONAR_LOGIN}" \
--define "sonar.password=${SONAR_PASSWORD}" \
--define "sonar.coverage.jacoco.xmlReportPaths='${LIST_FILE}'" \
--define "sonar.analysisCache.enabled=false" \
--define "sonar.pullrequest.branch=${branch}" \
--define "sonar.pullrequest.base=${target_branch}" \
--define "sonar.pullrequest.key=${pull_request_id}" \
"${extraBuildParams[@]}"


)

main "$@"
33 changes: 33 additions & 0 deletions .jenkins/scripts/npm_fix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# 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.
#

set -xe
#
# Correct npm behavior https://docs.npmjs.com/cli/v7/using-npm/scripts#user
# > When npm is run as root, scripts are always run with the effective uid and gid of the working directory owner.
#
# As build is run under root, target folder is created and owned by root.
# But, as specified above, the npm process takes the uid/guid of cwd ie as talend (1000), so when generating
# documentation via antora the process fails w/ :
# FATAL (antora): EACCES: permission denied, mkdir '.../documentation/target/documentation-1.43.0-SNAPSHOT/main'
#
# TODO: check for other modules using npm
# - component-tools
# - component-tools-webapp
# - component-starter-server
#
chown -R $(id -u):$(id -g) documentation
29 changes: 29 additions & 0 deletions .jenkins/scripts/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# 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.
#

set -xe

# This script allow to package the current project with maven on specific jenkins provided settings.xml
# You can provide extra parameters to tune maven
# $1: extra_mvn_parameters
main() {
_EXTRA_MVN_PARAMETERS=("$@")

mvn package --batch-mode --settings .jenkins/settings.xml ${_EXTRA_MVN_PARAMETERS[*]}
}

main "$@"
6 changes: 3 additions & 3 deletions .jenkins/scripts/post-release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash
#!/usr/bin/env bash

#
# Copyright (C) 2006-2021 Talend Inc. - www.talend.com
# Copyright (C) 2006-2023 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,7 @@ git checkout -b component-runtime-$release component-runtime-$release
# push docker images
echo "Building and pushing docker images $release"
cd images
for i in component-server-image component-server-vault-proxy-image component-starter-server-image; do
for i in component-server-image component-starter-server-image; do
cd $i
mvn -DskipTests -Dinvoker.skip=true -T1C -Prelease \
clean install \
Expand Down
Loading

0 comments on commit 3205474

Please sign in to comment.