Skip to content

Commit

Permalink
Merge branch 'master' into feat/dashboard-supports-random-port
Browse files Browse the repository at this point in the history
  • Loading branch information
imneov authored Sep 26, 2022
2 parents 60d94c4 + 80f7bee commit 8df3aec
Show file tree
Hide file tree
Showing 12 changed files with 543 additions and 50 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/get_release_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,23 @@
with open(os.getenv("GITHUB_ENV"), "a") as githubEnv:
if gitRef is None or not gitRef.startswith(tagRefPrefix):
githubEnv.write("REL_VERSION=edge\n")
githubEnv.write("MSI_VERSION=0.0.0.0\n")
print ("This is daily build from {}...".format(gitRef))
sys.exit(0)

releaseVersion = gitRef[len(tagRefPrefix):]
releaseNotePath="docs/release_notes/v{}.md".format(releaseVersion)
msiVersion = releaseVersion

if gitRef.find("-rc.") > 0:
print ("Release Candidate build from {}...".format(gitRef))
# For pre-releases like 1.9.0-rc.1, msiVersion would be 1.9.0.1
msiVersion = ".".join(msiVersion.split("-rc."))
else:
# Set LATEST_RELEASE to true
githubEnv.write("LATEST_RELEASE=true\n")
print ("Release build from {}...".format(gitRef))

githubEnv.write("REL_VERSION={}\n".format(releaseVersion))
githubEnv.write("MSI_VERSION={}\n".format(msiVersion))

47 changes: 47 additions & 0 deletions .github/wix/dapr.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>

<!-- Product IDs are autogenerated (*) at every build-->
<Product Name='CLI' Id='*' UpgradeCode='ed31d74d-b958-4db2-910f-de85c0a9cea0' Language='1033' Codepage='1252' Version='$(var.Version)' Manufacturer='Dapr'>

<!-- Installer Package-->
<Package Id='*' Keywords='Installer' Description="Dapr CLI Installer" InstallerVersion='400' Languages='1033' Compressed='yes' SummaryCodepage='1252' />

<!-- License Agreement -->
<WixVariable Id="WixUILicenseRtf" Value="$(var.DaprLicenseDirectory)/license.rtf" />

<!-- Upgrade logic -->
<!-- AllowSameVersionUpgrades "yes" -> Always upgrade, never allow two versions to be installed next to each other -->
<!-- AllowSameVersionUpgrades causes ICE61 which must be ignored -->
<!-- AllowDowngrades "no" -> Prevents out-of-order installations i.e. installing an older version after installing a newer version -->
<MajorUpgrade AllowSameVersionUpgrades="yes" AllowDowngrades="no" DowngradeErrorMessage="A later version of Dapr CLI is already installed. Setup will now exit."/>

<Media Id='1' Cabinet='Dapr.cab' EmbedCab='yes' />

<!-- Directory Structure -->
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='INSTALLDIR'>

<!-- Dapr EXE Component -->
<Component Id='DaprEXE_Comp' Guid='83363a24-2323-489c-b9b7-a3fd7f0dacd1'>
<File Id='DaprEXE' Name='dapr.exe' DiskId='1' Source='$(var.DaprEXEDirectory)/dapr.exe' KeyPath='yes'>
</File>
</Component>

</Directory>
</Directory>

<!-- Default Install Location is 'C:\dapr'-->
<SetDirectory Id='INSTALLDIR' Value='[WindowsVolume]dapr' />

<Feature Id='Complete' Level='1'>
<ComponentRef Id='DaprEXE_Comp' />
</Feature>

<!-- Dialog to let the user choose a directory where the product will be installed-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="WixUI_InstallDir" />

</Product>
</Wix>

