forked from spinnaker/fiat
-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (73 loc) · 2.69 KB
/
fiat-publish.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Branch Build fiat publish
on:
push:
branches:
- OES-1.33.x
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g
jobs:
publish-kork:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Build
env:
NEXUS_VERSION: 1.33.0-SNAPSHOT
run: |
cat <<EOF>> patch
version = "$NEXUS_VERSION"
group = 'io.spinnaker.fiat'
apply plugin: 'maven-publish'
publishing{
publications{
maven(MavenPublication){
groupId = 'io.spinnaker.fiat'
artifactId = 'NEXUSARTIID'
version = '$NEXUS_VERSION'
from components.java
pom {
name = 'NEXUSARTIID'
description = 'A description of nexus library'
}
}
}
repositories {
maven{
name = 'nexus'
url "${{ secrets.NEXUS_URL }}"
credentials {
username = "${{ secrets.NEXUS_USERNAME }}"
password = "${{ secrets.NEXUS_PASSWORD }}"
}
}
}
}
tasks.withType(GenerateModuleMetadata).configureEach {
ppressedValidationErrors.add('enforced-platform')
}
EOF
ls -d */ | grep "fiat" | sed 's/\///g' > ds.txt
cat ds.txt
for i in $(cat ds.txt)
do
sed s/NEXUSARTIID/$i/g patch > patchnew
cat patchnew >> $i/$i.gradle
done
echo "file above"
sed -e '/components\.java/ s/^#*/\/\//' -i fiat-bom/fiat-bom.gradle
sed -e 's/NEXUS_URL/${{ secrets.NEXUS_URL }}/' -i settings.gradle
sed -e 's/NEXUS_USERNAME/${{ secrets.NEXUS_USERNAME }}/' -i settings.gradle
sed -e 's/NEXUS_PASSWORD/${{ secrets.NEXUS_PASSWORD }}/' -i settings.gradle
sed -e 's/NEXUS_USERNAME/${{ secrets.NEXUS_USERNAME }}/' -i build.gradle
sed -e 's/NEXUS_PASSWORD/${{ secrets.NEXUS_PASSWORD }}/' -i build.gradle
sed -e 's/NEXUS_URL/${{ secrets.NEXUS_URL }}/' -i build.gradle
./gradlew --no-daemon -PenableCrossCompilerPlugin=true publish -x test