Skip to content

Commit 9602113

Browse files
committed
Merge branch 'version/0-48-0-RC1' into DX-3164
2 parents e4beb1e + cc79a08 commit 9602113

337 files changed

Lines changed: 12305 additions & 8256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
24.6 MB
Binary file not shown.
File renamed without changes.

.github/workflows/build.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ jobs:
3636
strategy:
3737
matrix:
3838
go-version:
39-
- 1.22.x
39+
- 1.22.12
4040
sys:
4141
- {os: ubuntu-latest}
4242
- {os: macos-13, shell: zsh}
4343
- {os: windows-2019}
44+
- {os: ubuntu-24.04-arm}
4445
fail-fast: false
4546
runs-on: ${{ matrix.sys.os }}
4647
env:
@@ -74,19 +75,39 @@ jobs:
7475

7576
# === Install gotestfmt ===
7677
- name: Set up gotestfmt
77-
uses: gotesttools/gotestfmt-action@v2
78-
with:
79-
token: ${{ secrets.GITHUB_TOKEN }}
78+
shell: bash
79+
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
8080

8181
- # === Install State Tool ===
8282
name: Install State Tool
8383
uses: ActiveState/setup-state-tool@v1
84+
if: "!contains(matrix.sys.os, 'arm') && runner.os != 'Windows'"
85+
86+
- # === Install State Tool (ARM64) ===
87+
name: Install State Tool (ARM64)
88+
if: contains(matrix.sys.os, 'arm')
89+
shell: bash
90+
run: |
91+
./installers/install.sh -b beta
92+
echo "$HOME/.local/ActiveState/StateTool/beta/bin" >> $GITHUB_PATH
93+
"$HOME/.local/ActiveState/StateTool/beta/bin/state" config set optin.unstable true
94+
95+
- # === Install State Tool (Windows) ===
96+
name: Install State Tool (Windows)
97+
if: runner.os == 'Windows'
98+
shell: pwsh
99+
run: |
100+
Invoke-Expression -Command ".\installers\install.ps1 -n"
101+
echo "$env:LOCALAPPDATA\ActiveState\StateTool\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
102+
Invoke-Expression "$env:LOCALAPPDATA\ActiveState\StateTool\release\bin\state config set optin.unstable true"
84103
85104
- # === Setup ===
86105
name: Setup
87106
shell: bash
88107
run: |
89-
bin=$(pwd)/.github/deps/${{ runner.os }}/bin
108+
arch="amd64"
109+
if [[ ${{ contains(matrix.sys.os, 'arm') }} = true ]]; then arch="arm64"; fi
110+
bin=$(pwd)/.github/deps/${{ runner.os }}/$arch/bin
90111
echo "Adding $bin to PATH"
91112
echo "$bin" >> $GITHUB_PATH
92113
@@ -125,7 +146,6 @@ jobs:
125146
shell: bash
126147
timeout-minutes: 15
127148
run: |
128-
export PATH="$(pwd)/.github/deps/${{ runner.os }}/bin:$PATH"
129149
parallelize "$(cat <<'EOF'
130150
[
131151
{
@@ -262,7 +282,7 @@ jobs:
262282

263283
- # === Configure AWS credentials ==
264284
name: Configure AWS credentials
265-
uses: aws-actions/configure-aws-credentials@v2
285+
uses: aws-actions/configure-aws-credentials@v4
266286
with:
267287
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
268288
role-session-name: ${{ env.AWS_ROLE_SESSION_NAME }}
@@ -325,6 +345,10 @@ jobs:
325345
fi
326346
else
327347
TEST_SUITE_TAGS="all"
348+
if [[ ${{ contains(matrix.sys.os, 'arm') }} = true ]]; then
349+
echo "Skipping integration tests on ARM"
350+
exit 0
351+
fi
328352
fi
329353
330354
echo "Running integration tests with tags: $TEST_SUITE_TAGS (empty means every test not specifically tagged)"
@@ -410,7 +434,6 @@ jobs:
410434
merge-multiple: true
411435

412436
- name: Scan for CVEs
413-
if: runner.os == 'Linux'
414437
uses: aquasecurity/trivy-action@0.26.0
415438
env:
416439
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
@@ -483,7 +506,7 @@ jobs:
483506

484507
- # === Configure AWS credentials ==
485508
name: Configure AWS credentials
486-
uses: aws-actions/configure-aws-credentials@v2
509+
uses: aws-actions/configure-aws-credentials@v4
487510
with:
488511
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
489512
role-session-name: ${{ env.AWS_ROLE_SESSION_NAME }}
@@ -511,3 +534,4 @@ jobs:
511534
session-build-ubuntu-20.04
512535
session-build-macos-11
513536
session-build-windows-2019
537+
session-build-ubuntu-24.04-arm

activestate.generators.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
scripts:
22
- name: generate-api-client
33
language: bash
4+
standalone: true
45
description: Generates the mono-api client files
56
value: |
67
echo "IMPORTANT!!! mono API and inventory API have to be in sync. Consider running state run generate-inventory-client"
@@ -10,6 +11,7 @@ scripts:
1011
popd
1112
- name: generate-secrets-client
1213
language: bash
14+
standalone: true
1315
description: Generates the secrets-api client files
1416
value: |
1517
WD=$(pwd)
@@ -18,6 +20,7 @@ scripts:
1820
popd
1921
- name: generate-headchef-client
2022
language: bash
23+
standalone: true
2124
description: Generates the headchef-api client files
2225
value: |
2326
WD=$(pwd)
@@ -26,6 +29,7 @@ scripts:
2629
popd
2730
- name: generate-logstreamer-client
2831
language: bash
32+
standalone: true
2933
description: Generates the buildlog-streamer client files
3034
value: |
3135
WD=$(pwd)
@@ -34,6 +38,7 @@ scripts:
3438
popd
3539
- name: generate-inventory-client
3640
language: bash
41+
standalone: true
3742
description: Generates the inventory-api client files
3843
value: |
3944
echo "IMPORTANT!!! mono API and inventory API have to be in sync. Consider running state run generate-api-client"
@@ -43,6 +48,7 @@ scripts:
4348
popd
4449
- name: generate-clients
4550
language: bash
51+
standalone: true
4652
description: Generates all api clients
4753
value: |
4854
$scripts.generate-api-client.path()
@@ -55,6 +61,7 @@ scripts:
5561
value: python3 scripts/locale-generator.py
5662
- name: generate-payload
5763
language: bash
64+
standalone: true
5865
description: Generate payload for installer / update archives
5966
value: |
6067
set -e
@@ -64,10 +71,10 @@ scripts:
6471
go run ./scripts/ci/payload-generator/main.go "$@"
6572
- name: generate-update
6673
language: bash
74+
standalone: true
6775
description: Generate update files
6876
value: |
6977
set -e
70-
export GOARCH=${1:-amd64}
7178
$constants.SET_ENV
7279
7380
$scripts.generate-payload.path()
@@ -79,9 +86,11 @@ scripts:
7986
go run scripts/ci/update-generator/main.go -o ./build/update
8087
- name: generate-remote-install-deployment
8188
language: bash
89+
standalone: true
8290
value: go run scripts/ci/deploy-generator/remote-installer/main.go "$@"
8391
- name: generate-graph
8492
language: bash
93+
standalone: true
8594
description: Generates graph server and client files
8695
value: |
8796
set -e

activestate.yaml

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,9 @@ scripts:
7272
echo "goversioninfo was not found on your PATH. Installing .."
7373
GOFLAGS="" go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@v1.4.0
7474
fi
75-
- name: install-deps-os
76-
language: bash
77-
standalone: true
78-
if: ne .OS.Name "Linux"
79-
description: Install OS specific deps
80-
value: ""
8175
- name: install-deps-ci
8276
language: bash
8377
standalone: true
84-
if: ne .Shell "cmd"
8578
value: |
8679
if { [[ "$GOOS" == "windows" ]] || [[ "$OS" == "Windows_NT" ]]; } && ! type "goversioninfo" &> /dev/null; then
8780
echo "goversioninfo was not found on your PATH. Installing .."
@@ -114,17 +107,6 @@ scripts:
114107
popd > /dev/null
115108
fi
116109
go build -tags "$GO_BUILD_TAGS" -o $BUILD_TARGET_DIR/$constants.BUILD_TARGET $constants.CLI_BUILDFLAGS $constants.CLI_PKGS
117-
- name: build-for
118-
language: bash
119-
standalone: true
120-
description: Builds the project with the specified OS as the target OS. (valid values darwin, linux, windows)
121-
value: |
122-
set -e
123-
$constants.SET_ENV
124-
export GOOS=${1}
125-
export GOARCH=amd64
126-
[ -z "${2}" ] && >&2 echo "must provide output file as 2nd arg" && exit 1
127-
go build -tags "internal $GO_BUILD_TAGS" -o ${2} $constants.CLI_BUILDFLAGS $constants.CLI_PKGS
128110
- name: build-svc
129111
language: bash
130112
standalone: true
@@ -260,46 +242,10 @@ scripts:
260242
standalone: true
261243
description: Generates our github workflows
262244
value: |
263-
$scripts.build-for.path() "windows" ./.github/deps/Windows/bin/state.exe
264-
$scripts.build-for.path() "linux" ./.github/deps/Linux/bin/state
265-
$scripts.build-for.path() "darwin" ./.github/deps/macOS/bin/state
266-
267-
GOOS=windows go build -o .github/deps/Windows/bin/parallelize.exe github.com/ActiveState/cli/scripts/ci/parallelize/
268-
GOOS=linux go build -o .github/deps/Linux/bin/parallelize github.com/ActiveState/cli/scripts/ci/parallelize/
269-
GOOS=darwin go build -o .github/deps/macOS/bin/parallelize github.com/ActiveState/cli/scripts/ci/parallelize/
270-
- name: update-workflow-assets
271-
language: bash
272-
standalone: true
273-
description: Generates our github workflows
274-
value: |
275-
[ -z "${2}" ] && >&2 echo "Usage: update-workflow-assets [branch] [version]" && exit 1
276-
277-
tmpDir=$(mktemp -d)
278-
pushd $tmpDir
279-
wget https://state-tool.s3.amazonaws.com/update/state/${1}/${2}/darwin-amd64/state-darwin-amd64-${2}.tar.gz
280-
tar xzf state-darwin-amd64-${2}.tar.gz
281-
cp -Rfv state-install/bin/state $project.path()/.github/deps/macOS/bin
282-
cp -Rfv state-install/bin/state-svc $project.path()/.github/deps/macOS/bin
283-
popd
284-
rm -Rf $tmpDir
285-
286-
tmpDir=$(mktemp -d)
287-
pushd $tmpDir
288-
wget https://state-tool.s3.amazonaws.com/update/state/${1}/${2}/linux-amd64/state-linux-amd64-${2}.tar.gz
289-
tar xzf state-linux-amd64-${2}.tar.gz
290-
cp -Rfv state-install/bin/state $project.path()/.github/deps/Linux/bin
291-
cp -Rfv state-install/bin/state-svc $project.path()/.github/deps/Linux/bin
292-
popd
293-
rm -Rf $tmpDir
294-
295-
tmpDir=$(mktemp -d)
296-
pushd $tmpDir
297-
wget https://state-tool.s3.amazonaws.com/update/state/${1}/${2}/windows-amd64/state-windows-amd64-${2}.zip
298-
unzip state-windows-amd64-${2}.zip
299-
cp -Rfv state-install/bin/state.exe $project.path()/.github/deps/Windows/bin
300-
cp -Rfv state-install/bin/state-svc.exe $project.path()/.github/deps/Windows/bin
301-
popd
302-
rm -Rf $tmpDir
245+
GOOS=windows go build -o .github/deps/Windows/amd64/bin/parallelize.exe github.com/ActiveState/cli/scripts/ci/parallelize/
246+
GOOS=linux go build -o .github/deps/Linux/amd64/bin/parallelize github.com/ActiveState/cli/scripts/ci/parallelize/
247+
GOOS=linux GOARCH=arm64 go build -o .github/deps/Linux/arm64/bin/parallelize github.com/ActiveState/cli/scripts/ci/parallelize/
248+
GOOS=darwin go build -o .github/deps/macOS/amd64/bin/parallelize github.com/ActiveState/cli/scripts/ci/parallelize/
303249
- name: test
304250
language: bash
305251
standalone: true

0 commit comments

Comments
 (0)