Skip to content

Commit

Permalink
update jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
gfournieriExec committed Jul 10, 2024
1 parent 50553eb commit 180127b
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions Jenkinsfile_Subgraph_generic
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
}

0 comments on commit 180127b

Please sign in to comment.