Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (74 sloc) 2.18 KB
# See the docs for a detailed explanation about this file:
# https://lagoon.readthedocs.io/en/latest/administering_lagoon/graphql_api/#create-first-project
# 1. Create a customer
mutation {
addCustomer(
input: {
# TODO: Fill in the name field
# This is the unique identifier of the customer
name: ""
# TODO: Fill in privateKey field
# The private key is a string, with new lines represented by `\n`
# See example here: https://github.com/amazeeio/lagoon/blob/66a080fa5cd0da5a0dca05f2532055f055842cba/local-dev/api-data/api-data.gql#L163
privateKey: ""
}
) {
name
# TODO: Make a note of the customer ID that comes back in the response
id
}
}
# 2. Create an OpenShift
mutation {
addOpenshift(
input: {
# TODO: Fill in the name field
# This is the unique identifier of the OpenShift
name: ""
# TODO: Fill in consoleUrl field
# This is the URL of the OpenShift console (without any `/console` suffix)
consoleUrl: ""
# TODO: Fill in the token field
# This is the token of the `lagoon` service account created in this OpenShift (this is the same token that we also used during installation of Lagoon)
token: ""
}
) {
name
# TODO: Make a note of the openshift ID that comes back in the response
id
}
}
# 3. Create a project and assign it the customer and OpenShift
mutation {
addProject(
input: {
# TODO: Fill in the name field
# This is the unique identifier of the project
name: ""
# TODO: Fill in the customer field
# This is the customer ID from the response of the first query
customer: 0
# TODO: Fill in the openshift field
# This is the OpenShift ID from the response of the first query
openshift: 0
# TODO: Fill in the gitUrl field
# This is the SSH URL to the Git repository where a `.lagoon.yml` file should be committed in the root.
# HTTPS URLs are currently not supported.
gitUrl: ""
}
) {
name
customer {
name
}
openshift {
name
}
gitUrl
activeSystemsDeploy
activeSystemsPromote
activeSystemsRemove
branches
pullrequests
}
}
You can’t perform that action at this time.