Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 39 additions & 18 deletions .jenkins/jenkins_pod.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,54 @@

apiVersion: v1
kind: Pod
spec:
##
imagePullSecrets:
- name: talend-registry
##
containers:
- name: main
##
- name: docker-daemon # Container that hosts the Docker daemon/socket
image: artifactory.datapwn.com/docker-io-remote/docker:24.0.7-dind-rootless # Rootless versions
command:
- 'dockerd-entrypoint.sh' # Override entry point to add parameters
args:
- '--tls=false' # De-activate TLS (not possible in rootless mode)
env:
- name: DOCKER_TLS_CERTDIR # Don't generate the certificate since it's not used (faster startup)
value: ""
securityContext:
privileged: true # Needed to bootstrap the Docker image. as rootless, it uses a non-root user at startup
###
- name: main # default container for jenkins job execution
# 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'
# If you use this pod you will be jenkins user
# TSBI customBuilder documentation: https://github.com/Talend/tsbi-images/blob/main/tsbi/custom-builder/README.md
image: 'artifactory.datapwn.com/tlnd-docker-dev/talend/common/tsbi/custom-builder:4.0.24-20241016140323'
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 }
{ name: efs-jenkins-component-runtime-m2-rootless,
mountPath: /home/jenkins/.m2/repository },
{ name: efs-jenkins-connectors-asdf-rootless,
mountPath: /home/jenkins/.asdf/installs},
]
resources: {requests: {memory: 6G, cpu: '4.0'}, limits: {memory: 8G, cpu: '5.0'}}
resources: { requests: { memory: 5G, cpu: '2' } }
env:
- name: DOCKER_HOST
- name: DOCKER_HOST # Points the Docker client to the socket hosted by the docker-daemon container (see below)
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
readinessProbe:
exec:
command:
- docker
- info
initialDelaySeconds: 5
periodSeconds: 5
##
volumes: # Persistent volumes stored under Amazon Elastic File System (efs) defined in flux
- name: efs-jenkins-component-runtime-m2-rootless
persistentVolumeClaim:
claimName: efs-jenkins-component-runtime-m2
- name: efs-jenkins-connectors-asdf
claimName: efs-jenkins-component-runtime-m2-rootless
- name: efs-jenkins-connectors-asdf-rootless
persistentVolumeClaim:
claimName: efs-jenkins-connectors-asdf
claimName: efs-jenkins-connectors-asdf-rootless
12 changes: 8 additions & 4 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-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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 @@ -30,17 +30,21 @@ 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"
printf ">>The image will be tagged as LATEST\n"
fi

local skip_for_docker_build="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip -Dspotless.skip=true"

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

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

Expand Down
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-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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
44 changes: 0 additions & 44 deletions .jenkins/scripts/git_login.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .jenkins/scripts/mvn-ossindex-audit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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,7 +19,7 @@ set -xe

main() (

mvn ossindex:audit-aggregate -pl '!bom' \
mvn ossindex:audit-aggregate \
--define ossindex.fail=false \
--define ossindex.reportFile=target/audit.txt \
--settings .jenkins/settings.xml
Expand Down
5 changes: 3 additions & 2 deletions .jenkins/scripts/mvn_dependency_updates_report.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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,7 +19,8 @@ set -xe

main() (

mvn versions:dependency-updates-report versions:plugin-updates-report -pl '!bom'
mvn versions:dependency-updates-report versions:plugin-updates-report \
--settings .jenkins/settings.xml

)

Expand Down
42 changes: 0 additions & 42 deletions .jenkins/scripts/mvn_sonar_branch.sh

This file was deleted.

53 changes: 0 additions & 53 deletions .jenkins/scripts/mvn_sonar_pr.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .jenkins/scripts/npm_fix.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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
2 changes: 1 addition & 1 deletion .jenkins/scripts/package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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
2 changes: 1 addition & 1 deletion .jenkins/scripts/post-release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

#
# Copyright (C) 2006-2024 Talend Inc. - www.talend.com
# Copyright (C) 2006-2025 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
47 changes: 47 additions & 0 deletions .jenkins/scripts/release/release-2-prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
#
# Copyright (C) 2006-2025 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

# Parameters:
# $1: release version
# $2: next version
# $3: tag name
# $4: extra build args for all mvn cmd
main() {
local releaseVersion="${1?Missing release version}"; shift
local nextVersion="${1?Missing actual project version}"; shift
local tagName="${1?Missing actual project version}"; shift
local extraBuildParams=("$@")

printf ">> Maven prepare release %s (next-dev: %s; tag: %s)\n" "${releaseVersion}" "${nextVersion}" "${tagName}"

local release_profiles="release,ossrh,gpg2"

mvn release:prepare \
--batch-mode \
--errors \
--define tag="${tagName}" \
--define releaseVersion="${releaseVersion}" \
--define developmentVersion="${nextVersion}" \
--define arguments="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip" \
--settings .jenkins/settings.xml \
--activate-profiles "$release_profiles" \
"${extraBuildParams[@]}"
}

main "$@"
Loading
Loading