automated terminal push
This commit is contained in:
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user