[Jenkins setup]
Jenkins: 2.492.2
OS: Windows 11 - 10.0
Java: 21.0.6 - Oracle Corporation (Java HotSpot(TM) 64-Bit Server VM)
ant:513.vde9e7b_a_0da_0f
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
asm-api:9.7.1-129.vf5618e98eed1
bitbucket:263.v7f6ef03c9ef8
bootstrap5-api:5.3.3-2
bouncycastle-api:2.30.1.80-256.vf98926042a_9b_
branch-api:2.1214.v3f652804588d
build-timeout:1.37
caffeine-api:3.2.0-166.v72a_6d74b_870f
checks-api:367.v18b_7f530e54a_
cloudbees-folder:6.999.v42253c105443
commons-lang3-api:3.17.0-87.v5cf526e63b_8b_
commons-text-api:1.13.0-153.v91dcd89e2a_22
credentials:1413.va_51c53703df1
credentials-binding:687.v619cb_15e923f
dark-theme:524.vd675b_22b_30cb_
display-url-api:2.209.v582ed814ff2f
durable-task:587.v84b_877235b_45
echarts-api:5.6.0-2
eddsa-api:0.3.0.1-19.vc432d923e5ee
email-ext:1876.v28d8d38315b_d
font-awesome-api:6.7.2-1
git:5.7.0
git-client:6.1.2
github:1.42.0
github-api:1.321-486.vd7fa_ef919b_48
github-branch-source:1810.v913311241fa_9
gradle:2.14.1
gson-api:2.12.1-113.v347686d6729f
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:82.v0597178874e1
jackson2-api:2.18.3-402.v74c4eb_f122b_2
jakarta-activation-api:2.1.3-2
jakarta-mail-api:2.1.3-2
javax-activation-api:1.2.0-8
jaxb:2.3.9-133.vb_ec76a_73f706
jjwt-api:0.11.5-120.v0268cf544b_89
joda-time-api:2.13.1-115.va_6b_5f8efb_1d8
jquery3-api:3.7.1-3
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250107-125.v28b_a_ffa_eb_f01
json-path-api:2.9.0-148.v22a_7ffe323ce
junit:1319.v000471ca_e5e2
ldap:780.vcb_33c9a_e4332
mailer:489.vd4b_25144138f
matrix-auth:3.2.5
matrix-project:847.v88a_f90ff9f20
mercurial:1309.v6802b_f0efb_b_9
metrics:4.2.21-464.vc9fa_a_0d6265d
mina-sshd-api-common:2.14.0-143.v2b_362fc39576
mina-sshd-api-core:2.14.0-143.v2b_362fc39576
okhttp-api:4.11.0-183.va_87fc7a_89810
pam-auth:1.12
pipeline-build-step:557.v95d96f77b_2b_8
pipeline-github-lib:65.v203688e7727e
pipeline-graph-analysis:235.vb_a_a_36b_f248c2
pipeline-graph-view:423.v765c49ca_da_3f
pipeline-groovy-lib:752.vdddedf804e72
pipeline-input-step:517.vf8e782ee645c
pipeline-milestone-step:127.vb_52887ca_3b_6d
pipeline-model-api:2.2247.va_423189a_7dff
pipeline-model-definition:2.2247.va_423189a_7dff
pipeline-model-extensions:2.2247.va_423189a_7dff
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2247.va_423189a_7dff
plain-credentials:195.vb_906e9073dee
plugin-util-api:6.1.0
resource-disposer:0.25
scm-api:704.v3ce5c542825a_
script-security:1373.vb_b_4a_a_c26fa_00
snakeyaml-api:2.3-125.v4d77857a_b_402
ssh-agent:384.ve275343791a_6
ssh-credentials:355.v9b_e5b_cde5003
ssh-slaves:3.1031.v72c6b_883b_869
structs:343.vdcf37b_a_c81d5
theme-manager:278.v2e3c063e42cc
timestamper:1.28
token-macro:444.v52de7e9c573d
trilead-api:2.192.vc50a_d147e369
variant:70.va_d9f17f859e0
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1366.vf1fb_e1a_f6b_22
workflow-basic-steps:1079.vce64b_a_929c5a_
workflow-cps:4050.v8b_a_69b_587c39
workflow-durable-task-step:1405.v1fcd4a_d00096
workflow-job:1508.v9cb_c3a_a_89dfd
workflow-multibranch:803.v08103b_87c280
workflow-scm-step:437.v05a_f66b_e5ef8
workflow-step-api:700.v6e45cb_a_5a_a_21
workflow-support:963.va_600813d04a_a_
ws-cleanup:0.48
[Groovy Script]
pipeline {
agent any
environment {
WORKSPACE_PATH =
PROJECT_PATH =
ENGINE_PATH =
GIT_CREDENTIALS_ID =
GIT_REPO_URL_SSH =
GIT_USER_NAME =
GIT_USER_EMAIL =
}
options {
timeout(time: 120, unit: 'MINUTES')
}
stages {
stage('Checkout') {
steps {
ws(env.WORKSPACE_PATH) {
checkout([
$class: 'GitSCM',
branches: [[name: '*/master']],
userRemoteConfigs: [[
credentialsId: env.GIT_CREDENTIALS_ID,
url: env.GIT_REPO_URL_SSH
]],
extensions: [
[$class: 'CloneOption', timeout: 120],
[$class: 'CheckoutOption', timeout: 120],
[$class: 'GitLFSPull']
]
])
bat '''
git lfs pull
'''
}
}
}
stage('Build Project') {
steps {
ws(env.WORKSPACE_PATH) {
bat """
echo [[[[[ START BUILD ]]]]]
"${env.ENGINE_PATH}" ^
ProjectEditor Win64 Development ^
-project="${env.PROJECT_PATH}" ^
-waitmutex -NoHotReload -NoEngineChanges -NoBuildEngine -progress
"""
}
}
}
stage('Deploy DLLs to origin/master') {
steps {
ws(env.WORKSPACE_PATH) {
bat """
echo "[[[[[ START DEPLOY DLL ]]]]]"
REM [ 1. Git SETTING ]
git config user.name "${env.GIT_USER_NAME}"
git config user.email "${env.GIT_USER_EMAIL}"
REM [ 2. UPDATE ]
git checkout master
git pull origin master
if %ERRORLEVEL% neq 0 (
echo "Conflict occurred, exiting..."
exit /b 1
)
git lfs pull
REM [ 3. COMMIT ]
git add Binaries/Win64/UnrealEditor-Project.dll
git commit -m "CI/CD: DLL update (Build #%BUILD_NUMBER%)"
REM [ 4. PUSH ]
git push origin master
git lfs push origin master
"""
}
}
}
}
post {
success {
echo 'SUCCESS'
}
failure {
echo 'FAILURE'
}
}
}
- I am using Bitbucket remote storage
- I’m managing dll files with LFS
- The local repository on the PC where the Jenkins service is installed is initially cloned to SourceTree (where Atlassian account is linked).
- The Jenkins service is running under the SYSTEM account, and I have changed the owner of the local repository to SYSTEM, giving it full permissions.
- Initially set up .gitattribute to track dll files (repositories already existing in Bitbucket remote are set up to do so)
git add
the dll files in the ‘Deploy DLLs to origin/controller’ step of the script code and everything is fine until thegit commit
process, but the lastgit lfs push origin master
command doesn’t work. So in git push, the lfs pointer is pushed normally, but the actual data is not uploaded to the lfs repository, so it fails when it is pulled from another PC.- git push origin controller works fine.
- Normal files not managed by lfs are fine.
- My guess is that jenkins is not able to access the Bitbucket lfs repository, but I don’t know exactly why.
- Additionally: the command
git lfs push origin main --all
will push all lfs files (dll files and another lfs file) and this works fine.