-
Notifications
You must be signed in to change notification settings - Fork 44
/
.gitpod.yml
63 lines (63 loc) · 2.02 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# We install astra-cli using the Node terminal, so that we are sure to
# source astra-init there and have astra available.
# On the other hand, we need to make sure mvn clean install happens cleanly
# after java 17 is installed, so the sdk install is on the Java terminal.
# This *should* work without nondeterministic ordering issues.
tasks:
- name: cors-host-config
before: bash hostURL.sh
command: gp open README.md
- name: graphQL-Client
before: |
# astra-cli
printf 'export PATH="$HOME%s:$PATH"\n' "/.astra/cli" >> $HOME/.bashrc
printf 'unset JAVA_TOOL_OPTIONS\n' >> $HOME/.bashrc
curl -Ls "https://dtsx.io/get-astra-cli-java" | bash >> ./install.log
# node dependencies
cd graphql-client-examples
nvm install 16.13.0
npm install -g npm@latest
npm install astra-setup
npm install -g netlify-cli
npm install
command: |
source /home/gitpod/.astra/cli/astra-init.sh
clear
echo -e "\n*** workshop-intro-to-graphql gitpod ready - LET'S DO THIS! ***\n"
- name: graphQL-Backend
openMode: split-right
before: |
# REMOVE USER VALIDATION -Y ON JAVA 17 INSTALLATION
sed -i '1,$s/sdkman_auto_answer=false/sdkman_auto_answer=true/' /home/gitpod/.sdkman/etc/config
sed -i '1,$s/sdkman_selfupdate_enable=true/sdkman_selfupdate_enable=false/' /home/gitpod/.sdkman/etc/config
# JAVA17 INSTALL
sdk install java
init: |
# build the Java app
cd graphql-backend-examples
mvn clean install
command: |
# astra-cli
unset JAVA_TOOL_OPTIONS
source /home/gitpod/.astra/cli/astra-init.sh
#
cd graphql-backend-examples
mvn spring-boot:run
ports:
- port: 8888
onOpen: open-preview
- port: 8080
visibility: public
onOpen: open-browser
- port: 3000
onOpen: ignore
github:
prebuilds:
master: true
branches: true
pullRequests: true
pullRequestsFromForks: false
addCheck: true
addComment: false
addBadge: true
addLabel: false