Skip to content

Commit 2e82342

Browse files
Merge pull request #110 from opendevstack/master
Fixes from master
2 parents bcf662a + e175404 commit 2e82342

5 files changed

Lines changed: 62 additions & 36 deletions

File tree

.github/workflows/continuous-integration-workflow.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,26 @@ jobs:
3838
- name: copy created artifacts into docker context
3939
run: |
4040
cp build/libs/*-all.jar ./docker/app.jar
41+
- name: Show GitHub context (for debugging purposes)
42+
env:
43+
GITHUB_CONTEXT: ${{ toJson(github) }}
44+
run: echo "$GITHUB_CONTEXT"
4145
- name: Build docker image
4246
if: success()
4347
run: |
44-
COMMIT_AUTHOR=$(git --no-pager show -s --format='%an (%ae)' $GITHUB_SHA)
45-
COMMIT_MESSAGE=$(git log -1 --pretty=%B $GITHUB_SHA)
46-
COMMIT_TIME=$(git show -s --format=%ci $GITHUB_SHA)
48+
echo "GITHUB_SHA (invalid): $GITHUB_SHA "
49+
COMMIT_HEAD_SHA="${{ github.event.pull_request.head.sha }}"
50+
echo "COMMIT_HEAD_SHA: $COMMIT_HEAD_SHA"
51+
COMMIT_AUTHOR=$(git --no-pager show -s --format='%an (%ae)' $COMMIT_HEAD_SHA)
52+
COMMIT_MESSAGE=$(git log -1 --pretty=%B $COMMIT_HEAD_SHA)
53+
COMMIT_TIME=$(git show -s --format=%ci $COMMIT_HEAD_SHA)
4754
BUILD_TIME=$(date -u "+%Y-%m-%d %H:%M:%S %z")
4855
docker build \
4956
--label "ods.build.job.url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
5057
--label "ods.build.source.repo.ref=$GITHUB_REF" \
5158
--label "ods.build.source.repo.commit.author=$COMMIT_AUTHOR" \
5259
--label "ods.build.source.repo.commit.msg=$COMMIT_MESSAGE" \
53-
--label "ods.build.source.repo.commit.sha=$GITHUB_SHA" \
60+
--label "ods.build.source.repo.commit.sha=$COMMIT_HEAD_SHA" \
5461
--label "ods.build.source.repo.commit.timestamp=$COMMIT_TIME" \
5562
--label "ods.build.source.repo.url=https://github.com/$GITHUB_REPOSITORY.git" \
5663
--label "ods.build.timestamp=$BUILD_TIME" \

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# Changelog
22

3-
## Unreleased
3+
## Unreleased - pointing release: 4.0.2
44

55
### Added
66
- Improve memory management and error handling ([#70](https://github.com/opendevstack/ods-document-generation-svc/pull/70))
77

88
### Fixed
99
- ODS AMI build failing due to broken x11 fonts package installation ([#74](https://github.com/opendevstack/ods-document-generation-svc/pull/74))
10+
- Fix TIR and DTR documents are not properly indexed ([#55](https://github.com/opendevstack/ods-document-generation-svc/pull/55))
11+
- Fix wkhtmltox hangs ([#66](https://github.com/opendevstack/ods-document-generation-svc/pull/66))
12+
- ODS AMI build failing due to broken x11 fonts package installation ([#74](https://github.com/opendevstack/ods-document-generation-svc/pull/74))
13+
- Github template tests fail in proxy environment ([#56](https://github.com/opendevstack/ods-document-generation-svc/issues/56))
14+
- Jcenter repository not available and build step fails ([#106](https://github.com/opendevstack/ods-document-generation-svc/issues/106))
15+
- Dependencies no more availables changed ([108](https://github.com/opendevstack/ods-document-generation-svc/issues/108))
1016

1117
## [4.0] - 2021-18-11
1218

Jenkinsfile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,37 @@ def stageBuild(def context) {
3232
// get wkhtml
3333
sh (
3434
script : """
35-
curl -kLO https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
35+
curl -sSkLO https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
3636
tar vxf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
3737
mv wkhtmltox/bin/wkhtmlto* /usr/bin
38+
39+
source use-j11.sh || echo 'ERROR: We could NOT setup jdk 11.'
40+
./gradlew --version || echo 'ERROR: Could NOT get gradle version.'
41+
java -version || echo 'ERROR: Could NOT get java version.'
42+
echo "JAVA_HOME: $JAVA_HOME" || echo "ERROR: JAVA_HOME has NOT been set."
43+
3844
""",
3945
label : "get and install wkhtml"
4046
)
4147

4248
def status = sh(
43-
script: "./gradlew clean test shadowJar --stacktrace --no-daemon",
49+
script: '''
50+
source use-j11.sh
51+
52+
retryNum=0
53+
downloadResult=1
54+
while [ 0 -ne $downloadResult ] && [ 5 -gt $retryNum ]; do
55+
set -x
56+
./gradlew -i dependencies
57+
set +x
58+
downloadResult=$?
59+
let "retryNum=retryNum+1"
60+
done
61+
62+
set -x
63+
./gradlew -i clean test shadowJar --full-stacktrace --no-daemon
64+
set +x
65+
''',
4466
label : "gradle build",
4567
returnStatus: true
4668
)

build.gradle

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,10 @@ buildscript {
1919

2020
repositories {
2121
if (no_nexus) {
22-
println("using repositories 'jcenter' and 'mavenCentral', because property no_nexus=$no_nexus")
23-
jcenter()
22+
println("using repository 'mavenCentral', because property no_nexus=$no_nexus")
2423
mavenCentral()
2524
} else {
2625
println("using nexus repositories")
27-
maven() {
28-
url "${nexus_url}/repository/jcenter/"
29-
credentials {
30-
username = "${nexus_user}"
31-
password = "${nexus_pw}"
32-
}
33-
}
3426

3527
maven() {
3628
url "${nexus_url}/repository/maven-public/"
@@ -75,18 +67,13 @@ apply plugin: "jacoco"
7567

7668
repositories {
7769
if (no_nexus) {
78-
println("using repositories 'jcenter' and 'mavenCentral', because property no_nexus=$no_nexus")
79-
jcenter()
70+
println("using repository 'mavenCentral', because property no_nexus=$no_nexus")
8071
mavenCentral()
81-
} else {
82-
println("using nexus repositories")
8372
maven() {
84-
url "${nexus_url}/repository/jcenter/"
85-
credentials {
86-
username = "${nexus_user}"
87-
password = "${nexus_pw}"
88-
}
73+
url "https://plugins.gradle.org/m2/"
8974
}
75+
} else {
76+
println("using nexus repositories")
9077

9178
maven() {
9279
url "${nexus_url}/repository/maven-public/"
@@ -103,6 +90,10 @@ repositories {
10390
password = "${nexus_pw}"
10491
}
10592
}
93+
94+
maven() {
95+
url "https://plugins.gradle.org/m2/"
96+
}
10697
}
10798
}
10899

buildSrc/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,13 @@ ext {
1818

1919
repositories {
2020
if (no_nexus) {
21-
println("using repositories 'jcenter' and 'mavenCentral', because property no_nexus=$no_nexus")
22-
jcenter()
21+
println("INFO: using repository 'mavenCentral', because property no_nexus=$no_nexus")
2322
mavenCentral()
24-
} else {
25-
println("using nexus repositories")
2623
maven() {
27-
url "${nexus_url}/repository/jcenter/"
28-
credentials {
29-
username = "${nexus_user}"
30-
password = "${nexus_pw}"
31-
}
24+
url "https://plugins.gradle.org/m2/"
3225
}
26+
} else {
27+
println("INFO: using nexus repositories")
3328

3429
maven() {
3530
url "${nexus_url}/repository/maven-public/"
@@ -46,13 +41,18 @@ repositories {
4641
password = "${nexus_pw}"
4742
}
4843
}
44+
45+
maven() {
46+
url "https://plugins.gradle.org/m2/"
47+
}
48+
4949
}
5050
}
5151

5252
apply plugin: 'groovy'
5353

5454
dependencies {
5555
implementation gradleApi()
56-
implementation 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
5756
implementation "org.codehaus.plexus:plexus-utils:3.0.24"
58-
}
57+
implementation "com.github.jengelman.gradle.plugins:shadow:5.2.0"
58+
}

0 commit comments

Comments
 (0)