Skip to content

Commit

Permalink
NH-37575: use name attribute for artifact upload and update long-runn…
Browse files Browse the repository at this point in the history
…ing benchmark container registry path.
  • Loading branch information
cleverchuk committed Jun 27, 2024
1 parent 227dfbc commit 79965aa
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 171 deletions.
70 changes: 52 additions & 18 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -47,7 +45,7 @@ jobs:

- name: Set agent version env
run: |
echo "AGENT_VERSION=$(cd agent/build/libs && unzip -p solarwinds-apm-agent.jar META-INF/MANIFEST.MF | grep Implementation-Version | awk '{ print $2 }')" >> $GITHUB_ENV
echo "AGENT_VERSION=$(cd agent/build/libs && unzip -p solarwinds-apm-agent.jar META-INF/MANIFEST.MF | grep Implementation-Version | awk '{ print $2 }' | sed 's/[^a-z0-9.-]//g')" >> $GITHUB_ENV
- name: Copy to S3
run: |
Expand Down Expand Up @@ -94,8 +92,6 @@ jobs:
- s3-stage-upload
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
Expand All @@ -119,8 +115,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -161,7 +155,6 @@ jobs:
done
exit $lambda
lambda-release-test:
runs-on: ubuntu-latest
needs:
Expand All @@ -170,8 +163,6 @@ jobs:
LAMBDA: "true"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -192,20 +183,19 @@ jobs:
cd smoke-tests
./gradlew test -s
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
path: smoke-tests/build/reports/tests/test
name: lambda-release-test

- name: Docker logout
run: docker logout

lambda-publish:
lambda-publish-stage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -303,15 +293,14 @@ jobs:
- uses: actions/upload-artifact@v4
with:
path: arns.txt
name: arns

smoke-test-linux:
runs-on: ubuntu-latest
needs:
- s3-stage-upload
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -332,8 +321,6 @@ jobs:
- s3-stage-upload
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -347,3 +334,50 @@ jobs:
.\gradlew.bat :netty-test:run
env:
SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }}:smoke-test-windows

release-test:
runs-on: ubuntu-latest
env:
LAMBDA: "false"
needs:
- s3-stage-upload
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin

- 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: Execute smoke tests
run: |
cd smoke-tests
./gradlew test
- uses: actions/upload-artifact@v4
if: always()
with:
path: smoke-tests/build/reports/tests/test
name: release-test

- name: Docker logout
run: docker logout
136 changes: 0 additions & 136 deletions .github/workflows/release-test.yml

This file was deleted.

15 changes: 4 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -42,8 +40,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -104,8 +100,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -124,7 +118,7 @@ jobs:

- name: Set agent version env
run: |
echo "AGENT_VERSION=$(cd agent/build/libs && unzip -p solarwinds-apm-agent.jar META-INF/MANIFEST.MF | grep Implementation-Version | awk '{ print $2 }')" >> $GITHUB_ENV
echo "AGENT_VERSION=$(cd agent/build/libs && unzip -p solarwinds-apm-agent.jar META-INF/MANIFEST.MF | grep Implementation-Version | awk '{ print $2 }' | sed 's/[^a-z0-9.-]//g')" >> $GITHUB_ENV
- name: Check version doesn't exist
run: |
Expand Down Expand Up @@ -167,8 +161,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -266,13 +258,12 @@ jobs:
- uses: actions/upload-artifact@v4
with:
path: arns.txt
name: arns

benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -291,10 +282,12 @@ jobs:
- uses: actions/upload-artifact@v4
with:
path: benchmark/results/release/summary.txt
name: benchmark-summary

- uses: actions/upload-artifact@v4
with:
path: benchmark/build/reports/tests/test/
name: benchmark-test

- name: Docker logout
run: docker logout
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AOTestCollectorContainer {

public static GenericContainer<?> build(Network network) {
return new GenericContainer<>(
DockerImageName.parse("ghcr.io/solarwinds-cloud/apm-agent-test-collector:v2.0.4"))
DockerImageName.parse("ghcr.io/solarwinds/apm-agent-test-collector:v2.0.4"))
.withNetwork(network)
.withNetworkAliases("AOCollector")
.withLogConsumer(new Slf4jLogConsumer(logger))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,22 @@ void verifyOtelLogExportSystemVariablesAreNotSetWhenDisabled() throws InvalidCon
assertNull(System.getProperty("otel.exporter.otlp.logs.endpoint"));
assertNull(System.getProperty("otel.exporter.otlp.logs.headers"));
}

@Test
@ClearSystemProperty(key = "otel.logs.exporter")
@ClearSystemProperty(key = "otel.exporter.otlp.protocol")
@ClearSystemProperty(key = "otel.exporter.otlp.logs.headers")
@ClearSystemProperty(key = "otel.exporter.otlp.logs.endpoint")
void verifyOtelLogExportEndpointIsProperlyFormed() throws InvalidConfigException {
ConfigContainer configContainer = new ConfigContainer();
configContainer.putByStringValue(ConfigProperty.AGENT_SERVICE_KEY, "token:service");
configContainer.putByStringValue(
ConfigProperty.AGENT_COLLECTOR, "apm.collector.na-02.staging.solarwinds.com");

ConfigurationLoader.configOtelLogExport(configContainer);

assertEquals(
"https://otel.collector.na-02.staging.solarwinds.com",
System.getProperty("otel.exporter.otlp.logs.endpoint"));
}
}
Loading

0 comments on commit 79965aa

Please sign in to comment.