416 changes: 416 additions & 0 deletions .github/wix/license.rtf

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion .github/workflows/dapr_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ jobs:
name: Build ${{ matrix.target_os }}_${{ matrix.target_arch }} binaries
runs-on: ${{ matrix.os }}
env:
GOVER: 1.18
GOVER: 1.19
GOLANG_CI_LINT_VER: v1.49.0
GOOS: ${{ matrix.target_os }}
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org
ARCHIVE_OUTDIR: dist/archives
DaprEXEDirectory: dist/windows_amd64/release
DaprLicenseDirectory: .github/wix
WIX_BIN_PATH: 'C:/Program Files (x86)/WiX Toolset v3.11/bin'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand Down Expand Up @@ -93,6 +96,13 @@ jobs:
run: |
mkdir -p ${{ env.ARCHIVE_OUTDIR }}
make release GOOS=${{ matrix.target_os }} GOARCH=${{ matrix.target_arch }} ARCHIVE_OUT_DIR=${{ env.ARCHIVE_OUTDIR }}
- name: Build msi installer
if: matrix.target_arch == 'amd64' && matrix.target_os == 'windows'
shell: pwsh
run: |
$env:Path += ";${{ env.WIX_BIN_PATH }}"
candle.exe -dVersion="${{ env.MSI_VERSION }}" -dDaprEXEDirectory="${{ env.DaprEXEDirectory }}" -dDaprLicenseDirectory="${{ env.DaprLicenseDirectory }}" .github/wix/dapr.wxs -o dapr.wixobj
light.exe -ext WixUIExtension ./dapr.wixobj -o "${{ env.ARCHIVE_OUTDIR }}/dapr.msi"
- name: Create release_version.txt
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux'
run: |
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/kind_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,44 +50,44 @@ jobs:
name: E2E tests for K8s (KinD)
runs-on: ubuntu-latest
env:
GOVER: 1.18
DAPR_RUNTIME_VERSION: 1.8.0
GOVER: 1.19
DAPR_RUNTIME_VERSION: 1.8.4
DAPR_DASHBOARD_VERSION: 0.10.0
DAPR_TGZ: dapr-1.7.0.tgz
DAPR_TGZ: dapr-1.8.4.tgz
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
k8s-version:
- v1.20.15
- v1.21.10
- v1.22.7
- v1.23.4
- v1.21.14
- v1.22.13
- v1.23.10
- v1.24.4
mode:
- ha
- non-ha
# Map between K8s and KinD versions.
# This is attempting to make it a bit clearer what's being tested.
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.12.0
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.15.0
include:
- k8s-version: v1.20.15
kind-version: v0.12.0
kind-image-sha: sha256:393bb9096c6c4d723bb17bceb0896407d7db581532d11ea2839c80b28e5d8deb
- k8s-version: v1.21.10
kind-version: v0.12.0
kind-image-sha: sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c
- k8s-version: v1.22.7
kind-version: v0.12.0
kind-image-sha: sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166
- k8s-version: v1.23.4
kind-version: v0.12.0
kind-image-sha: sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9
- k8s-version: v1.21.14
kind-version: v0.15.0
kind-image-sha: sha256:f9b4d3d1112f24a7254d2ee296f177f628f9b4c1b32f0006567af11b91c1f301
- k8s-version: v1.22.13
kind-version: v0.15.0
kind-image-sha: sha256:4904eda4d6e64b402169797805b8ec01f50133960ad6c19af45173a27eadf959
- k8s-version: v1.23.10
kind-version: v0.15.0
kind-image-sha: sha256:f047448af6a656fae7bc909e2fab360c18c487ef3edc93f06d78cdfd864b2d12
- k8s-version: v1.24.4
kind-version: v0.15.0
kind-image-sha: sha256:adfaebada924a26c2c9308edd53c6e33b3d4e453782c0063dc0028bdebaddf98
exclude:
- k8s-version: v1.20.15
- k8s-version: v1.21.14
mode: non-ha
- k8s-version: v1.21.10
- k8s-version: v1.21.14
mode: non-ha
- k8s-version: v1.22.13
mode: non-ha
- k8s-version: v1.22.7
mode: non-ha
steps:
- name: Set up Go ${{ env.GOVER }}
uses: actions/setup-go@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/self_hosted_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
name: Run Self-Hosted E2E tests in ${{ matrix.target_os }}_${{ matrix.target_arch }}_${{ matrix.dapr_install_mode }}
runs-on: ${{ matrix.os }}
env:
GOVER: 1.18
GOVER: 1.19
GOOS: ${{ matrix.target_os }}
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/upgrade_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,40 +50,40 @@ jobs:
name: Upgrade path tests (KinD)
runs-on: ubuntu-latest
env:
GOVER: 1.18
GOVER: 1.19
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
k8s-version:
- v1.20.15
- v1.21.10
- v1.22.7
- v1.23.4
- v1.21.14
- v1.22.13
- v1.23.10
- v1.24.4
mode:
- ha
- non-ha
# Map between K8s and KinD versions.
# This is attempting to make it a bit clearer what's being tested.
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.12.0
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.15.0
include:
- k8s-version: v1.20.15
kind-version: v0.12.0
kind-image-sha: sha256:393bb9096c6c4d723bb17bceb0896407d7db581532d11ea2839c80b28e5d8deb
- k8s-version: v1.21.10
kind-version: v0.12.0
kind-image-sha: sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c
- k8s-version: v1.22.7
kind-version: v0.12.0
kind-image-sha: sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166
- k8s-version: v1.23.4
kind-version: v0.12.0
kind-image-sha: sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9
- k8s-version: v1.21.14
kind-version: v0.15.0
kind-image-sha: sha256:f9b4d3d1112f24a7254d2ee296f177f628f9b4c1b32f0006567af11b91c1f301
- k8s-version: v1.22.13
kind-version: v0.15.0
kind-image-sha: sha256:4904eda4d6e64b402169797805b8ec01f50133960ad6c19af45173a27eadf959
- k8s-version: v1.23.10
kind-version: v0.15.0
kind-image-sha: sha256:f047448af6a656fae7bc909e2fab360c18c487ef3edc93f06d78cdfd864b2d12
- k8s-version: v1.24.4
kind-version: v0.15.0
kind-image-sha: sha256:adfaebada924a26c2c9308edd53c6e33b3d4e453782c0063dc0028bdebaddf98
exclude:
- k8s-version: v1.20.15
- k8s-version: v1.21.14
mode: non-ha
- k8s-version: v1.21.10
- k8s-version: v1.21.14
mode: non-ha
- k8s-version: v1.22.7
- k8s-version: v1.22.13
mode: non-ha
steps:
- name: Set up Go ${{ env.GOVER }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ test_output.json

# Go Workspaces (introduced in Go 1.18+)
go.work

#Wix files
*.wixobj
*.wixpdb
*.msi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ e2e-build-run-sh: build test-e2e-sh
################################################################################
.PHONY: modtidy
modtidy:
go mod tidy -compat=1.18
go mod tidy -compat=1.19

################################################################################
# Target: check-diff #
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ Each release of Dapr CLI includes various OSes and architectures. These binary v
* For Linux/MacOS - `/usr/local/bin`
* For Windows, create a directory and add this to your System PATH. For example create a directory called `c:\dapr` and add this directory to your path, by editing your system environment variable.

#### From the MSI Package (windows)

Install windows Dapr CLI using MSI package.

1. Download the [MSI Package](https://github.com/dapr/cli/releases)
2. Run `dapr.msi` to install Dapr CLI on your system

> NOTE: The default installation directory is set to `$Env:SystemDrive\dapr` and can be modified at the time of installation.
### Install Dapr on your local machine (self-hosted)

In self-hosted mode, dapr can be initialized using the CLI with the placement, redis and zipkin containers enabled by default(recommended) or without them which also does not require docker to be available in the environment.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This document helps you get started developing Dapr CLI. If you find any problem

### Linux and MacOS

1. The Go language environment `1.18` [(instructions)](https://golang.org/doc/install#tarball).
1. The Go language environment `1.19` [(instructions)](https://golang.org/doc/install#tarball).
* Make sure that your GOPATH and PATH are configured correctly
```bash
export GOPATH=~/go
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dapr/cli

go 1.18
go 1.19

require (
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
Expand Down

0 comments on commit 8df3aec

Please sign in to comment.