mirror of
https://github.com/jarulsamy/Plex-Bot.git
synced 2024-08-19 15:01:55 +02:00
🚀 Automatic deployment through jenkins
This commit is contained in:
parent
63fea747c6
commit
76d2d97c62
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -49,7 +49,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh ''' source /var/lib/jenkins/miniconda3/etc/profile.d/conda.sh
|
sh ''' source /var/lib/jenkins/miniconda3/etc/profile.d/conda.sh
|
||||||
conda activate ${BUILD_TAG}
|
conda activate ${BUILD_TAG}
|
||||||
docker build .
|
python deploy/build.py
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
@ -58,6 +58,7 @@ pipeline {
|
|||||||
archiveArtifacts (allowEmptyArchive: true,
|
archiveArtifacts (allowEmptyArchive: true,
|
||||||
artifacts: 'dist/*whl',
|
artifacts: 'dist/*whl',
|
||||||
fingerprint: true)
|
fingerprint: true)
|
||||||
|
sh 'python deploy/push.py'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
PlexBot/__version__.py
Normal file
1
PlexBot/__version__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
VERSION = "0.0.4"
|
8
deploy/build.py
Normal file
8
deploy/build.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append("PlexBot")
|
||||||
|
|
||||||
|
from __version__ import VERSION
|
||||||
|
|
||||||
|
sys.exit(os.system(f"docker build -t jarulsamy/plex-bot:{VERSION} ."))
|
8
deploy/push.py
Executable file
8
deploy/push.py
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append("PlexBot")
|
||||||
|
|
||||||
|
from __version__ import VERSION
|
||||||
|
|
||||||
|
sys.exit(os.system(f"docker push jarulsamy/plex-bot:{VERSION}"))
|
Loading…
Reference in New Issue
Block a user