-
Notifications
You must be signed in to change notification settings - Fork 8
63 lines (54 loc) · 2.05 KB
/
maven.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
# This workflow will build a Java project with Maven...
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# Note - This action is temporary being used to help drive a GitOps trial and will be removed in the future
# Updated with custom plugin/action (...)
name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 1 * *'
# The jobs...
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: mvn -q clean verify -Denv.DEVOPS_FRAMEWORK_UNITTESTS=true -DskipTests=true
docker-build:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3 # Checkout the source
- name: Login to DockerHub...
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | \
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build Docker image
run: |
docker build . -f docker/Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/jenkinsdsl:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/jenkinsdsl:latest
# Action to get the digest...
- name: GitOps Helm Chart Update(s)
uses: tpayne/github-actions/productmanifest@main
env:
API_TOKEN_GITHUB: ${{ secrets.XGITHUB_PAT }}
with:
gitops-repo-url: https://github.com/tpayne/codefresh-csdp-samples
manifest-file: helm/dev/values.yaml
github-username: ${{ secrets.XGITHUB_USER }}
github-email: ${{ secrets.XGITHUB_EMAIL }}
image-list: jenkinscd-framework-deployment:${{ secrets.DOCKERHUB_USERNAME }}/jenkinsdsl:latest
git-token: ${{ secrets.XGITHUB_PAT }}
registry-server: docker.io
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_PASSWORD }}
# End of job