Skip to content

Commit ce792e7

Browse files
committed
install utmstack with specific version
1 parent f0ded3d commit ce792e7

6 files changed

Lines changed: 52 additions & 16 deletions

File tree

.github/workflows/v10-v11-principal-installer-release.yml renamed to .github/workflows/v10-principal-installer-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Installer Release
1+
name: Installer Release v10
22

33
on:
44
release:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Installer Release V11
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version_tag:
7+
description: "Version to deploy."
8+
required: true
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Check out code into the right branch
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go 1.x
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: ^1.20
22+
id: go
23+
24+
- name: Build
25+
env:
26+
GOOS: linux
27+
GOARCH: amd64
28+
run: |
29+
cd "${{ github.workspace }}/installer/config"
30+
sed -i 's|const INSTALLER_VERSION = ""|const INSTALLER_VERSION = "${{ secrets.AGENT_SECRET_PREFIX }}"|' const.go
31+
cd "${{ github.workspace }}/installer"
32+
go build -o installer -v .
33+
34+
- name: Create Release
35+
id: create_release
36+
uses: softprops/action-gh-release@v2
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
tag_name: ${{ github.event.inputs.version_tag }}
41+
name: ${{ github.event.inputs.version_tag }}
42+
body_path: ./CHANGELOG.md
43+
draft: false
44+
prerelease: false
45+
files: |
46+
./installer/installer

.github/workflows/v11-used-docker-java-11.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
tag:
1010
required: true
1111
type: string
12-
version:
13-
required: true
14-
type: string
1512
jobs:
1613
build:
1714
name: Build
@@ -30,8 +27,8 @@ jobs:
3027
working-directory: ./${{inputs.image_name}}
3128
run: |
3229
echo "Building with maven"
33-
echo "The configured version is: ${{ inputs.version }}"
34-
mvn -B -Drevision=${{ inputs.version }} -Pprod clean package -s settings.xml
30+
echo "The configured version is: ${{ inputs.tag }}"
31+
mvn -B -Drevision=${{ inputs.tag }} -Pprod clean package -s settings.xml
3532
env:
3633
MAVEN_TK: ${{ secrets.GITHUB_TOKEN }}
3734

.github/workflows/v11-used-images-without-dependencies.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
with:
6262
image_name: ${{ inputs.microservice }}
6363
tag: ${{inputs.tag}}-community
64-
version: ${{inputs.tag}}
6564

6665
java_deployment:
6766
name: Java deployment

installer/config/const.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"time"
66
)
77

8+
const INSTALLER_VERSION = ""
89
const PUBLIC_KEY = ``
910

1011
const (
@@ -13,7 +14,6 @@ const (
1314
GetInstanceDetailsEndpoint = "/api/v1/instances"
1415
GetUpdatesInfoEndpoint = "/api/v1/updates"
1516
GetLicenseEndpoint = "/api/v1/licenses"
16-
GetLatestVersionEndpoint = "/api/v1/versions/latest"
1717
HealthEndpoint = "/api/v1/health"
1818
ImagesPath = "/utmstack/images"
1919

installer/updater/versions.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package updater
33
import (
44
"bytes"
55
"fmt"
6-
"net/http"
76
"os"
87
"os/exec"
98
"strings"
@@ -23,13 +22,8 @@ func GetVersion() (VersionFile, error) {
2322
versionOnce.Do(func() {
2423
if !utils.CheckIfPathExist(config.VersionFilePath) {
2524
if config.ConnectedToInternet {
26-
resp, status, errB := utils.DoReq[VersionDTO](config.GetCMServer()+config.GetLatestVersionEndpoint, nil, http.MethodGet, nil, nil)
27-
if errB != nil || status != http.StatusOK {
28-
err = fmt.Errorf("error getting latest version: status: %d, error: %v", status, err)
29-
return
30-
}
31-
version.Version = resp.Version
32-
version.Changelog = resp.Changelog
25+
version.Version = config.INSTALLER_VERSION
26+
version.Changelog = ""
3327
version.Edition = "community"
3428

3529
} else {

0 commit comments

Comments
 (0)