ci: refs #7643 Reprepro debug & docker deploy improve
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2024-07-09 12:16:31 +02:00
parent 7ff9e2e97d
commit 3db9314dfd
2 changed files with 10 additions and 9 deletions

14
Jenkinsfile vendored
View File

@ -39,7 +39,7 @@ pipeline {
sh 'debuild -us -uc -b'
sh 'mkdir -p output'
sh 'mv ../*.deb ../*.build ../*.buildinfo ../*.changes output'
sleep 600
sleep 1800
stash includes: 'output/*', name: 'debuildOutput'
}
@ -95,6 +95,7 @@ pipeline {
}
environment {
CREDS = credentials('docker-registry')
IMAGE = "$REGISTRY/verdnatura/hedera-web"
}
steps {
script {
@ -103,17 +104,20 @@ pipeline {
env.TAG = "${packageJson.version}-build${env.BUILD_ID}"
}
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
sh 'docker-compose push'
sh "docker tag $IMAGE:$TAG $IMAGE:latest"
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh "docker push $IMAGE:$TAG"
sh "docker push $IMAGE:latest"
withKubeConfig([
serverUrl: "$KUBERNETES_API",
credentialsId: 'kubernetes',
namespace: 'salix'
]) {
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$REGISTRY/hedera-web:$TAG'
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$REGISTRY/hedera-web:$TAG'
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$IMAGE:$TAG'
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$IMAGE:$TAG'
}
}
}

View File

@ -1,12 +1,9 @@
version: '3.7'
services:
main:
image: registry.verdnatura.es/hedera-web:${VERSION:?}
image: registry.verdnatura.es/verdnatura/hedera-web:${TAG:?}
build:
context: .
dockerfile: Dockerfile
args:
- VERSION=${VERSION:?}
cron:
image: registry.verdnatura.es/hedera-web:${VERSION:?}
command: 'cron -f'