Skip to content

Commit 9dbf6af

Browse files
committed
adding settings + release pipeline
Signed-off-by: salaboy <[email protected]>
1 parent b8c4870 commit 9dbf6af

File tree

3 files changed

+45
-44
lines changed

3 files changed

+45
-44
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88
name: Release Pipeline
99

1010
jobs:
11-
build:
11+
publish:
1212
runs-on: ubuntu-latest
13-
13+
timeout-minutes: 30
14+
env:
15+
JDK_VER: 11
16+
OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }}
17+
OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }}
18+
GPG_KEY: ${{ secrets.GPG_KEY }}
19+
GPG_PWD: ${{ secrets.GPG_PWD }}
1420
steps:
1521
- uses: actions/checkout@v2
16-
1722
- name: Set up JDK 11
1823
uses: actions/setup-java@v2
1924
with:
@@ -66,45 +71,15 @@ jobs:
6671
if: env.UNIT_TEST_FAILED == 'true'
6772
run: exit 1
6873

69-
# TODO: Move the sidecar into a central image repository
70-
- name: Initialize Durable Task Sidecar
71-
run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator
72-
73-
- name: Display Durable Task Sidecar Logs
74-
run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 &
75-
76-
# wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar
77-
- name: Wait for 10 seconds
78-
run: sleep 10
79-
80-
- name: Integration Tests with Gradle
81-
run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV
82-
continue-on-error: true
83-
84-
- name: Kill Durable Task Sidecar
85-
run: docker kill durabletask-sidecar
86-
87-
- name: Upload Durable Task Sidecar Logs
88-
uses: actions/upload-artifact@v4
89-
with:
90-
name: Durable Task Sidecar Logs
91-
path: durabletask-sidecar.log
92-
93-
- name: Archive test report
94-
uses: actions/upload-artifact@v4
95-
with:
96-
name: Integration test report
97-
path: client/build/reports/tests/integrationTest
98-
9974
- name: Upload JAR output
10075
uses: actions/upload-artifact@v4
10176
with:
10277
name: Package
10378
path: client/build/libs
10479

105-
- name: Fail the job if tests failed
106-
if: env.TEST_FAILED == 'true'
107-
run: exit 1
108-
109-
- name: Publish to local
110-
run: ./gradlew publish
80+
- name: Publish to ossrh
81+
run: |
82+
echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg
83+
export GPG_TTY=$(tty)
84+
gpg --batch --import private-key.gpg
85+
./gradlew publish

settings.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
rootProject.name = 'durabletask-java'
22

33
include ":client"
4-
include ":azurefunctions"
5-
include ":azuremanaged"
6-
include ":samples"
7-
include ":samples-azure-functions"
8-
include ":endtoendtests"
4+
//include ":azurefunctions"
5+
//include ":azuremanaged"
6+
//include ":samples"
7+
//include ":samples-azure-functions"
8+
//include ":endtoendtests"
99

settings.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
OSSRH_USER_TOKEN and OSSRH-PWD_TOKEN: The username and password tokens for your OSSRH account
3+
GPG_KEY: the name of the GPG key file to use for signing e.g. F784FAB8
4+
GPG_PWD: the password to access the GPG key
5+
-->
6+
7+
<settings>
8+
<servers>
9+
<server>
10+
<id>ossrh</id>
11+
<username>${env.OSSRH_USER_TOKEN}</username>
12+
<password>${env.OSSRH_PWD_TOKEN}</password>
13+
</server>
14+
</servers>
15+
<profiles>
16+
<profile>
17+
<activation>
18+
<activeByDefault>true</activeByDefault>
19+
</activation>
20+
<properties>
21+
<gpg.keyname>${env.GPG_KEY}</gpg.keyname>
22+
<gpg.passphrase>${env.GPG_PWD}</gpg.passphrase>
23+
</properties>
24+
</profile>
25+
</profiles>
26+
</settings>

0 commit comments

Comments
 (0)