Compare commits
1 Commits
345cf31bb3
...
d2fa174c8f
Author | SHA1 | Date | |
---|---|---|---|
d2fa174c8f |
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -67,16 +67,18 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
sh script: 'git clean -ffdx', label: 'Clean repository'
|
sh script: 'git clean -ffdx', label: 'Clean repository'
|
||||||
|
|
||||||
env.VERSION = sh(script: 'git describe --tags --always --match "Release_*" HEAD', returnStdout: true).trim()
|
def version = sh(script: 'git describe --tags --always --match "Release_*" HEAD', returnStdout: true).trim()
|
||||||
|
def imageUrl = "git.esoko.eu/esoko/mapguesser:${version}"
|
||||||
|
|
||||||
withDockerRegistry([credentialsId: 'gitea-system-user', url: 'https://git.esoko.eu/']) {
|
|
||||||
sh script: """docker buildx build \
|
sh script: """docker buildx build \
|
||||||
|
-t ${imageUrl} \
|
||||||
-f docker/Dockerfile \
|
-f docker/Dockerfile \
|
||||||
--target mapg_release \
|
--target mapg_release \
|
||||||
-t git.esoko.eu/esoko/mapguesser:${env.VERSION} \
|
|
||||||
--push \
|
|
||||||
.""",
|
.""",
|
||||||
label: 'Build Docker image'
|
label: 'Build Docker image'
|
||||||
|
|
||||||
|
withDockerRegistry([credentialsId: 'gitea-system-user', url: 'https://git.esoko.eu/']) {
|
||||||
|
sh script: "docker push ${imageUrl}", label: 'Push Docker image to registry'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ echo "Migrating DB..."
|
|||||||
echo "Installing crontab..."
|
echo "Installing crontab..."
|
||||||
/usr/bin/crontab docker/scripts/cron
|
/usr/bin/crontab docker/scripts/cron
|
||||||
|
|
||||||
echo "Set runner user based on owner of .env..."
|
echo "Set runner user..."
|
||||||
USER_UID=$(stat -c "%u" .env)
|
USER_UID=$(stat -c "%u" .env)
|
||||||
USER_GID=$(stat -c "%g" .env)
|
USER_GID=$(stat -c "%g" .env)
|
||||||
groupadd --gid $USER_GID mapg
|
groupadd --gid $USER_GID mapg
|
||||||
|
Loading…
Reference in New Issue
Block a user