Skip to content

Commit c17aea7

Browse files
msgilliganschildbach
authored andcommitted
.gitlab-ci.yml: move before_script and after_script to each job
Also, move the `apt-get install` lines into the `before_script` sections. This will allow us to add other jobs that don't or can't run these scripts.
1 parent 2b6b28a commit c17aea7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.gitlab-ci.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
before_script:
2-
- apt-get update
3-
4-
after_script:
5-
- gradle --version
6-
71
bullseye-jdk11:
82
image: debian:bullseye-slim
9-
script:
3+
before_script:
4+
- apt-get update
105
- apt-get -y install openjdk-11-jdk-headless gradle
6+
script:
117
- gradle build --stacktrace
8+
after_script:
9+
- gradle --version
1210
artifacts:
1311
name: bitcoinj-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
1412
paths:
1513
- core/build/libs/*.jar
1614

1715
bookworm-jdk17:
1816
image: debian:bookworm-slim
19-
script:
17+
before_script:
18+
- apt-get update
2019
- apt-get -y install openjdk-17-jdk-headless gradle
20+
script:
2121
- gradle build --stacktrace
22+
after_script:
23+
- gradle --version
2224
artifacts:
2325
name: bitcoinj-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
2426
paths:

0 commit comments

Comments
 (0)