automated terminal push

This commit is contained in:
lenape
2025-06-22 16:23:59 +00:00
parent 8fc5c41e85
commit e958785b5c

17
Jenkinsfile vendored
View File

@@ -38,15 +38,18 @@ pipeline {
}
stage('Deploy to Container App') {
steps {
withCredentials([azureServicePrincipal(
credentialsId: 'azure-sp',
subscriptionIdVariable: 'AZ_SUB',
clientIdVariable: 'AZ_CLIENT_ID',
clientSecretVariable: 'AZ_CLIENT_SECRET',
tenantIdVariable: 'AZ_TENANT_ID')]) {
withCredentials([
string(credentialsId: 'azure-subscription-id', variable: 'AZ_SUB'),
string(credentialsId: 'azure-client-id', variable: 'AZ_CLIENT_ID'),
string(credentialsId: 'azure-client-secret', variable: 'AZ_CLIENT_SECRET'),
string(credentialsId: 'azure-tenant-id', variable: 'AZ_TENANT_ID')
]) {
sh '''
echo "Logging in to Azure..."
az login --service-principal -u $AZ_CLIENT_ID -p $AZ_CLIENT_SECRET --tenant $AZ_TENANT_ID
echo "Setting subscription..."
az account set --subscription $AZ_SUB
echo "Updating container app..."
az containerapp update \
--name $CONTAINER_APP \
--resource-group $RESOURCE_GROUP \
@@ -61,4 +64,4 @@ pipeline {
cleanWs()
}
}
}
}