-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50553eb
commit 180127b
Showing
1 changed file
with
32 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,35 +2,38 @@ | |
|
||
@Library('[email protected]') _ | ||
|
||
|
||
def userInput | ||
|
||
stage('Deployement form') { | ||
timeout(time: 5, unit: 'MINUTES') { | ||
userInput = input( | ||
id: 'select-deployment', | ||
message: 'Select environment & service', | ||
parameters: [ | ||
string(name: 'network', description: 'The network name you want to deploy your subgraph'), | ||
string(name: 'targetRemoteHost', description: 'The host you want to deploy the subgraph'), | ||
|
||
] | ||
) | ||
node('docker') { | ||
stage('Deployement form') { | ||
timeout(time: 5, unit: 'MINUTES') { | ||
userInput = input( | ||
id: 'select-deployment', | ||
message: 'Select environment & service', | ||
parameters: [ | ||
string(name: 'network', description: 'The network name you want to deploy your subgraph'), | ||
string(name: 'targetRemoteHost', description: 'The host you want to deploy the subgraph'), | ||
|
||
] | ||
) | ||
} | ||
println "Selected network: '$userInput.network'" | ||
println "Selected service name: '$userInput.targetRemoteHost'" | ||
} | ||
stage('Building subgraph') { | ||
sh "./generate_subgraph.sh '$userInput.network'" | ||
sh """ | ||
FILE=./subgraph.'$userInput.network}'.yaml | ||
if test -f "$FILE"; then | ||
echo "Subgraph file generated successfully" | ||
fi | ||
""" | ||
} | ||
println "Selected network: '$userInput.network'" | ||
println "Selected service name: '$userInput.targetRemoteHost'" | ||
sh "./generate_subgraph.sh '$userInput.network'" | ||
sh """ | ||
FILE=./subgraph.'$userInput.network}'.yaml | ||
if test -f "$FILE"; then | ||
echo "Subgraph file generated successfully" | ||
fi | ||
""" | ||
} | ||
deploySubGraph( | ||
targetRemoteHost : "'$userInput.targetRemoteHost}'", | ||
subgraphFolder: './', | ||
subgraphFilename: "subgraph.'$userInput.network}'.yaml", | ||
subgraphVersionLabel: 'v1.0.0-rc.1', | ||
subgraphLabel: "'$userInput.network}'/poco-v5" | ||
) | ||
deploySubGraph( | ||
targetRemoteHost : "'$userInput.targetRemoteHost}'", | ||
subgraphFolder: './', | ||
subgraphFilename: "subgraph.'$userInput.network}'.yaml", | ||
subgraphVersionLabel: 'v1.0.0-rc.1', | ||
subgraphLabel: "'$userInput.network}'/poco-v5" | ||
) | ||
} |