Compare commits
No commits in common. "7f51a7c6ef652040ad77c5098edd1fc4a80a8987" and "43ce25a873bebeadb811f4bdbaf50f8054e4a0d1" have entirely different histories.
7f51a7c6ef
...
43ce25a873
3 changed files with 5 additions and 46 deletions
|
@ -9,5 +9,3 @@ __pycache__/
|
||||||
.gitignore
|
.gitignore
|
||||||
Dockerfile
|
Dockerfile
|
||||||
.dockerignore
|
.dockerignore
|
||||||
snap/
|
|
||||||
Jenkinsfile
|
|
||||||
|
|
28
Dockerfile
28
Dockerfile
|
@ -1,28 +0,0 @@
|
||||||
FROM python:3.10-slim-bullseye AS builder
|
|
||||||
|
|
||||||
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN pip wheel . --wheel-dir /wheels --find-links /wheels
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10-slim-bullseye AS run
|
|
||||||
|
|
||||||
COPY --from=builder /wheels /wheels
|
|
||||||
|
|
||||||
RUN pip --no-cache-dir install --find-links /wheels --no-index partybot
|
|
||||||
|
|
||||||
RUN addgroup -gid 2022 partybot \
|
|
||||||
&& adduser --home /data --uid 2022 --gid 2022 --disabled-password partybot
|
|
||||||
|
|
||||||
USER partybot
|
|
||||||
|
|
||||||
VOLUME /data
|
|
||||||
|
|
||||||
WORKDIR /data
|
|
||||||
|
|
||||||
CMD partybot
|
|
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -7,26 +7,14 @@ pipeline {
|
||||||
skipDefaultCheckout(true)
|
skipDefaultCheckout(true)
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build docker image') {
|
|
||||||
agent { label 'docker-build' }
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
docker.withRegistry('https://git.dreamfall.space', '0e145583-73da-44fa-8117-b8d5352025df') {
|
|
||||||
def customImage = docker.build('partybot:${env.BUILD_ID}')
|
|
||||||
|
|
||||||
customImage.push()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build snap packages') {
|
stage('Build snap packages') {
|
||||||
when { expression { false == true } }
|
|
||||||
parallel {
|
parallel {
|
||||||
stage('Build snap for ARM64') {
|
stage('Build snap for ARM64') {
|
||||||
agent { label "snap-arm64" }
|
agent { label "snap-arm64" }
|
||||||
steps {
|
steps {
|
||||||
mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
cleanWs()
|
cleanWs()
|
||||||
|
// sh "rm *.snap || true"
|
||||||
checkout scm
|
checkout scm
|
||||||
sh "snapcraft clean"
|
sh "snapcraft clean"
|
||||||
sh "snapcraft"
|
sh "snapcraft"
|
||||||
|
@ -35,7 +23,7 @@ pipeline {
|
||||||
success {
|
success {
|
||||||
mattermostSend color: "good", message: "ARM64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend color: "good", message: "ARM64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
archiveArtifacts artifacts: '*.snap'
|
archiveArtifacts artifacts: '*.snap'
|
||||||
sh "snapcraft upload --release=edge *.snap"
|
// sh "snapcraft upload --release=edge *.snap"
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
|
@ -47,6 +35,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
cleanWs()
|
cleanWs()
|
||||||
|
// sh "rm *.snap || true"
|
||||||
checkout scm
|
checkout scm
|
||||||
sh "snapcraft clean"
|
sh "snapcraft clean"
|
||||||
sh "snapcraft"
|
sh "snapcraft"
|
||||||
|
@ -55,7 +44,7 @@ pipeline {
|
||||||
success {
|
success {
|
||||||
mattermostSend color: "good", message: "AMD64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend color: "good", message: "AMD64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
archiveArtifacts artifacts: '*.snap'
|
archiveArtifacts artifacts: '*.snap'
|
||||||
sh "snapcraft upload --release=edge *.snap"
|
// sh "snapcraft upload --release=edge *.snap"
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
|
|
Loading…
Reference in a new issue