我正在研究ARM模板,并使用VSTS进行部署。在这里,我想使用ARM模板将Azure Kubernete服务部署到我的门户中。使用PowerShell在本地部署它们时,部署已成功完成,但是当尝试使用VSTS CD管道执行相同的操作时,出现了以下问题:
失败:'315'行的模板资源'SolutionDeployment'和 列“ 9”无效。用来部署的api版本“ 2016-07-01” 模板不支持“ SubscriptionId”属性。请用 api版本'2017-05-10'或更高版本来部署模板。
但是,我将最新版本用作解决方案部署的API版本,这里是:
@override
Widget build(BuildContext context) {
this._context = context;
return new GestureDetector(
onTap: () {
_dismissKeyboard(_context);
},
child: SingleChildScrollView(child: Scaffold(
key: scaffoldState,
resizeToAvoidBottomPadding: false,
body: !isLoading
? new Stack(
children: <Widget>[
Container(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Hero(
tag: "pricelogo",
child: new Container(
child: Image.asset('assets/logo.png'),
height: 100.0,
width: 100.0,
)),
Container(
height: 80.0,
),
Container(
decoration:
BoxDecoration(color: Colors.lightBlue[50]),
margin: EdgeInsets.only(left: 40.0, right: 40.0),
padding: EdgeInsets.only(
left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
child: TextField(
controller: emailController,
decoration: InputDecoration(
icon: new Container(
child: new ImageIcon(
new AssetImage("assets/user.png"),
color: Colors.blue,
),
),
hintText: 'Email',
hintStyle: new TextStyle(fontSize: 16.0),
border: InputBorder.none,
),
style: new TextStyle(
color: Colors.black, fontSize: 16.0),
),
),
Container(
decoration:
BoxDecoration(color: Colors.lightBlue[50]),
margin: EdgeInsets.only(
left: 40.0, right: 40.0, top: 20.0),
padding: EdgeInsets.only(
left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
child: new TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
icon: new Container(
child: new ImageIcon(
new AssetImage("assets/password.png"),
color: Colors.blue,
)),
hintText: 'Password',
hintStyle: new TextStyle(fontSize: 16.0),
border: InputBorder.none,
),
style: new TextStyle(
color: Colors.black, fontSize: 16.0),
)),
Padding(
padding: EdgeInsets.symmetric(vertical: 45.0),
child: Material(
borderRadius: BorderRadius.circular(30.0),
shadowColor: Colors.blue,
elevation: 5.0,
child: MaterialButton(
minWidth: 300.0,
height: 50.0,
onPressed: () {
if (areFieldsValid()) {
if (_connectionStatus ==
ConnectivityResult.wifi ||
_connectionStatus ==
ConnectivityResult.mobile) {
_makeLoginApiCall();
} else {
scaffoldState.currentState.showSnackBar(
new SnackBar(
content: new Text(
"Please check your internet connection and try again")));
}
}
},
color: Colors.blue,
child: Text('Login',
style: TextStyle(color: Colors.white)),
),
),
),
Container(
margin: EdgeInsets.only(bottom: 20.0),
child: Text("or sign in with:"),
),
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
isFacebookSignInEnabled
? Image(
image: AssetImage("assets/facebook.png"),
height: 50.0,
width: 50.0,
)
: Container(),
Container(
width: isGoogleSignInEnabled ? 40.0 : 0.0,
),
isGoogleSignInEnabled
? Image(
image: AssetImage("assets/google.png"),
height: 50.0,
width: 50.0,
)
: Container(),
],
),
),
],
)),
Container(
margin: EdgeInsets.only(left: 15.0, bottom: 5.0),
alignment: Alignment.bottomLeft,
child: Row(
children: <Widget>[
Text(
"Don't have an account?",
style: TextStyle(fontSize: 14.0),
),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Signup()));
},
child: Text(
" Signup",
style: TextStyle(
color: Colors.blueAccent,
decoration: TextDecoration.underline,
fontSize: 16.0),
),
)
],
)),
GestureDetector(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ForgotPassword()));
},
child: Container(
margin: EdgeInsets.only(right: 15.0, bottom: 5.0),
alignment: Alignment.bottomRight,
child: Text(
"Forgot Password?",
style: TextStyle(fontSize: 14.0),
),
),
)
],
)
: Container(
alignment: Alignment.center,
child: CircularProgressIndicator(
strokeWidth: 4.0,
backgroundColor: Colors.blue,
),
)),
),
);
}
有人可以建议我“如何摆脱这个问题?”