Compare commits

..

2 Commits

Author SHA1 Message Date
eacb730961 Added a comment
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
2023-09-11 21:55:30 +00:00
844cf4b2de Changed steps to use native credential manager
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
2023-09-11 20:52:34 +00:00
2 changed files with 5 additions and 3 deletions

7
Jenkinsfile vendored
View File

@ -24,13 +24,14 @@ pipeline {
}
}
stage("publish package") {
environment {
CREDS = credentials('rs-git-package-registry-ydeng')
}
when {
branch '**/master'
}
steps {
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/${USER}/pypi -u ${USER} -p ${PASS} --non-interactive --disable-progress-bar --verbose dist/*'
}
sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/${CREDS_USR}/pypi -u ${CREDS_USR} -p ${CREDS_PSW} --non-interactive --disable-progress-bar --verbose dist/*'
}
}
}

View File

@ -64,6 +64,7 @@ def rename_by_csv(
row[current_col_ind] in replacement_dict
and replacement_dict[row[current_col_ind]] != row[become_col_ind]
):
# Check if there's a duplicate key for different values.
raise Exception("Duplicate current key.")
replacement_dict[row[current_col_ind]] = row[become_col_ind]
for subitem_path, subitem, match in candidates: