我将Jenkins与我的node项目集成在一起。 在Jenkins上构建项目时,我想使用Jenkins环境变量更新节点配置变量。
这是我的模板配置文件。
{
"aws": {
"s3": {
"base_url": "AWS_S3_BASE_URL",
"bucket": "AWS_S3_BUCKET",
"region": "AWS_S3_REGION",
"accessKeyId": "AWS_S3_ACCESS_KEY",
"secretAccessKey": "AWS_S3_SECRET_ACCESS_KEY"
}
},
"db": {
"sequelize": {
"dialect": "postgres",
"logging": true,
"database": "DB_DATABASE",
"port": 5432,
"minConnections": 1,
"maxConnections": 4,
"maxIdleTime": 1000,
"write": {
"endpoint": "DB_HOST",
"username": "DB_USER",
"password": "DB_PASSWORD"
},
"read": [
{
"endpoint": "DB_HOST",
"username": "DB_USER",
"password": "DB_PASSWORD"
}
]
}
}
}
如何使用Jenkins环境变量更新这些变量?
谢谢!