forked from cardano-community/guild-operators
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue/1756 mithril script updates (#27)
* syntactic bug in entrypoint.sh cardano-community#1757 * Remove uneeded UPDATE_CHECK=N exports now that it is a default of the image ENV variables * export G_ACCOUNT so guild-deploy.sh inherits it during forked builds * Set defaults for G_ACCOUNT and GUILD_DEPLOY_BRANCH to simplify manual docker build commands * Fix bug where updating cncli.sh cardano-community#1756 mithril-client binary command/subcommand changes replace snapshot with cardano-db cardano-community#1759 * Add reference to MITHRIL_DOWNLOAD for snapshot sync in regular docs * export each line of mithril.env for the signer use tee for logging to not hide issues/errors * Fix for PARTY_ID used in verify_signer_request and verify_signer_signature * Move sanchonet to RELEASE=testing * Update configs and node version support for 8.9.x (cardano-community#1743) ## Description <!--- Describe your changes --> - [x] Update topology formats - [x] Update baseline node version references - [x] Update node/cli dependency refs and pre-downloaded binaries - [x] Update document references - [x] Update dbsync version * SANCHONET/PREVIEW - adjustments to support sanchonet and preview versions of mithril for guild-deploy.sh downloading. * linting and indentation consistentcy for entrypoint.sh * Workflows to get updated pre/unstable release as well as rebase preview and sanchonet branches. Occurs on push to alpha, workflow dispatch, and scheduled intervals * Docker Image workflow determine cnversion to use based on the guild_deploy_branch name. - When branch preview/sanchonet use prerelease node version. - For any other branch use the original logic for latest (stable) node version. --------- Co-authored-by: RdLrT <[email protected]>
- Loading branch information
1 parent
a8743cb
commit 4c37b1d
Showing
14 changed files
with
890 additions
and
427 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
name: Autoupdate testing branches | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- alpha | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
start-summary: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set summary details | ||
run: | | ||
echo "## Autoupdate Testing Branches Summary Details" >> $GITHUB_STEP_SUMMARY | ||
echo "| Name | Value |" >> $GITHUB_STEP_SUMMARY | ||
echo "| ------------ | ---------------------------------------- |" >> $GITHUB_STEP_SUMMARY | ||
echo "| GitHub Actor | ${GITHUB_ACTOR} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| GitHub Email | ${GITHUB_ACTOR}@users.noreply.github.com |" >> $GITHUB_STEP_SUMMARY | ||
get-node-prerelease: | ||
needs: start-summary | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
branch: [preview, sanchonet] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ matrix.branch }} | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Get current SHA | ||
id: set_sha | ||
run: | | ||
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Fetch node pre-release version | ||
run: | | ||
curl -sL https://api.github.com/repos/IntersectMBO/cardano-node/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -1 > files/docker/node/release-versions/cardano-node-prerelease.txt | ||
- name: Assigns pre-release version | ||
run: | | ||
echo "PRERELEASE_VERSION=$(cat files/docker/node/release-versions/cardano-node-prerelease.txt)" >> $GITHUB_ENV | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
MODIFIED=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | ||
echo "MODIFIED=${MODIFIED}" >> "$GITHUB_OUTPUT" | ||
- name: Set summary details | ||
if: always() | ||
run: | | ||
echo "## Get Node Pre-Release ${{ matrix.branch }}" >> $GITHUB_STEP_SUMMARY | ||
echo "| Name | Value |" >> $GITHUB_STEP_SUMMARY | ||
echo "| -------------------- | ---------------------------------------------------------- |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Prerelease Version | ${PRERELEASE_VERSION} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Repository Modified | ${{ steps.git-check.outputs.MODIFIED }} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Modified files | $(git diff --name-only $(echo ${{ steps.set_sha.outputs.COMMIT_SHA }}) | tr '\n' ',') |" >> $GITHUB_STEP_SUMMARY | ||
- name: Commit latest pre-release versions | ||
if: steps.git-check.outputs.MODIFIED == 'true' | ||
run: | | ||
git add files/docker/node/release-versions/cardano-node-prerelease.txt | ||
git commit -am "New mithril pre-release versions: pre-release ${PRERELEASE_VERSION}" | ||
git push | ||
get-mithril-prerelease: | ||
needs: get-node-prerelease | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: preview | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Get current SHA | ||
id: set_sha | ||
run: | | ||
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Fetch Mithril release and pre-release versions | ||
run: | | ||
mithril_release="$(curl -s https://api.github.com/repos/input-output-hk/mithril/releases/latest | jq -r '.tag_name')" | ||
mithril_prerelease="$(curl -s https://api.github.com/repos/input-output-hk/mithril/releases | jq -r '.[] | select(.prerelease == true) | select(.tag_name | endswith("-pre")) | .tag_name' | head -n 1)" | ||
if [[ "${mithril_release}-pre" == "${mithril_prerelease}" ]]; then | ||
echo "${mithril_release}" > files/docker/node/release-versions/mithril-prerelease.txt | ||
PRERELEASE_VERSION=${mithril_release} | ||
echo "PRERELEASE_VERSION=${PRERELEASE_VERSION}" >> $GITHUB_ENV | ||
echo "RELEASE_MATCH=True" >> $GITHUB_ENV | ||
else | ||
echo "${mithril_prerelease}" > files/docker/node/release-versions/mithril-prerelease.txt | ||
PRERELEASE_VERSION=${mithril_prerelease} | ||
echo "PRERELEASE_VERSION=${PRERELEASE_VERSION}" >> $GITHUB_ENV | ||
echo "RELEASE_MATCH=False" >> $GITHUB_ENV | ||
fi | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
MODIFIED=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | ||
echo "MODIFIED=${MODIFIED}" >> "$GITHUB_OUTPUT" | ||
- name: Set summary details | ||
if: always() | ||
run: | | ||
echo "## Get Mithril Pre-Release" >> $GITHUB_STEP_SUMMARY | ||
echo "| Name | Value |" >> $GITHUB_STEP_SUMMARY | ||
echo "| ----------------------------- | -------------------------------------------------------- |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Pre-release version | ${PRERELEASE_VERSION} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Pre-release matches Release | ${RELEASE_MATCH} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Repository Modified | ${{ steps.git-check.outputs.MODIFIED }} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Modified files | $(git diff --name-only $(echo ${{ steps.set_sha.outputs.COMMIT_SHA }}) | tr '\n' ',') |" >> $GITHUB_STEP_SUMMARY | ||
- name: Commit latest pre-release versions | ||
if: steps.git-check.outputs.MODIFIED == 'true' | ||
run: | | ||
git add files/docker/node/release-versions/mithril-prerelease.txt | ||
git commit -am "New mithril pre-release versions: pre-release ${PRERELEASE_VERSION}" | ||
git push | ||
get-mithril-unstable: | ||
needs: get-node-prerelease | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: sanchonet | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Get current SHA | ||
id: set_sha | ||
run: | | ||
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Fetch Mithril unstable version | ||
run: | | ||
curl -sL https://api.github.com/repos/input-output-hk/mithril/releases | jq -r '.[] | select(.prerelease == true and .tag_name == "unstable") | .tag_name' | head -1 > files/docker/node/release-versions/mithril-unstable.txt | ||
- name: Assign unstable version | ||
run: | | ||
UNSTABLE_VERSION=$(cat files/docker/node/release-versions/mithril-unstable.txt) | ||
echo "UNSTABLE_VERSION=${UNSTABLE_VERSION}" >> $GITHUB_ENV | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
MODIFIED=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | ||
echo "MODIFIED=${MODIFIED}" >> "$GITHUB_OUTPUT" | ||
- name: Set summary details | ||
if: always() | ||
run: | | ||
echo "## Get Mithril Unstable" >> $GITHUB_STEP_SUMMARY | ||
echo "| Name | Value |" >> $GITHUB_STEP_SUMMARY | ||
echo "| -------------------- | ----------------------------------------------------------------------- |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Unstable version | ${UNSTABLE_VERSION} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Repository Modified | ${{ steps.git-check.outputs.MODIFIED }} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Modified files | $(git diff --name-only $(echo ${{ steps.set_sha.outputs.COMMIT_SHA }}) | tr '\n' ',') |" >> $GITHUB_STEP_SUMMARY | ||
- name: Commit latest unstable versions | ||
if: steps.git-check.outputs.MODIFIED == 'true' | ||
run: | | ||
git add files/docker/node/release-versions/mithril-unstable.txt | ||
git commit -am "New mithril unstable versions: unstable ${UNSTABLE_VERSION}" | ||
git push | ||
rebase-testing-branches: | ||
needs: [get-node-prerelease, get-mithril-prerelease, get-mithril-unstable] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
branch: [preview, sanchonet] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ matrix.branch }} | ||
fetch-depth: 0 | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Get current SHA | ||
id: set_sha | ||
run: | | ||
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Fetch alpha | ||
run: | | ||
git fetch origin alpha | ||
- name: Rebase on alpha | ||
run: | | ||
git rebase origin/alpha | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
MODIFIED=$([ "$(git rev-parse HEAD)" != "$(echo ${{ steps.set_sha.outputs.COMMIT_SHA }})" ] && echo "true" || echo "false") | ||
echo "MODIFIED=${MODIFIED}" >> "$GITHUB_OUTPUT" | ||
- name: Set summary details | ||
if: always() | ||
run: | | ||
echo "## Rebase ${{ matrix.branch }}" >> $GITHUB_STEP_SUMMARY | ||
echo "| Name | Value |" >> $GITHUB_STEP_SUMMARY | ||
echo "| --------------------- | ----------------------------------------------------------------------- |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Repository Modified | ${{ steps.git-check.outputs.MODIFIED }} |" >> $GITHUB_STEP_SUMMARY | ||
echo "| Modified Files | $(git diff --name-only $(echo ${{ steps.set_sha.outputs.COMMIT_SHA }}) | tr '\n' ',') |" >> $GITHUB_STEP_SUMMARY | ||
- name: Push changes | ||
if: steps.git-check.outputs.MODIFIED == 'true' | ||
run: | | ||
git push --force-with-lease |
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
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
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
Oops, something went wrong.