-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 2.21 KB
/
master-initial-commit.yml
File metadata and controls
62 lines (51 loc) · 2.21 KB
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
name: Base/initial commit
###
# This workflow is intended to run on repo cloning/templating
# Baseline the service version in pom.xml and push to ECR
###
on:
push:
branches:
- develop
jobs:
compile:
runs-on: ubuntu-latest
strategy:
matrix:
java: [11]
name: Build project with Java ${{ matrix.java }}
timeout-minutes: 30
env:
DEVOPS_CICD_ECR_BASE_URL: ${{ secrets.DEVOPS_CICD_ECR_BASE_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BB_USERNAME: ${{ secrets.BB_USERNAME }}
BB_PASSWORD: ${{ secrets.BB_PASSWORD }}
BB_GITHUB_PACKAGES_USER: botuser
BB_GITHUB_PACKAGES_PAT: ${{ secrets.BB_GITHUB_PACKAGES_PAT}}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Setup java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Maven Setup settings.xml with BB credentials
uses: whelk-io/maven-settings-xml-action@v4
with:
repositories: '[{ "id": "Backbase Repository", "url": "https://repo.backbase.com/artifactory/repo" }, { "id": "github", "url": "https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/common" }]'
plugin_repositories: '[{ "id": "Backbase Repository", "url": "https://repo.backbase.com/artifactory/repo" }]'
servers: '[{ "id": "Backbase Repository", "username": "${BB_USERNAME}", "password": "${BB_PASSWORD}" }, { "id": "github", "username": "${BB_GITHUB_PACKAGES_USER}", "password": "${BB_GITHUB_PACKAGES_PAT}" }]'
- name: Set git username and email
run: |
git config --global user.email "bot@backbase.com"
git config --global user.name "Github Actions BOT"
- name: Generate sources and install dependencies
run: mvn -e clean install
- name: Publish to GitHub Packages
run: mvn deploy -Drevision=${{ github.run_number }} -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/common