-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (71 loc) · 2.68 KB
/
ci.yml
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
name: 'Continuous Integration'
on:
push:
workflow_dispatch:
schedule:
- cron: '7 0 * * SUN'
env:
GRADLE_OPTS: >-
-Dorg.gradle.project.eu.xenit.cloudsmith.username=${{ secrets.CLOUDSMITH_USER }}
-Dorg.gradle.project.eu.xenit.cloudsmith.password=${{ secrets.CLOUDSMITH_APIKEY }}
jobs:
integration-test:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- solr6
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Add license
run: |
touch ./src/integrationTest/resources/license61/license.lic
echo ${{secrets.ALFRESCO_LICENSE61}} > ./src/integrationTest/resources/license61/license.lic
chmod 666 ./src/integrationTest/resources/license61/license.lic
- name: Login to Docker
run: |
echo "${{ secrets.CLOUDSMITH_APIKEY }}" | docker login private.docker.xenit.eu --username "${{ secrets.CLOUDSMITH_USER }}" --password-stdin
- name: Run integration tests
env:
VERSIONS_TO_BUILD: ${{ matrix.version }}
run: ./gradlew integrationTests --info
- name: Upload Artifact
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-result
path: /home/runner/work/**/build/reports
retention-days: 2
publish:
needs: [ integration-test ]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}
strategy:
matrix:
version:
- solr6
steps:
- uses: actions/checkout@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Login to CloudSmith
run: |
echo "${{ secrets.CLOUDSMITH_APIKEY }}" | docker login private.docker.xenit.eu --username "${{ secrets.CLOUDSMITH_USER }}" --password-stdin
# We have to split out publishing to public and private repo's because pushing to docker.io does not seem to work
# without supplying DOCKER_USER and DOCKER_PASSWORD. However, supplying those environment variables breaks
# publishing to other repositories
- name: Publish public docker images
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
VERSIONS_TO_BUILD: ${{ matrix.version }}
run: ./gradlew pushDockerImage -PincludeEnterprise=false
- name: Publish private docker images
env:
VERSIONS_TO_BUILD: ${{ matrix.version }}
run: ./gradlew pushDockerImage -PincludeCommunity=false