Skip to content

Commit

Permalink
NH-37575: consolidate workflow and use name attribute to resolve conf…
Browse files Browse the repository at this point in the history
…lict for artifact upload and update long-running benchmark container registry path.
  • Loading branch information
cleverchuk committed Jun 27, 2024
1 parent 227dfbc commit ac683fd
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 167 deletions.
69 changes: 52 additions & 17 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,8 +183,9 @@ jobs:
cd smoke-tests
./gradlew test -s
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: lambda-release-test
with:
path: smoke-tests/build/reports/tests/test

Expand All @@ -204,8 +196,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 @@ -301,6 +291,7 @@ jobs:
done
- uses: actions/upload-artifact@v4
name: arns
with:
path: arns.txt

Expand All @@ -310,8 +301,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 @@ -332,8 +321,7 @@ 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 +335,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()
name: release-test
with:
path: smoke-tests/build/reports/tests/test

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

This file was deleted.

13 changes: 4 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,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 +102,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 +120,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 +163,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 @@ -264,15 +258,14 @@ jobs:
done
- uses: actions/upload-artifact@v4
name: arns
with:
path: arns.txt

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 @@ -289,10 +282,12 @@ jobs:
./gradlew test
- uses: actions/upload-artifact@v4
name: benchmark-summary
with:
path: benchmark/results/release/summary.txt

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

Expand Down
6 changes: 3 additions & 3 deletions long-running-test-arch/k8s/cronjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- name: docker-cred
containers:
- name: k6-inst
image: ghcr.io/solarwinds-cloud/xk6:latest
image: ghcr.io/solarwinds/xk6:latest
imagePullPolicy: Always
args:
- "--out"
Expand Down Expand Up @@ -79,7 +79,7 @@ spec:
- name: docker-cred
containers:
- name: k6-inst-rc
image: ghcr.io/solarwinds-cloud/xk6:latest
image: ghcr.io/solarwinds/xk6:latest
imagePullPolicy: Always
args:
- "--out"
Expand Down Expand Up @@ -130,7 +130,7 @@ spec:
- name: docker-cred
containers:
- name: k6-uninst
image: ghcr.io/solarwinds-cloud/xk6:latest
image: ghcr.io/solarwinds/xk6:latest
imagePullPolicy: Always
args:
- "--out"
Expand Down
4 changes: 2 additions & 2 deletions long-running-test-arch/k8s/deployment-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
- name: docker-cred
containers:
- name: petclinic-ins
image: ghcr.io/solarwinds-cloud/petclinic:agent-latest
image: ghcr.io/solarwinds/petclinic:agent-latest
imagePullPolicy: Always
ports:
- containerPort: 8080
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
- name: docker-cred
containers:
- name: petclinic-ins-rc
image: ghcr.io/solarwinds-cloud/petclinic:agent-rc
image: ghcr.io/solarwinds/petclinic:agent-rc
imagePullPolicy: Always
ports:
- containerPort: 8080
Expand Down

0 comments on commit ac683fd

Please sign in to comment.