-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec-ami.yml
More file actions
45 lines (38 loc) · 1.16 KB
/
buildspec-ami.yml
File metadata and controls
45 lines (38 loc) · 1.16 KB
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
version: "0.2"
env:
shell: bash
phases:
install:
runtime-versions:
java: corretto21
nodejs: 22
commands:
# - sudo yum install java-21-amazon-corretto-devel # No longer needed, handled by runtime-versions
- wget https://services.gradle.org/distributions/gradle-9.2.0-bin.zip
- sudo unzip -d /opt/gradle gradle-9.2.0-bin.zip
- echo "export GRADLE_HOME=/opt/gradle/gradle-9.2.0" > gradle.sh
- echo "export PATH=/opt/gradle/gradle-9.2.0/bin:${PATH}" >> gradle.sh
- sudo mv gradle.sh /etc/profile.d/
- sudo chmod +x /etc/profile.d/gradle.sh
- source /etc/profile.d/gradle.sh
- echo "Verifying Node.js and npm versions"
- node -v
- npm -v
build:
commands:
- cd java_timetracking
- gradle build shadowJar
- cd ..
- cd react_timetracking
- npm install
- npm run build
- cd build
- zip -r react-timetracking.zip *
artifacts:
files:
- java_timetracking/build/libs/java_timetracking-1.0.0.jar
- react_timetracking/build/react-timetracking.zip
- react_timetracking/build/app-config.js
discard-paths: "yes"
cache:
paths: