-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update references from purestake to moonbeam-foundation (#2405)
* Update readme to inform about the organization move * Use new github org * Update doc with new org * Updates purestake references * Adds debug to build * fix docker secrets * fix links * fix docker tagging * better link * Removes debug * typos * migrate images * adds tracing migration images * remove migration * remove polkadot preparation script * migrate previous moonbeam sha image * cleanup migration
- Loading branch information
Showing
34 changed files
with
190 additions
and
452 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 |
---|---|---|
|
@@ -52,14 +52,16 @@ jobs: | |
echo "git_branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | ||
echo "git_ref=$GITHUB_REF" >> $GITHUB_OUTPUT | ||
fi | ||
echo "repo.full_name: ${{ github.event.pull_request.head.repo.full_name }}" | ||
echo "github.repository: ${{ github.repository }}" | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ steps.check-git-ref.outputs.git_ref }} | ||
- name: Get Latest RT Release | ||
id: get-latest-rt | ||
run: | | ||
LATEST_RUNTIME_RELEASE=$(curl -s https://api.github.com/repos/purestake/moonbeam/releases | jq -r '.[] | select(.name | test("runtime";"i")) | .tag_name' | head -n 1 | tr -d '[:blank:]') && [[ ! -z "${LATEST_RUNTIME_RELEASE}" ]] | ||
LATEST_RUNTIME_RELEASE=$(curl -s https://api.github.com/repos/moonbeam-foundation/moonbeam/releases | jq -r '.[] | select(.name | test("runtime";"i")) | .tag_name' | head -n 1 | tr -d '[:blank:]') && [[ ! -z "${LATEST_RUNTIME_RELEASE}" ]] | ||
echo $LATEST_RUNTIME_RELEASE | ||
echo "latest_rt=$LATEST_RUNTIME_RELEASE" >> $GITHUB_OUTPUT | ||
- name: Get Sha | ||
|
@@ -72,7 +74,7 @@ jobs: | |
head -1 | sed 's/.*#//' | cut -c1-8)" >> $GITHUB_OUTPUT | ||
echo "polkadot_ver=$(grep 'frame-system' Cargo.toml | sed -nE 's/.*moonbeam-polkadot-v([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' | head -1)" >> $GITHUB_OUTPUT | ||
ENDPOINT="https://api.github.com/repos/PureStake/moonbeam/git/refs/tags/${{ steps.get-latest-rt.outputs.latest_rt }}" | ||
ENDPOINT="https://api.github.com/repos/moonbeam-foundation/moonbeam/git/refs/tags/${{ steps.get-latest-rt.outputs.latest_rt }}" | ||
RESPONSE=$(curl -s -H "Accept: application/vnd.github.v3+json" $ENDPOINT) | ||
TYPE=$(echo $RESPONSE | jq -r '.object.type') | ||
|
@@ -94,7 +96,7 @@ jobs: | |
id: check-docker-image | ||
run: | | ||
TAG=sha-${{ steps.get-sha.outputs.sha8 }} | ||
echo "image_exists=$(docker image inspect purestake/moonbeam:$TAG > /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT | ||
echo "image_exists=$(docker image inspect moonbeamfoundation/moonbeam:$TAG > /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT | ||
- name: Display variables | ||
run: | | ||
echo git_ref: ${{ steps.check-git-ref.outputs.git_ref }} | ||
|
@@ -229,67 +231,6 @@ jobs: | |
- name: Format code with rustfmt | ||
run: cargo fmt -- --check | ||
|
||
####### Preparing polkadot binary for parachain tests ####### | ||
####### For non-official repo, the script will fail if a new version of | ||
####### polkadot needs to be pushed. | ||
####### This job must not be skipped (otherwise the ts-tests are not run) | ||
|
||
prepare-polkadot: | ||
runs-on: bare-metal | ||
needs: ["set-tags"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
- name: Login to DockerHub | ||
# We should make sure that external PRs can't login to docker, | ||
# but the check to detect if a PR is "external" not work when | ||
# this workflow is trigerred by a push. | ||
if: | | ||
github.event_name == 'push' || | ||
github.event.pull_request.head.repo.full_name == github.repository | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
registry: index.docker.io | ||
- name: Check & build polkadot docker image | ||
run: | | ||
POLKADOT_REPO=${{ needs.set-tags.outputs.polkadot_repo }} | ||
POLKADOT_COMMIT=${{ needs.set-tags.outputs.polkadot_commit }} | ||
DOCKER_TAG="purestake/moonbase-relay-testnet:sha-$POLKADOT_COMMIT" | ||
POLKADOT_EXISTS=$(docker image inspect $DOCKER_TAG > /dev/null && \ | ||
echo "true" || echo "false") | ||
if [[ "$POLKADOT_EXISTS" == "false" ]]; then | ||
# $POLKADOT_COMMIT and $POLKADOT_REPO is used to build the relay image | ||
./scripts/build-alphanet-relay-image.sh | ||
docker push $DOCKER_TAG | ||
fi | ||
- name: Check & prepare para-test docker image | ||
run: | | ||
POLKADOT_REPO=${{ needs.set-tags.outputs.polkadot_repo }} | ||
POLKADOT_COMMIT=${{ needs.set-tags.outputs.polkadot_commit }} | ||
DOCKER_TAG="docker.io/purestake/polkadot-para-tests:sha-$POLKADOT_COMMIT" | ||
POLKADOT_EXISTS=$(docker image inspect $DOCKER_TAG > /dev/null && \ | ||
echo "true" || echo "false") | ||
if [[ "$POLKADOT_EXISTS" == "false" ]]; then | ||
mkdir -p build | ||
MOONBEAM_DOCKER_TAG="docker.io/purestake/moonbase-relay-testnet:sha-$POLKADOT_COMMIT" | ||
# Clear the dummy container if it wasn't properly cleaned up | ||
docker rm -f dummy 2> /dev/null | true | ||
docker create --pull always -ti --name dummy $MOONBEAM_DOCKER_TAG bash | ||
docker cp dummy:/usr/local/bin/polkadot build/polkadot | ||
docker rm -f dummy | ||
docker build . --pull --no-cache -f docker/polkadot-para-tests.Dockerfile \ | ||
--network=host \ | ||
--build-arg HOST_UID="$UID" \ | ||
-t $DOCKER_TAG | ||
docker push $DOCKER_TAG | ||
fi | ||
####### Building and Testing binaries ####### | ||
|
||
cargo-clippy: | ||
|
@@ -398,7 +339,7 @@ jobs: | |
typescript-tests: | ||
runs-on: | ||
labels: bare-metal | ||
needs: ["set-tags", "build", "prepare-polkadot"] | ||
needs: ["set-tags", "build"] | ||
env: | ||
BINARY_PATH: "../build/moonbeam" | ||
steps: | ||
|
@@ -473,7 +414,9 @@ jobs: | |
docker-moonbeam: | ||
runs-on: ubuntu-latest | ||
needs: ["set-tags", "build"] | ||
if: needs.set-tags.outputs.image_exists == false && github.event.pull_request.head.repo.full_name == github.repository | ||
if: | | ||
needs.set-tags.outputs.image_exists == 'false' | ||
&& github.event.pull_request.head.repo.full_name == github.repository | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -486,7 +429,7 @@ jobs: | |
- name: Prepare | ||
id: prep | ||
run: | | ||
DOCKER_IMAGE=purestake/moonbeam | ||
DOCKER_IMAGE=moonbeamfoundation/moonbeam | ||
TAGS="${DOCKER_IMAGE}:sha-${{ needs.set-tags.outputs.sha8 }}" | ||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | ||
|
@@ -501,8 +444,8 @@ jobs: | |
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
username: ${{ secrets.MBF_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.MBF_DOCKERHUB_PASSWORD }} | ||
- name: Build and push moonbeam | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
|
@@ -520,6 +463,17 @@ jobs: | |
org.opencontainers.image.created=${{ steps.prep.outputs.created }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }} | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Tag it with purestake for 6 month | ||
run: | | ||
PURESTAKE_TAG=`echo "${{ steps.prep.outputs.tags }}" | sed 's/moonbeamfoundation/purestake/'` | ||
docker pull ${{ steps.prep.outputs.tags }} | ||
docker tag ${{ steps.prep.outputs.tags }} $PURESTAKE_TAG | ||
docker push $PURESTAKE_TAG | ||
chopsticks-upgrade-test: | ||
runs-on: | ||
|
@@ -605,7 +559,7 @@ jobs: | |
- name: Retrieve moonbeam binary from docker (for plainSpec generation) | ||
run: | | ||
MOONBEAM_COMMIT=${{ needs.set-tags.outputs.latest_rt_sha8 }} | ||
DOCKER_TAG="purestake/moonbeam:sha-$MOONBEAM_COMMIT" | ||
DOCKER_TAG="moonbeamfoundation/moonbeam:sha-$MOONBEAM_COMMIT" | ||
docker rm -f moonbeam_container 2> /dev/null | true | ||
docker create --name moonbeam_container $DOCKER_TAG bash | ||
|
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 |
---|---|---|
|
@@ -59,7 +59,7 @@ jobs: | |
- name: Prepare | ||
id: prep | ||
run: | | ||
DOCKER_IMAGE=purestake/moonbeam | ||
DOCKER_IMAGE=moonbeamfoundation/moonbeam | ||
SHA8="$(git log -1 --format="%H" | cut -c1-8)" | ||
TAGS="${DOCKER_IMAGE}:sha-${SHA8}-opt" | ||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
|
@@ -75,8 +75,8 @@ jobs: | |
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
username: ${{ secrets.MBF_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.MBF_DOCKERHUB_TOKEN }} | ||
- name: Build and push moonbeam | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
|
@@ -94,3 +94,14 @@ jobs: | |
org.opencontainers.image.created=${{ steps.prep.outputs.created }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }} | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Tag it with purestake for 6 month | ||
run: | | ||
PURESTAKE_TAG=`echo "${{ steps.prep.outputs.tags }}" | sed 's/moonbeamfoundation/purestake/'` | ||
docker pull ${{ steps.prep.outputs.tags }} | ||
docker tag ${{ steps.prep.outputs.tags }} $PURESTAKE_TAG | ||
docker push $PURESTAKE_TAG |
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 |
---|---|---|
|
@@ -16,6 +16,22 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.MBF_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.MBF_DOCKERHUB_PASSWORD }} | ||
- name: Publish runtime docker image | ||
run: | | ||
DOCKER_IMAGE=moonbeamfoundation/moonbeam | ||
DOCKER_TAG="${{ github.event.inputs.tag }}" | ||
COMMIT=`git rev-list -n 1 '${{ github.event.inputs.tag }}'` | ||
SHA=sha-${COMMIT::8} | ||
echo tagging "${DOCKER_IMAGE}:${SHA}" | ||
docker pull "${DOCKER_IMAGE}:${SHA}" | ||
docker tag "${DOCKER_IMAGE}:${SHA}" "${DOCKER_IMAGE}:${DOCKER_TAG}" | ||
docker push "${DOCKER_IMAGE}:${DOCKER_TAG}" | ||
- name: Login to Purestake DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
|
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 |
---|---|---|
|
@@ -16,6 +16,48 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.MBF_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.MBF_DOCKERHUB_PASSWORD }} | ||
- run: | | ||
DOCKER_IMAGE=moonbeamfoundation/moonbeam | ||
VERSION="${{ github.event.inputs.tag }}" | ||
COMMIT=`git rev-list -n 1 '${{ github.event.inputs.tag }}'` | ||
SHA=sha-${COMMIT::8} | ||
echo using "${DOCKER_IMAGE}:${SHA} as base image" | ||
mkdir -p build | ||
wget https://github.com/moonbeam-foundation/moonbeam/releases/download/$VERSION/moonbeam -O build/moonbeam | ||
wget https://github.com/moonbeam-foundation/moonbeam/releases/download/$VERSION/moonbeam-skylake -O build/moonbeam-skylake | ||
wget https://github.com/moonbeam-foundation/moonbeam/releases/download/$VERSION/moonbeam-znver3 -O build/moonbeam-znver3 | ||
echo building "${DOCKER_IMAGE}:${VERSION}" | ||
docker build \ | ||
--build-arg DOCKER_IMAGE="$DOCKER_IMAGE" \ | ||
--build-arg SHA="$SHA" \ | ||
-f docker/moonbeam-release.Dockerfile \ | ||
-t "${DOCKER_IMAGE}:${VERSION}" \ | ||
. | ||
docker push "${DOCKER_IMAGE}:${VERSION}" | ||
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then | ||
MINOR=${VERSION%.*} | ||
echo tagging "${DOCKER_IMAGE}:${MINOR}" | ||
docker tag "${DOCKER_IMAGE}:${VERSION}" "${DOCKER_IMAGE}:${MINOR}" | ||
docker push "${DOCKER_IMAGE}:${MINOR}" | ||
MAJOR=${MINOR%.*} | ||
echo tagging "${DOCKER_IMAGE}:${MAJOR}" | ||
docker tag "${DOCKER_IMAGE}:${VERSION}" "${DOCKER_IMAGE}:${MAJOR}" | ||
docker push "${DOCKER_IMAGE}:${MAJOR}" | ||
echo tagging "${DOCKER_IMAGE}:latest" | ||
docker tag "${DOCKER_IMAGE}:${VERSION}" "${DOCKER_IMAGE}:latest" | ||
docker push "${DOCKER_IMAGE}:latest" | ||
fi | ||
- name: Login to Purestake DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
|
@@ -28,9 +70,9 @@ jobs: | |
echo using "${DOCKER_IMAGE}:${SHA} as base image" | ||
mkdir -p build | ||
wget https://github.com/PureStake/moonbeam/releases/download/$VERSION/moonbeam -O build/moonbeam | ||
wget https://github.com/PureStake/moonbeam/releases/download/$VERSION/moonbeam-skylake -O build/moonbeam-skylake | ||
wget https://github.com/PureStake/moonbeam/releases/download/$VERSION/moonbeam-znver3 -O build/moonbeam-znver3 | ||
wget https://github.com/moonbeam-foundation/moonbeam/releases/download/$VERSION/moonbeam -O build/moonbeam | ||
wget https://github.com/moonbeam-foundation/moonbeam/releases/download/$VERSION/moonbeam-skylake -O build/moonbeam-skylake | ||
wget https://github.com/moonbeam-foundation/moonbeam/releases/download/$VERSION/moonbeam-znver3 -O build/moonbeam-znver3 | ||
echo building "${DOCKER_IMAGE}:${VERSION}" | ||
docker build \ | ||
|
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
matrix: | ||
chain: ["moonbase", "moonriver", "moonbeam"] | ||
srtool_image: | ||
- purestake/srtool | ||
- moonbeamfoundation/srtool | ||
srtool_image_tag: | ||
- 1.69.0 | ||
steps: | ||
|
@@ -45,18 +45,18 @@ jobs: | |
ref: ${{ github.event.inputs.to }} | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
if: github.repository == 'purestake/moonbeam' | ||
if: github.repository == 'moonbeam-foundation/moonbeam' | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
username: ${{ secrets.MBF_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.MBF_DOCKERHUB_PASSWORD }} | ||
registry: index.docker.io | ||
- name: Download original scripts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: original-scripts | ||
path: original-scripts | ||
- name: Build & Push purestake/srtool image | ||
if: github.repository == 'purestake/moonbeam' | ||
- name: Build & Push moonbeamfoundation/srtool image | ||
if: github.repository == 'moonbeam-foundation/moonbeam' | ||
run: | | ||
docker pull "${{ matrix.srtool_image }}:${{ matrix.srtool_image_tag }}" && image_exists=true || image_exists=false | ||
|
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.