Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Remove Cloudsmith package publishing #19378

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
vector_version: ${{ steps.generate-publish-metadata.outputs.vector_version }}
vector_build_desc: ${{ steps.generate-publish-metadata.outputs.vector_build_desc }}
vector_release_channel: ${{ steps.generate-publish-metadata.outputs.vector_release_channel }}
vector_cloudsmith_repo: ${{ steps.generate-publish-metadata.outputs.vector_cloudsmith_repo }}
steps:
- name: Checkout Vector
uses: actions/checkout@v3
Expand Down Expand Up @@ -629,120 +628,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_PACKAGE_PUBLISHER_TOKEN }}
run: make release-homebrew

publish-cloudsmith:
name: Publish to Cloudsmith
# We only publish to CloudSmith for versioned releases, not nightlies.
if: inputs.channel == 'release'
runs-on: ubuntu-20.04
needs:
- generate-publish-metadata
- build-x86_64-unknown-linux-gnu-packages
- build-aarch64-unknown-linux-gnu-packages
- build-armv7-unknown-linux-gnueabihf-packages
- deb-verify
- rpm-verify
env:
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
CLOUDSMITH_REPO: ${{ needs.generate-publish-metadata.outputs.vector_cloudsmith_repo }}
steps:
- name: Checkout Vector
uses: actions/checkout@v3
with:
ref: ${{ inputs.git_ref }}
- name: Download staged package artifacts (aarch64-unknown-linux-gnu)
uses: actions/download-artifact@v3
with:
name: vector-${{ env.VECTOR_VERSION }}-aarch64-unknown-linux-gnu
path: target/artifacts
- name: Download staged package artifacts (x86_64-unknown-linux-gnu)
uses: actions/download-artifact@v3
with:
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-gnu
path: target/artifacts
- name: Download staged package artifacts (armv7-unknown-linux-gnueabihf)
uses: actions/download-artifact@v3
with:
name: vector-${{ env.VECTOR_VERSION }}-armv7-unknown-linux-gnueabihf
path: target/artifacts
- name: Push amd64 deb
id: push-deb-amd64
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "timber"
repo: ${{ env.CLOUDSMITH_REPO }}
distro: "any-distro"
release: "any-version"
republish: "true"
file: "target/artifacts/vector_${{ env.VECTOR_VERSION }}-1_amd64.deb"
- name: Push arm64 deb
id: push-deb-arm64
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "timber"
repo: ${{ env.CLOUDSMITH_REPO }}
distro: "any-distro"
release: "any-version"
republish: "true"
file: "target/artifacts/vector_${{ env.VECTOR_VERSION }}-1_arm64.deb"
- name: Push armhf deb
id: push-deb-armhf
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "timber"
repo: ${{ env.CLOUDSMITH_REPO }}
distro: "any-distro"
release: "any-version"
republish: "true"
file: "target/artifacts/vector_${{ env.VECTOR_VERSION }}-1_armhf.deb"
- name: Push x86_64 RPM
id: push-rpm-x86_64
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "rpm"
owner: "timber"
repo: ${{ env.CLOUDSMITH_REPO }}
distro: "any-distro"
release: "any-version"
republish: "true"
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-1.x86_64.rpm"
- name: Push aarch64 RPM
id: push-rpm-aarch64
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "rpm"
owner: "timber"
repo: ${{ env.CLOUDSMITH_REPO }}
distro: "any-distro"
release: "any-version"
republish: "true"
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-1.aarch64.rpm"
- name: Push armv7hl-gnu RPM
id: push-rpm-armv7hl-gnu
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "rpm"
owner: "timber"
repo: ${{ env.CLOUDSMITH_REPO }}
distro: "any-distro"
release: "any-version"
republish: "true"
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-1.armv7hl.rpm"

generate-sha256sum:
name: Generate SHA256 checksums
runs-on: ubuntu-20.04
Expand Down
15 changes: 4 additions & 11 deletions vdev/src/commands/build/publish_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use std::io::{self, Write};

/// Setting necessary metadata for our publish workflow in CI.
///
/// Responsible for setting necessary metadata for our publish workflow in CI.
/// Computes the Vector version (from Cargo.toml), the release channel (nightly vs release), which Cloudsmith
/// repository to publish to, and more. All of this information is emitted in a way that sets native outputs on the
/// GitHub Actions workflow step running the script, which can be passed on to subsequent jobs/steps.
/// Responsible for setting necessary metadata for our publish workflow in CI. Computes the Vector
/// version (from Cargo.toml), the release channel (nightly vs release), and more. All of this
/// information is emitted in a way that sets native outputs on the GitHub Actions workflow step
/// running the script, which can be passed on to subsequent jobs/steps.
#[derive(clap::Args, Debug)]
#[command()]
pub struct Cli {}
Expand All @@ -28,12 +28,6 @@ impl Cli {
// Figure out what our release channel is.
let channel = util::get_channel();

// Depending on the channel, this influences which Cloudsmith repository we publish to.
let cloudsmith_repo = match channel.as_str() {
"nightly" => "vector-nightly",
_ => "vector",
};

let mut output_file: Box<dyn Write> = match env::var("GITHUB_OUTPUT") {
Ok(file_name) if !file_name.is_empty() => {
let file = OpenOptions::new()
Expand All @@ -47,7 +41,6 @@ impl Cli {
writeln!(output_file, "vector_version={version}")?;
writeln!(output_file, "vector_build_desc={build_desc}")?;
writeln!(output_file, "vector_release_channel={channel}")?;
writeln!(output_file, "vector_cloudsmith_repo={cloudsmith_repo}")?;
Ok(())
}
}
Loading