-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathbyteman.yaml
72 lines (66 loc) · 2.27 KB
/
byteman.yaml
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
64
65
66
67
68
69
70
71
72
package:
name: byteman
version: 4.0.24
epoch: 0
description: Simplify Java tracing, monitoring and testing with Byteman
copyright:
- license: GPL-2.0-or-later AND BSD-3-Clause
# NOTE: JRE runtime dependency required but only jar is needed at this point for using this package as part of hadoop.
environment:
contents:
packages:
- busybox
- ca-certificates-bundle
- zip
- unzip
- maven
- openjdk-11
environment:
JAVA_HOME: /usr/lib/jvm/java-11-openjdk
LANG: "en_US.UTF-8"
pipeline:
- uses: git-checkout
with:
repository: https://github.com/bytemanproject/byteman
tag: ${{package.version}}
expected-commit: a863e79b1d4d1556eee3b190d5ca6abc342515dc
- runs: |
mvn clean install
mkdir -p ${{targets.destdir}}/usr/share/java/byteman
cp docs/copyright.txt ${{targets.destdir}}/usr/share/java/byteman/copyright.txt
cp licenses/third_party_licenses.txt ${{targets.destdir}}/usr/share/java/byteman/third_party_licenses.txt
mv byteman/target/byteman-${{package.version}}.jar ${{targets.destdir}}/usr/share/java/byteman/byteman.jar
subpackages:
- name: ${{package.name}}-compat
description: "hadoop runner requires the jar file at /opt"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/opt/
ln -sf /usr/share/java/byteman/byteman.jar ${{targets.contextdir}}/opt/byteman.jar
ln -sf /usr/share/java/byteman/copyright.txt ${{targets.contextdir}}/opt/copyright.txt
ln -sf /usr/share/java/byteman/third_party_licenses.txt ${{targets.contextdir}}/opt/third_party_licenses.txt
update:
enabled: true
github:
identifier: bytemanproject/byteman
use-tag: true
test:
environment:
contents:
packages:
- openjdk-11-default-jvm
pipeline:
- name: jar listing
runs: |
jar -tf /usr/share/java/byteman/byteman.jar
- name: run simple application with byteman agent
runs: |
cat > Hello.java <<EOF
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
EOF
javac -cp /usr/share/java/byteman/byteman.jar Hello.java
java -javaagent:/usr/share/java/byteman/byteman.jar -cp . Hello