chore: separate publish installer process (#26137)

* chore: reorder name and command

* chore: extract publish installer from publich tarball

* lint: use space
This commit is contained in:
Yihau Chen 2022-06-23 11:18:30 +08:00 committed by GitHub
parent 5c2f819f99
commit 5c920caf4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 29 deletions

View File

@ -2,30 +2,35 @@
# Build steps that run after the primary pipeline on pushes and tags.
# Pull requests to not run these steps.
steps:
- command: "ci/publish-tarball.sh"
- name: "publish tarball (x86_64-unknown-linux-gnu)"
command: "ci/publish-tarball.sh"
agents:
- "queue=release-build"
timeout_in_minutes: 60
name: "publish tarball"
- name: "publish installer"
command: "ci/publish-installer.sh"
agents:
- "queue=release-build"
timeout_in_minutes: 5
- wait
- command: "sdk/docker-solana/build.sh"
- name: "publish docker"
command: "sdk/docker-solana/build.sh"
agents:
- "queue=release-build"
timeout_in_minutes: 60
name: "publish docker"
- command: "ci/publish-crate.sh"
- name: "publish crate"
command: "ci/publish-crate.sh"
agents:
- "queue=release-build"
timeout_in_minutes: 240
name: "publish crate"
branches: "!master"
- command: "ci/publish-tarball.sh"
- name: "publish tarball (aarch64-apple-darwin)"
command: "ci/publish-tarball.sh"
agents:
- "queue=release-build-aarch64-apple-darwin"
timeout_in_minutes: 60
name: "publish tarball (aarch64-apple-darwin)"
- command: "ci/publish-tarball.sh"
- name: "publish tarball (x86_64-apple-darwin)"
command: "ci/publish-tarball.sh"
agents:
- "queue=release-build-x86_64-apple-darwin"
timeout_in_minutes: 60
name: "publish tarball (x86_64-apple-darwin)"

39
ci/publish-installer.sh Normal file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
# check does it need to publish
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
echo "Skipping publishing install wrapper"
exit 0
fi
# check channel and tag
eval "$(ci/channel-info.sh)"
if [[ -n "$CI_TAG" ]]; then
CHANNEL_OR_TAG=$CI_TAG
else
CHANNEL_OR_TAG=$CHANNEL
fi
if [[ -z $CHANNEL_OR_TAG ]]; then
echo +++ Unable to determine channel or tag to publish into, exiting.
exit 0
fi
# upload install script
source ci/upload-ci-artifact.sh
cat >release.solana.com-install <<EOF
SOLANA_RELEASE=$CHANNEL_OR_TAG
SOLANA_INSTALL_INIT_ARGS=$CHANNEL_OR_TAG
SOLANA_DOWNLOAD_ROOT=https://release.solana.com
EOF
cat install/solana-install-init.sh >>release.solana.com-install
echo --- AWS S3 Store: "install"
upload-s3-artifact "/solana/release.solana.com-install" "s3://release.solana.com/$CHANNEL_OR_TAG/install"
echo Published to:
ci/format-url.sh https://release.solana.com/"$CHANNEL_OR_TAG"/install

View File

@ -150,23 +150,4 @@ for file in "${TARBALL_BASENAME}"-$TARGET.tar.bz2 "${TARBALL_BASENAME}"-$TARGET.
fi
done
# Create install wrapper for release.solana.com
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
echo "Skipping publishing install wrapper"
elif [[ -n $BUILDKITE ]]; then
cat > release.solana.com-install <<EOF
SOLANA_RELEASE=$CHANNEL_OR_TAG
SOLANA_INSTALL_INIT_ARGS=$CHANNEL_OR_TAG
SOLANA_DOWNLOAD_ROOT=https://release.solana.com
EOF
echo release.solana.com-install
cat install/solana-install-init.sh >> release.solana.com-install
echo --- AWS S3 Store: "install"
$DRYRUN upload-s3-artifact "/solana/release.solana.com-install" "s3://release.solana.com/$CHANNEL_OR_TAG/install"
echo Published to:
$DRYRUN ci/format-url.sh https://release.solana.com/"$CHANNEL_OR_TAG"/install
fi
echo --- ok