Skip to content

Commit

Permalink
fix: apm sourcemap upload (#55)
Browse files Browse the repository at this point in the history
* fix: apm sourcemap upload

* fix: service name for apm

* fix: for loop for sourcemap discovery
  • Loading branch information
mathewmeconry authored Sep 7, 2022
1 parent 00fa247 commit e36c812
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/deploy_fleek.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,32 @@ jobs:
env:
COMMIT_SHA: ${{ github.sha }}
run: |
for f in ./build/static/**/*.js.map ; do
curl -X POST https://apm-monitoring.aragon.org/assets/v1/sourcemaps -F service_name="court" -F service_version="$COMMIT_SHA" -F bundle_filepath="http://localhost/static/js/bundle.js" -F sourcemap=@$f
for f in $(find ./build/static/ -name *.js.map) ; do
curl -X POST "https://kibana-sourcemaps.aragon.org/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${{ secrets.APM_API_KEY }}' \
-F service_name="court" \
-F service_version="$COMMIT_SHA" \
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \
-F sourcemap=@$f
done
build-deploy-develop:
runs-on: ubuntu-latest
container: fleek/create-react-app:node-15
if: github.ref == 'refs/heads/develop'
strategy:
matrix:
environment: ['RINKEBY', 'STAGING']
environment: ["RINKEBY", "STAGING"]
include:
- environment: 'RINKEBY'
fleekfile: 'rinkeby.json'
environment_name: 'rinkeby'
subgraph_name: ''
- environment: 'STAGING'
fleekfile: 'staging.json'
environment_name: 'staging'
subgraph_name: 'staging'
- environment: "RINKEBY"
fleekfile: "rinkeby.json"
environment_name: "rinkeby"
subgraph_name: ""
- environment: "STAGING"
fleekfile: "staging.json"
environment_name: "staging"
subgraph_name: "staging"
environment: ${{ matrix.environment }}
steps:
- uses: actions/checkout@v2
Expand All @@ -80,7 +87,7 @@ jobs:
REACT_APP_CHAIN_ID: 4
REACT_APP_ETHERSCAN_ENDPOINT: ${{ secrets.REACT_APP_ETHERSCAN_ENDPOINT }}
REACT_APP_SUBGRAPH_NAME: ${{ matrix.subgraph_name }}
run: yarn build
run: yarn build
- name: Activate fleek
env:
FLEEK_FILE: ${{ matrix.fleekfile }}
Expand All @@ -96,6 +103,13 @@ jobs:
env:
COMMIT_SHA: ${{ github.sha }}
run: |
for f in ./build/static/**/*.js.map ; do
curl -X POST https://apm-monitoring.aragon.org/assets/v1/sourcemaps -F service_name="court" -F service_version="$COMMIT_SHA" -F bundle_filepath="http://localhost/static/js/bundle.js" -F sourcemap=@$f
done
for f in $(find ./build/static/ -name *.js.map) ; do
curl -X POST "https://kibana-sourcemaps.aragon.org/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${{ secrets.APM_API_KEY }}' \
-F service_name="court" \
-F service_version="$COMMIT_SHA" \
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \
-F sourcemap=@$f
done

0 comments on commit e36c812

Please sign in to comment.