Skip to content

Commit

Permalink
Remove cluster config template in test-infra (kyma-project#1097)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkab authored Jun 3, 2019
1 parent b4c107b commit 1a6e30f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 19 deletions.
2 changes: 0 additions & 2 deletions development/tools/cmd/githubrelease/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Overview

This command creates GitHub releases based on artifacts stored in a Google bucket. Each release requires the following set of artifacts:
- `kyma-config-cluster.yaml`
- `kyma-installer-cluster.yaml`
- `kyma-config-local.yaml`
- `kyma-installer-local.yaml`
Expand All @@ -29,7 +28,6 @@ See the list of available flags:
| :----------------------------- | :------: | :--------------------------------------------------------------------------------------------------- |
| **--targetCommit** | Yes | The string which specifies the [commitish value](https://developer.github.com/v3/repos/releases/#create-a-release) that the GitHub tag refers to.
| **--bucketName** | No | The string value with the name of the Google bucket containing release artifacts. It defaults to `kyma-prow-artifacts`.
| **--kymaConfigCluster** | No | The string value with the name of the Kyma cluster configuration file. It defaults to `kyma-config-cluster.yaml`.
| **--kymaInstallerCluster** | No | The string value with the name of the Kyma cluster configuration file. It defaults to `kyma-installer-cluster.yaml`.
| **--kymaConfigLocal** | No | The string value with the name of the Kyma local configuration file. It defaults to `kyma-config-local.yaml`.
| **--kymaInstallerLocal** | No | The string value with the name of the Kyma local configuration file. It defaults to `kyma-installer-local.yaml`.
Expand Down
3 changes: 1 addition & 2 deletions development/tools/cmd/githubrelease/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
var (
targetCommit = flag.String("targetCommit", "", "Target commitish [Required]")
bucketName = flag.String("bucketName", "kyma-prow-artifacts", "Google bucket name where artifacts are stored [Optional]")
kymaConfigCluster = flag.String("kymaConfigCluster", "kyma-config-cluster.yaml", "Filename for config cluster artifact [Optional]")
kymaInstallerCluster = flag.String("kymaInstallerCluster", "kyma-installer-cluster.yaml", "Filename for installer cluster artifact [Optional]")
kymaConfigLocal = flag.String("kymaConfigLocal", "kyma-config-local.yaml", "Filename for local config artifact [Optional]")
kymaInstallerLocal = flag.String("kymaInstallerLocal", "kyma-installer-local.yaml", "Filename for installer local artifact [Optional]")
Expand Down Expand Up @@ -78,7 +77,7 @@ func main() {
}

// Github release
err = c.CreateNewRelease(ctx, relOpts, *kymaConfigLocal, *kymaInstallerLocal, *kymaConfigCluster, *kymaInstallerCluster)
err = c.CreateNewRelease(ctx, relOpts, *kymaConfigLocal, *kymaInstallerLocal, *kymaInstallerCluster)
if err != nil {
log.Fatal(err)
}
Expand Down
20 changes: 10 additions & 10 deletions development/tools/pkg/release/release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
)

const (
mockLocalArtifactName = "mockcluster.yaml"
mockClusterArtifactName = "kyma-config-cluster.yaml"
mockChangelogFileName = "change-record.md"
mockCommitish = "a1b2c3d4"
mockLocalConfigArtifactName = "kyma-config-local.yaml"
mockLocalInstallerArtifactName = "kyma-installer-local.yaml"
mockChangelogFileName = "change-record.md"
mockCommitish = "a1b2c3d4"
)

func TestCreateRelease(t *testing.T) {
Expand All @@ -37,7 +37,7 @@ func TestCreateRelease(t *testing.T) {
Convey("should download three files from Google Storage, create a release and upload two assets", func() {

//when
err := releaseWizard.CreateNewRelease(ctx, relOpts, mockLocalArtifactName, mockClusterArtifactName)
err := releaseWizard.CreateNewRelease(ctx, relOpts, mockLocalConfigArtifactName, mockLocalInstallerArtifactName)

//then
So(fakeStorage.TimesReadBucketObjectCalled, ShouldEqual, 3)
Expand All @@ -48,8 +48,8 @@ func TestCreateRelease(t *testing.T) {

So(fakeGithub.TimesUploadFileCalled, ShouldEqual, 2)
So(fakeGithub.AssetCount, ShouldEqual, 2)
So(fakeGithub.Assets[0].GetName(), ShouldEqual, mockLocalArtifactName)
So(fakeGithub.Assets[1].GetName(), ShouldEqual, mockClusterArtifactName)
So(fakeGithub.Assets[0].GetName(), ShouldEqual, mockLocalConfigArtifactName)
So(fakeGithub.Assets[1].GetName(), ShouldEqual, mockLocalInstallerArtifactName)

})
})
Expand All @@ -69,7 +69,7 @@ func TestCreateRelease(t *testing.T) {
Convey("should download three files from Google Storage, create a pre-release and upload two assets", func() {

//when
err := releaseWizard.CreateNewRelease(ctx, relOpts, mockLocalArtifactName, mockClusterArtifactName)
err := releaseWizard.CreateNewRelease(ctx, relOpts, mockLocalConfigArtifactName, mockLocalInstallerArtifactName)

//then
So(fakeStorage.TimesReadBucketObjectCalled, ShouldEqual, 3)
Expand All @@ -80,8 +80,8 @@ func TestCreateRelease(t *testing.T) {

So(fakeGithub.TimesUploadFileCalled, ShouldEqual, 2)
So(fakeGithub.AssetCount, ShouldEqual, 2)
So(fakeGithub.Assets[0].GetName(), ShouldEqual, mockLocalArtifactName)
So(fakeGithub.Assets[1].GetName(), ShouldEqual, mockClusterArtifactName)
So(fakeGithub.Assets[0].GetName(), ShouldEqual, mockLocalConfigArtifactName)
So(fakeGithub.Assets[1].GetName(), ShouldEqual, mockLocalInstallerArtifactName)

})
})
Expand Down
1 change: 0 additions & 1 deletion docs/prow/prow-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,5 @@ All artifacts are stored in the publicly available bucket under the `gs://kyma-d

A directory with artifacts consists of the following files:
- `kyma-installer-cluster.yaml` to deploy Kyma installer
- `kyma-config-cluster.yaml` to configure Kyma installation
- `is-installed.sh` to verify if Kyma installation process is finished
- `tiller.yaml` to install Tiller
1 change: 0 additions & 1 deletion prow/scripts/build-kyma-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export_variables

make -C /home/prow/go/src/github.com/kyma-project/kyma/tools/kyma-installer ci-create-release-artifacts

gsutil cp "${ARTIFACTS}/kyma-config-cluster.yaml" "${KYMA_ARTIFACTS_BUCKET}/${DOCKER_TAG}/kyma-config-cluster.yaml"
gsutil cp "${ARTIFACTS}/kyma-installer-cluster.yaml" "${KYMA_ARTIFACTS_BUCKET}/${DOCKER_TAG}/kyma-installer-cluster.yaml"

gsutil cp "${ARTIFACTS}/kyma-config-local.yaml" "${KYMA_ARTIFACTS_BUCKET}/${DOCKER_TAG}/kyma-config-local.yaml"
Expand Down
3 changes: 0 additions & 3 deletions prow/scripts/build-kyma-development-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This script generates development artifacts:
# - installer image
# - kyma-installer image
# - kyma-config-cluster.yaml
# - kyma-installer-cluster.yaml
# - is-installed.sh
# Yaml files, as well as is-installed.sh script are stored on GCS.
Expand Down Expand Up @@ -88,15 +87,13 @@ export GOOGLE_APPLICATION_CREDENTIALS=/etc/credentials/sa-kyma-artifacts/service
authenticate

shout "Copy artifacts to ${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/${BUCKET_DIR}"
gsutil cp "${ARTIFACTS}/kyma-config-cluster.yaml" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/${BUCKET_DIR}/kyma-config-cluster.yaml"
gsutil cp "${ARTIFACTS}/kyma-installer-cluster.yaml" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/${BUCKET_DIR}/kyma-installer-cluster.yaml"
gsutil cp "${KYMA_PATH}/installation/scripts/is-installed.sh" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/${BUCKET_DIR}/is-installed.sh"
gsutil cp "${KYMA_PATH}/installation/resources/tiller.yaml" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/${BUCKET_DIR}/tiller.yaml"


if [[ "${BUILD_TYPE}" == "master" ]]; then
shout "Copy artifacts to ${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/master"
gsutil cp "${ARTIFACTS}/kyma-config-cluster.yaml" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/master/kyma-config-cluster.yaml"
gsutil cp "${ARTIFACTS}/kyma-installer-cluster.yaml" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/master/kyma-installer-cluster.yaml"
gsutil cp "${KYMA_PATH}/installation/scripts/is-installed.sh" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/master/is-installed.sh"
gsutil cp "${KYMA_PATH}/installation/resources/tiller.yaml" "${KYMA_DEVELOPMENT_ARTIFACTS_BUCKET}/master/tiller.yaml"
Expand Down

0 comments on commit 1a6e30f

Please sign in to comment.