diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 0e49606..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,21 +0,0 @@ -# .woodpecker.yml -pipeline: - install: - image: debian - commands: - - apt-get update - - apt-get install python3 - - apt-get install python3-pip - - pip install build - - pip install pytest - - pip install setuptools - - pip install twine - build: - image: python - commands: - - python -m build - publish: - image: python - commands: - - pip -m twine upload --repository-url https://git.reslate.systems -u ${CI_NETRC_USERNAME} -p ${CI_NETRC_PASSWORD} --non-interactive --disable-progress-bar --verbose dist/* - \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..0a001d1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,26 @@ +pipeline { + agent any + stages { + stage("install") { + steps { + sh 'conda env update --file environment.yml' + sh 'echo "conda activate renamebycsv" >> ~/.bashrc' + } + } + stage("build") { + steps { + sh "python -m build" + } + } + stage("publish") { + when { + branch '**/master' + } + steps { + withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { + sh "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/*" + } + } + } + } +} \ No newline at end of file diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..6b3b687 --- /dev/null +++ b/environment.yml @@ -0,0 +1,11 @@ +name: renamebycsv +channels: + - anaconda + - conda-forge +dependencies: + - build=0.7.0 + - pytest=7.2.2 + - python=3.11.3 + - setuptools=67.6.1 + - twine=4.0.2 + - cryptography=38.0.4