Skip to content

Commit

Permalink
Merge pull request #564 from logicalclocks/22.10-dev
Browse files Browse the repository at this point in the history
Merge 22.10 into 24.10
  • Loading branch information
olapiv authored Nov 14, 2024
2 parents 314e2e6 + d08c787 commit 3e44bd5
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/publish_rondb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- "21.04.[0-9]+"
- "22.10.[0-9]+"
- "24.10.[0-9]+"
tags:
- "rondb-21.04.[0-9]+"
- "rondb-22.10.[0-9]+"
- "rondb-24.10.[0-9]+"

# This is important because the jobs are expensive and we don't want to wait a lot of time.
# This cancel-in-progress only works per branch, if a previous commit launched a job, a
Expand All @@ -36,6 +40,23 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- run: cat ./MYSQL_VERSION

- name: Extract Git tag
if: startsWith(github.ref, 'refs/tags/rondb-')
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/rondb-}" >> $GITHUB_ENV

- name: Verify RONDB_VERSION
if: startsWith(github.ref, 'refs/tags/rondb-')
shell: bash
run: |
source ./MYSQL_VERSION
RONDB_VERSION="$MYSQL_VERSION_MAJOR.$MYSQL_VERSION_MINOR.$MYSQL_VERSION_PATCH"
if [ "$RONDB_VERSION" != "$TAG_NAME" ]; then
echo "Error: RONDB_VERSION ($RONDB_VERSION) does not match the tag version ($TAG_NAME)"
exit 1
fi
- name: Set up SSH
run: |
mkdir -p "$HOME/.ssh"
Expand All @@ -54,8 +75,6 @@ jobs:
# Add the host key to the known_hosts file if it is not already present
grep -qxF "$REPO_PUBLIC_KEY" "$KNOWN_HOSTS_FILE" || echo "$REPO_PUBLIC_KEY" >> "$KNOWN_HOSTS_FILE"
- run: cat ./MYSQL_VERSION

- name: Build RonDB Tarball
run: |
BUILD_CORES=$(nproc)
Expand Down Expand Up @@ -96,14 +115,15 @@ jobs:
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
# Manual dispatches will only be dev tarballs
echo "This workflow was triggered via a dispatch."
user_code_path="/opt/repository/master/rondb-dev"
else
echo "This workflow was not triggered by a dispatch."
# We won't upload to repo.hops.works/master directly;
# This is handled by a cron job that checks whether the
# tarball already exists first
user_code_path="/home/$REPO_HOPSWORKS_USER/upload_area"
fi
echo "Copying $tarball to $host_user:$user_code_path/"
scp ./$tarball $host_user:$user_code_path/
echo "Copying $tarball to $host_user:$user_code_path"
scp ./$tarball $host_user:$user_code_path
# Delete the tarball after it has been uploaded
rm -f $tarball

0 comments on commit 3e44bd5

Please sign in to comment.