-
Notifications
You must be signed in to change notification settings - Fork 2
108 lines (93 loc) · 3.17 KB
/
lambda-test.yml
File metadata and controls
108 lines (93 loc) · 3.17 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Lambda Release Test
on:
workflow_dispatch:
workflow_run:
workflows: [Push]
types:
- completed
permissions:
packages: write
contents: read
id-token: write
security-events: write
env:
SW_APM_DEBUG_LEVEL: trace
AGENT_DOWNLOAD_URL: https://agent-binaries.global.st-ssp.solarwinds.com/apm/java/latest/solarwinds-apm-agent.jar
SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR }}
SW_APM_SERVICE_KEY_AO: ${{ secrets.SW_APM_SERVICE_KEY_AO }}
SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }}
GITHUB_USERNAME: ${{ github.actor }}
SWO_LOGIN_URL: ${{ secrets.SWO_LOGIN_URL }}
SWO_HOST_URL: ${{ secrets.SWO_HOST_URL }}
SWO_EMAIL: ${{ secrets.SWO_EMAIL }}
SWO_PWORD: ${{ secrets.SWO_PWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
jobs:
lambda-release-test:
runs-on: ubuntu-latest
env:
LAMBDA: "true"
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}
steps:
- uses: actions/checkout@v6
- name: Free Disk Space before Build
run: |
echo "Disk space before pre-build cleanup:"
df -h
docker system prune -af
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
echo "Disk space after pre-build cleanup:"
df -h
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: Set agent version
id: set_version
uses: ./.github/actions/version
- name: Set snapshot version
run: |
GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
echo "AGENT_VERSION=${{ steps.set_version.outputs.version }}.$GIT_HASH" >> $GITHUB_ENV
- name: Build smoke-test
run: |
cd smoke-tests
./gradlew build -x test
- name: Build webmvc jar
run: |
cd smoke-tests
./gradlew :spring-boot-webmvc:build
- name: Build webmvc image
run: |
cd smoke-tests/spring-boot-webmvc
docker image build --tag smt:webmvc .
- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
- name: Execute smoke tests
run: |
cd smoke-tests
./gradlew test --tests "com.solarwinds.LambdaTest" -Pno-reports
- name: Free Disk Space After Build
run: |
echo "Disk space before post-build cleanup:"
df -h
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf smoke-tests/build/
echo "Disk space after post-build cleanup:"
df -h
- name: Docker logout
if: always()
run: docker logout