Skip to content

Commit fefb3db

Browse files
chore: squashed commits
1 parent 6be6fff commit fefb3db

24 files changed

Lines changed: 350 additions & 650 deletions

File tree

.github/workflows/release.yml

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,20 @@ on:
55
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
66

77
name: Create Release
8-
permissions:
9-
contents: write
108

119
jobs:
1210
build:
13-
name: 🔖 Create Release
11+
name: Create Release
1412
runs-on: ubuntu-22.04
1513
steps:
16-
- name: 🏗️ Checkout code
14+
- name: Checkout code
1715
uses: actions/checkout@v2
1816

19-
- name: 📝 Get Release Changes
17+
- name: Get Release Changes
2018
id: recentCommits
2119
run: |
2220
echo ::set-output name=release_body::$(git log --no-merges --pretty=format:'%s' $(git describe --abbrev=0 --tags)...HEAD)
23-
- name: 🚀 Create Release
21+
- name: Create Release
2422
id: create_release
2523
uses: actions/create-release@v1
2624
env:
@@ -32,30 +30,79 @@ jobs:
3230
draft: false
3331
prerelease: false
3432

35-
sync-to-main:
36-
name: 🔄 Sync Release to Main
33+
zip-recipes:
3734
runs-on: ubuntu-22.04
3835
needs: build
3936
steps:
40-
- name: 🏗️ Checkout main branch
37+
- name: Checkout code
4138
uses: actions/checkout@v2
39+
40+
- name: Get release
41+
id: get_release
42+
uses: bruceadams/get-release@v1.2.2
43+
env:
44+
GITHUB_TOKEN: ${{ github.token }}
45+
46+
- name: Write version
47+
uses: DamianReeves/write-file-action@v1.0
48+
with:
49+
path: recipes/version.txt
50+
contents: ${{ steps.get_release.outputs.tag_name }}
51+
write-mode: overwrite
52+
53+
- name: Zip recipes
54+
uses: vimtor/action-zip@v1
55+
with:
56+
files: recipes/ version.txt
57+
dest: recipes.zip
58+
59+
- name: Upload recipes zip file to GitHub
60+
uses: actions/upload-release-asset@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4263
with:
43-
ref: main
44-
fetch-depth: 0
45-
token: ${{ secrets.NR_DEVELOPER_TOOLKIT_TOKEN }}
64+
upload_url: ${{ steps.get_release.outputs.upload_url }}
65+
asset_path: ${{ github.workspace }}/recipes.zip
66+
asset_name: recipes.zip
67+
asset_content_type: application/octet-stream
4668

47-
- name: ⚙️ Setup bot git identity
69+
- name: Install aws cli
70+
run: |
71+
sudo apt-get update -y
72+
sudo apt-get install awscli -y
73+
74+
- name: Write config 1
75+
uses: DamianReeves/write-file-action@v1.0
76+
with:
77+
path: /home/runner/.aws/credentials
78+
contents: |
79+
[virtuoso_user]
80+
aws_access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }}
81+
aws_secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}
82+
write-mode: overwrite
83+
84+
- name: Write config 2
85+
uses: DamianReeves/write-file-action@v1.0
86+
with:
87+
path: /home/runner/.aws/config
88+
contents: |
89+
[profile virtuoso]
90+
role_arn = ${{ secrets.AWS_ROLE_ARN }}
91+
region = ${{ secrets.AWS_DEFAULT_REGION }}
92+
source_profile = virtuoso_user
93+
write-mode: overwrite
94+
95+
- name: Upload recipes zip file to S3 (download.newrelic.com)
96+
id: upload-recipes-s3
97+
run: |
98+
aws s3 cp ${{ github.workspace }}/recipes.zip s3://nr-downloads-main/install/open-install-library/${{ steps.get_release.outputs.tag_name }}/recipes.zip --profile virtuoso
99+
100+
- name: Upload currentVersion.txt to S3
101+
id: upload-current-version-s3
48102
run: |
49-
git config --global user.name "nr-developer-toolkit"
50-
git config --global user.email "developer-toolkit@newrelic.com"
103+
aws s3 cp recipes/version.txt s3://nr-downloads-main/install/open-install-library/currentVersion.txt --profile virtuoso --cache-control no-cache
51104
52-
- name: 🖊️ Push empty release commit
105+
- name: Cleanup configs
53106
run: |
54-
git fetch origin main
55-
git reset --hard origin/main
56-
TAG_NAME=${GITHUB_REF#refs/tags/}
57-
TIMESTAMP=$(TZ='Asia/Kolkata' date +'%d-%m-%YT%H:%M')
58-
echo "📝 Creating commit for $TAG_NAME at $TIMESTAMP"
59-
git commit --allow-empty --no-verify -m "chore(release): 🛢️ Release $TAG_NAME $TIMESTAMP"
60-
echo "🚀 Attempting direct push to main..."
61-
git push --no-verify origin HEAD:main
107+
rm -rf /home/runner/.aws/credentials
108+
rm -rf /home/runner/.aws/config

recipes/newrelic/apm/dotNet/linux-systemd.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,7 @@ install:
272272
sudo apt-get -o Acquire::Check-Valid-Until=false update >/dev/null
273273
sudo apt-get install newrelic-dotnet-agent -y -qq > /dev/null
274274
else
275-
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm || true
276-
cat << REPO | sudo tee "/etc/yum.repos.d/newrelic-dotnet-agent.repo" > /dev/null
277-
[newrelic-dotnet-agent-repo]
278-
name=New Relic .NET Core packages for Enterprise Linux
279-
baseurl=http://yum.newrelic.com/pub/newrelic/el7/\$basearch
280-
enabled=1
281-
gpgcheck=1
282-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NewRelic
283-
REPO
275+
curl -s https://download.newrelic.com/dot_net_agent/yum/newrelic-dotnet-agent.repo -o /etc/yum.repos.d/newrelic-dotnet-agent.repo >/dev/null
284276
sudo yum install newrelic-dotnet-agent -q -y
285277
fi
286278
- echo "New Relic .NET agent installed"

0 commit comments

Comments
 (0)