-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into is-nethermind-libs
- Loading branch information
Showing
390 changed files
with
65,366 additions
and
55,188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Release to Production | ||
|
||
* [Deployment Design Doc](https://www.notion.so/Deployment-Design-Doc-67f4fb5fb7574320a45dd63082ec4adf) | ||
* [Deployment User Guide](https://www.notion.so/audiusproject/Deployment-User-Guide-708a8f64881740219d3f77707e73a097) | ||
|
||
Called via audius-protocol's CircleCI project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
script=bump-hotfix | ||
docker build \ | ||
-t ${script} \ | ||
.circleci/release-scripts/dockerfiles/${script} | ||
|
||
SSH_KEY=$(cat ssh_keys/id_rsa_d00ba019ac4658e46cac3499f61b31bb) | ||
docker run \ | ||
-ti \ | ||
-e SSH_KEY="${SSH_KEY}" \ | ||
-e GH_TOKEN="${GH_TOKEN}" \ | ||
${script} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
script=cut-release | ||
docker build \ | ||
-t ${script} \ | ||
.circleci/release-scripts/dockerfiles/${script} | ||
|
||
SSH_KEY=$(cat ssh_keys/id_rsa_d00ba019ac4658e46cac3499f61b31bb) | ||
docker run \ | ||
-ti \ | ||
-e SSH_KEY="${SSH_KEY}" \ | ||
-e GH_TOKEN="${GH_TOKEN}" \ | ||
${script} |
35 changes: 35 additions & 0 deletions
35
.circleci/release-scripts/dockerfiles/bump-hotfix/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV WORKDIR /app | ||
WORKDIR ${WORKDIR} | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
git \ | ||
gnupg \ | ||
jq \ | ||
moreutils \ | ||
wget \ | ||
&& sh -c "echo 'deb https://gitsecret.jfrog.io/artifactory/git-secret-deb git-secret main' \ | ||
>> /etc/apt/sources.list" \ | ||
&& wget -q 'https://gitsecret.jfrog.io/artifactory/api/gpg/key/public' -O /tmp/gitsecret.key \ | ||
&& md5sum /tmp/gitsecret.key | grep -q "e941935ec5dd72a60086e1b5112ade3d" \ | ||
|| exit \ | ||
&& apt-key add /tmp/gitsecret.key \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
git-secret | ||
|
||
WORKDIR /tmp | ||
RUN wget https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz \ | ||
&& md5sum ghr_v0.15.0_linux_amd64.tar.gz | grep -q "b820693296a40bddb3873284f6051b87" \ | ||
|| exit \ | ||
&& tar xf ghr_v0.15.0_linux_amd64.tar.gz \ | ||
&& mv ghr_v0.15.0_linux_amd64/ghr ${WORKDIR}/ | ||
WORKDIR ${WORKDIR} | ||
|
||
RUN git clone https://github.com/AudiusProject/audius-protocol.git | ||
|
||
COPY bump.sh ./ | ||
|
||
CMD ./bump.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
# required for ./ghr to create and tag Github Releases | ||
if [ "${GH_TOKEN}" == "" ]; then | ||
echo '$GH_TOKEN not set.' | ||
exit 1 | ||
fi | ||
|
||
# ensure ability to connect to Github | ||
eval $(ssh-agent) | ||
mkdir -p ~/.ssh/ | ||
echo "$SSH_KEY" > ~/.ssh/id_rsa | ||
chmod 400 ~/.ssh/id_rsa | ||
ssh-add ~/.ssh/id_* | ||
ssh-keyscan -H github.com >> ~/.ssh/known_hosts | ||
ssh -T git@github.com || true | ||
git config --global user.email "audius-infra@audius.co" | ||
git config --global user.name "audius-infra" | ||
git config --global url."git@github.com:".insteadOf "https://github.com/" | ||
|
||
# work in and always update the repo | ||
cd ${WORKDIR}/audius-protocol | ||
git pull | ||
|
||
# grab latest release version and hash | ||
RELEASE_VERSION=$(jq -r .version ${WORKDIR}/audius-protocol/discovery-provider/.version.json) | ||
OLD_VERSION=$(echo ${RELEASE_VERSION} | awk -F. '{$NF = $NF - 1;} 1' | sed 's/ /./g') | ||
git checkout release-v${RELEASE_VERSION} | ||
RELEASE_HASH=$(git rev-parse HEAD) | ||
|
||
function generate-changelog() { | ||
( | ||
SERVICE=${1} | ||
START_COMMIT=$(git show-ref --hash refs/tags/@audius/${SERVICE}@${OLD_VERSION}) | ||
CHANGE_LOG=$(git log --pretty=format:'[%h] - %s' --abbrev-commit ${START_COMMIT}..${RELEASE_HASH} ${SERVICE}) | ||
echo -e "Full Changelog:\n${CHANGE_LOG}" | ||
) | ||
} | ||
|
||
# recreate Github Releases (prerelease) + Git Tags | ||
${WORKDIR}/ghr \ | ||
-token ${GH_TOKEN} \ | ||
-username AudiusProject \ | ||
-repository audius-protocol \ | ||
-commitish ${RELEASE_HASH} \ | ||
-body "$(generate-changelog discovery-provider)" \ | ||
-name "Discovery Provider ${RELEASE_VERSION}" \ | ||
-delete \ | ||
-prerelease \ | ||
@audius/discovery-provider@${RELEASE_VERSION} | ||
|
||
${WORKDIR}/ghr \ | ||
-token ${GH_TOKEN} \ | ||
-username AudiusProject \ | ||
-repository audius-protocol \ | ||
-commitish ${RELEASE_HASH} \ | ||
-body "$(generate-changelog creator-node)" \ | ||
-name "Creator Node ${RELEASE_VERSION}" \ | ||
-delete \ | ||
-prerelease \ | ||
@audius/creator-node@${RELEASE_VERSION} |
Oops, something went wrong.