Bladeren bron

Build: Support publishing MSI to grafana.com (#17073)

* add test for msi, and support for publishing msi
* update arch and os in test
* Build: Fixed issues with os naming
Brian Gann 6 jaren geleden
bovenliggende
commit
d0ea98f6bd

+ 5 - 0
scripts/build/release_publisher/publisher.go

@@ -174,6 +174,11 @@ var completeBuildArtifactConfigurations = []buildArtifact{
 		arch:       "amd64",
 		urlPostfix: ".windows-amd64.zip",
 	},
+	{
+		os:         "win-installer",
+		arch:       "amd64",
+		urlPostfix: ".windows-amd64.msi",
+	},
 }
 
 type artifactFilter struct {

+ 28 - 0
scripts/build/release_publisher/publisher_test.go

@@ -74,6 +74,34 @@ func TestPreparingReleaseFromRemote(t *testing.T) {
 			baseArchiveURL:  "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana",
 			buildArtifacts:  []buildArtifact{{"linux", "armv6", "_armhf.deb", "-rpi"}},
 		},
+		{
+			version:         "v5.4.0-pre1asdf",
+			expectedVersion: "5.4.0-pre1asdf",
+			whatsNewURL:     "https://whatsnews.foo/",
+			relNotesURL:     "https://relnotes.foo/",
+			nightly:         true,
+			expectedBeta:    false,
+			expectedStable:  false,
+			expectedArch:    "amd64",
+			expectedOs:      "win-installer",
+			expectedURL:     "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.4.0-pre1asdf.windows-amd64.msi",
+			baseArchiveURL:  "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana",
+			buildArtifacts:  []buildArtifact{{"win-installer", "amd64", ".windows-amd64.msi", ""}},
+		},
+		{
+			version:         "v5.4.0-pre1asdf",
+			expectedVersion: "5.4.0-pre1asdf",
+			whatsNewURL:     "https://whatsnews.foo/",
+			relNotesURL:     "https://relnotes.foo/",
+			nightly:         true,
+			expectedBeta:    false,
+			expectedStable:  false,
+			expectedArch:    "amd64",
+			expectedOs:      "win",
+			expectedURL:     "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.4.0-pre1asdf.windows-amd64.zip",
+			baseArchiveURL:  "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana",
+			buildArtifacts:  []buildArtifact{{"win", "amd64", ".windows-amd64.zip", ""}},
+		},
 	}
 
 	for _, test := range cases {

+ 0 - 0
scripts/build/release_publisher/testdata/grafana-enterprise-5.4.0-123pre1.windows-amd64.msi


+ 1 - 0
scripts/build/release_publisher/testdata/grafana-enterprise-5.4.0-123pre1.windows-amd64.msi.sha256

@@ -0,0 +1 @@
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855