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

Add RPM packages for CentOS 7 to the release #706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func Build(manifest model.Manifest, githubToken string) error {
if err := Rpm(manifest); err != nil {
return fmt.Errorf("failed to build Rpm: %v", err)
}
if err := Rpm7(manifest); err != nil {
return fmt.Errorf("failed to build Rpm for CentOS-7: %v", err)
}
}

if _, f := manifest.BuildOutputs[model.Archive]; f {
Expand Down
16 changes: 15 additions & 1 deletion pkg/build/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
// Rpm produces an rpm package just for the sidecar
func Rpm(manifest model.Manifest) error {
if err := util.RunMake(manifest, "istio", nil, "rpm/fpm"); err != nil {
return fmt.Errorf("failed to build sidecar.rpm: %v", err)
return fmt.Errorf("failed to build istio-sidecar.rpm: %v", err)
}
if err := util.CopyFile(path.Join(manifest.RepoOutDir("istio"), "istio-sidecar.rpm"), path.Join(manifest.OutDir(), "rpm", "istio-sidecar.rpm")); err != nil {
return fmt.Errorf("failed to package istio-sidecar.rpm: %v", err)
Expand All @@ -35,3 +35,17 @@ func Rpm(manifest model.Manifest) error {
}
return nil
}

// Rpm produces an rpm package for CentOS-7 just for the sidecar
func Rpm7(manifest model.Manifest) error {
if err := util.RunMake(manifest, "istio", nil, "rpm-7/fpm"); err != nil {
return fmt.Errorf("failed to build istio-sidecar-centos-7.rpm: %v", err)
}
if err := util.CopyFile(path.Join(manifest.RepoOutDir("istio"), "istio-sidecar-centos-7.rpm"), path.Join(manifest.OutDir(), "rpm", "istio-sidecar-centos-7.rpm")); err != nil {
return fmt.Errorf("failed to package istio-sidecar-centos-7.rpm: %v", err)
}
if err := util.CreateSha(path.Join(manifest.OutDir(), "rpm", "istio-sidecar-centos-7.rpm")); err != nil {
return fmt.Errorf("failed to package istio-sidecar-centos-7.rpm: %v", err)
}
return nil
}
3 changes: 3 additions & 0 deletions pkg/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ func TestRpm(info ReleaseInfo) error {
if !fileExists(filepath.Join(info.release, "rpm", "istio-sidecar.rpm")) {
return fmt.Errorf("rpm package not found")
}
if !fileExists(filepath.Join(info.release, "rpm", "istio-sidecar-centos-7.rpm")) {
return fmt.Errorf("rpm package for CentOS 7 not found")
}
return nil
}

Expand Down