project 1click service is approaching

This commit is contained in:
adam 2024-11-16 22:50:41 -05:00
parent fc56ddda34
commit 3b618d07d5

View File

@ -0,0 +1,43 @@
pipeline {
agent any
parameters {
string(name: 'svcname', description: "service name")
string(name: 'svcdesc', description: "service description")
}
stages {
stage("type strengthening") {
steps {
script {
if (svcname.isEmpty()) {
error("svcname mandatory")
}
}
}
}
stage("gitea project"){
steps{
script {
//TODO: clone _template-service
}
}
}
stage("service account"){
steps{
script {
ssh user@host username=$svcname svcpw=$ARG2 'echo "rootpass" | sudo -Sv && bash -s' << 'ENDSSH'
#commands to run on remote host
useradd -m -s /bin/bash $username
echo "$username:$password" | chpasswd
ENDSSH
}
}
}
stage("initial service setup"){
steps{
script {
//TODO
}
}
}
}
}