-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tamal Saha <[email protected]>
- Loading branch information
Showing
17 changed files
with
1,145 additions
and
7 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 |
---|---|---|
|
@@ -40,6 +40,7 @@ jobs: | |
- name: Run checks | ||
run: | | ||
make ci | ||
go test -v ./... | ||
kubernetes: | ||
name: Kubernetes | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
Copyright AppsCode Inc. and Contributors | ||
Licensed under the AppsCode Community License 1.0.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package main | ||
|
||
import ( | ||
"errors" | ||
"os" | ||
"path/filepath" | ||
"runtime" | ||
"testing" | ||
|
||
"go.bytebuilders.dev/installer/apis/installer/v1alpha1" | ||
|
||
shell "gomodules.xyz/go-sh" | ||
"gopkg.in/yaml.v3" | ||
) | ||
|
||
func Test_checkVersions(t *testing.T) { | ||
if err := checkVersions(); err != nil { | ||
t.Errorf("checkVersions() error = %v", err) | ||
} | ||
} | ||
|
||
func checkVersions() error { | ||
_, file, _, ok := runtime.Caller(1) | ||
if !ok { | ||
return errors.New("failed to locate opscenter-features/values.yaml") | ||
} | ||
|
||
data, err := os.ReadFile(filepath.Join(filepath.Dir(file), "../charts/opscenter-features/values.yaml")) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
var spec v1alpha1.OpscenterFeaturesSpec | ||
err = yaml.Unmarshal(data, &spec) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
sh := shell.NewSession() | ||
sh.SetDir("/tmp") | ||
sh.ShowCMD = true | ||
|
||
for k, v := range spec.Helm.Releases { | ||
// helm pull appscode/ace-installer --version=v2023.03.23 | ||
fullname := "oci://ghcr.io/appscode-charts/" + k | ||
err := sh.Command("helm", "pull", fullname, "--version", v.Version).Run() | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
return nil | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.