Skip to content

Commit 1e30204

Browse files
authored
Merge pull request #3629 from ActiveState/version/0-47-0-RC2
Version 0.47.0-RC2
2 parents f2b326f + 4640cc1 commit 1e30204

File tree

756 files changed

+64433
-13036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

756 files changed

+64433
-13036
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- 1.22.x
4040
sys:
4141
- {os: ubuntu-latest}
42-
- {os: macos-12, shell: zsh}
42+
- {os: macos-13, shell: zsh}
4343
- {os: windows-2019}
4444
fail-fast: false
4545
runs-on: ${{ matrix.sys.os }}
@@ -511,10 +511,3 @@ jobs:
511511
session-build-ubuntu-20.04
512512
session-build-macos-11
513513
session-build-windows-2019
514-
515-
- # === Upload Artifacts ===
516-
name: Upload Artifacts
517-
uses: actions/upload-artifact@v4
518-
with:
519-
name: build
520-
path: build/

.github/workflows/scan.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Scan
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * *
6+
7+
jobs:
8+
fetch-binaries:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
runs-on: ${{ matrix.os }}
13+
steps:
14+
- name: Install State Tool
15+
uses: ActiveState/setup-state-tool@v1
16+
17+
- name: Copy State Tool binaries to workspace dir
18+
shell: bash
19+
run: |
20+
exe=`which state`
21+
dir=`dirname $exe`
22+
cp -r $dir/* '${{ github.workspace }}'
23+
24+
- name: Upload binaries
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: ${{ matrix.os }}-binaries
28+
path: .
29+
30+
scan:
31+
needs: fetch-binaries
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Download binaries
35+
uses: actions/download-artifact@v4
36+
37+
- name: Scan binaries
38+
uses: aquasecurity/[email protected]
39+
with:
40+
scan-type: rootfs
41+
scan-ref: '.'
42+
ignore-unfixed: true
43+
format: table
44+
exit-code: 1

activestate.generators.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ scripts:
8484
language: bash
8585
description: Generates graph server and client files
8686
value: |
87-
go install github.com/99designs/[email protected]
87+
set -e
88+
go install github.com/99designs/[email protected]
8889
cd ./cmd/state-svc && gqlgen --verbose
8990
- name: generate-test-update
9091
language: bash

activestate.yaml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ constants:
4848
scripts:
4949
- name: install-deps-dev
5050
language: bash
51+
standalone: true
5152
if: ne .Shell "cmd"
5253
value: |
5354
if ! type "go" &> /dev/null; then
@@ -73,11 +74,13 @@ scripts:
7374
fi
7475
- name: install-deps-os
7576
language: bash
77+
standalone: true
7678
if: ne .OS.Name "Linux"
7779
description: Install OS specific deps
7880
value: ""
7981
- name: install-deps-ci
8082
language: bash
83+
standalone: true
8184
if: ne .Shell "cmd"
8285
value: |
8386
if { [[ "$GOOS" == "windows" ]] || [[ "$OS" == "Windows_NT" ]]; } && ! type "goversioninfo" &> /dev/null; then
@@ -86,6 +89,7 @@ scripts:
8689
fi
8790
- name: preprocess
8891
language: bash
92+
standalone: true
8993
description: Generates assets required by the project that aren't just specific to the build
9094
value: |
9195
set -e
@@ -97,6 +101,7 @@ scripts:
97101
fi
98102
- name: build
99103
language: bash
104+
standalone: true
100105
description: Builds the project with the host OS as the target OS.
101106
value: |
102107
set -e
@@ -111,6 +116,7 @@ scripts:
111116
go build -tags "$GO_BUILD_TAGS" -o $BUILD_TARGET_DIR/$constants.BUILD_TARGET $constants.CLI_BUILDFLAGS $constants.CLI_PKGS
112117
- name: build-for
113118
language: bash
119+
standalone: true
114120
description: Builds the project with the specified OS as the target OS. (valid values darwin, linux, windows)
115121
value: |
116122
set -e
@@ -121,6 +127,7 @@ scripts:
121127
go build -tags "internal $GO_BUILD_TAGS" -o ${2} $constants.CLI_BUILDFLAGS $constants.CLI_PKGS
122128
- name: build-svc
123129
language: bash
130+
standalone: true
124131
description: Builds the state-svc daemon
125132
value: |
126133
set -e
@@ -136,15 +143,16 @@ scripts:
136143
- name: build-exec
137144
description: Builds the State Executor application
138145
language: bash
146+
standalone: true
139147
value: |
140148
set -e
141149
$constants.SET_ENV
142150
143151
go build -tags "$GO_BUILD_TAGS" -o $BUILD_TARGET_DIR/$constants.BUILD_EXEC_TARGET $constants.CLI_BUILDFLAGS $constants.EXECUTOR_PKGS
144152
- name: build-all
145153
description: Builds all our tools
146-
standalone: true
147154
language: bash
155+
standalone: true
148156
value: |
149157
set -e
150158
echo "Building State Tool"
@@ -159,6 +167,7 @@ scripts:
159167
$scripts.build-exec.path()
160168
- name: build-installer
161169
language: bash
170+
standalone: true
162171
description: Builds the state-installer
163172
value: |
164173
set -e
@@ -167,26 +176,29 @@ scripts:
167176
go build -tags "$GO_BUILD_TAGS" -o $BUILD_TARGET_DIR/$constants.BUILD_INSTALLER_TARGET $constants.INSTALLER_PKGS
168177
- name: build-remote-installer
169178
language: bash
179+
standalone: true
170180
description: Builds the state-remote-installer
171181
value: |
172182
set -e
173183
$constants.SET_ENV
174-
TARGET=$BUILD_REMOTE_INSTALLER_TARGET
184+
TARGET=$constants.BUILD_REMOTE_INSTALLER_TARGET
175185
if [[ "$GOOS" == "windows" || "$OS" == "Windows_NT" ]]; then
176-
TARGET="${BUILD_REMOTE_INSTALLER_TARGET}.exe"
186+
TARGET="${constants.BUILD_REMOTE_INSTALLER_TARGET}.exe"
177187
fi
178188
GOFLAGS="" go install github.com/josephspurrier/goversioninfo/cmd/[email protected]
179189
cd cmd/state-remote-installer
180190
go generate
181191
go build -tags "$GO_BUILD_TAGS" -o ../../$BUILD_TARGET_DIR/$TARGET .
182192
- name: install
183193
language: bash
194+
standalone: true
184195
description: Installs the current HEAD version into GOBIN
185196
value: |
186197
$constants.SET_ENV
187198
go install $constants.CLI_BUILDFLAGS $CLI_PKGS
188199
- name: deploy-updates
189200
language: bash
201+
standalone: true
190202
description: Deploys update files to S3. This steps is automated by CI and should never be ran manually unless you KNOW WHAT YOU'RE DOING.
191203
value: |
192204
set -e
@@ -232,17 +244,20 @@ scripts:
232244
cp installers/stop${constants.SCRIPT_EXT} $INSTALLERS_DIR/stop${constants.SCRIPT_EXT}
233245
- name: deploy-installers
234246
language: bash
247+
standalone: true
235248
description: Deploys update files to S3. This steps is automated by CI and should never be ran manually unless you KNOW WHAT YOU'RE DOING.
236249
value: |
237250
go run scripts/ci/s3-deployer/main.go build/installers us-east-1 state-tool update/state
238251
- name: deploy-remote-installer
239252
language: bash
253+
standalone: true
240254
value: |
241255
set -e
242256
$constants.SET_ENV
243257
go run scripts/ci/s3-deployer/main.go $BUILD_TARGET_DIR/remote-installer us-east-1 state-tool remote-installer
244258
- name: build-workflow-assets
245259
language: bash
260+
standalone: true
246261
description: Generates our github workflows
247262
value: |
248263
$scripts.build-for.path() "windows" ./.github/deps/Windows/bin/state.exe
@@ -254,6 +269,7 @@ scripts:
254269
GOOS=darwin go build -o .github/deps/macOS/bin/parallelize github.com/ActiveState/cli/scripts/ci/parallelize/
255270
- name: update-workflow-assets
256271
language: bash
272+
standalone: true
257273
description: Generates our github workflows
258274
value: |
259275
[ -z "${2}" ] && >&2 echo "Usage: update-workflow-assets [branch] [version]" && exit 1
@@ -286,12 +302,13 @@ scripts:
286302
rm -Rf $tmpDir
287303
- name: test
288304
language: bash
305+
standalone: true
289306
description: Runs unit tests (not integration tests)
290307
value: |
291308
go test -v `go list ./... | grep -v integration | grep -v automation | grep -v expect | grep -v state-svc | grep -v state-offline` $@
292-
standalone: true
293309
- name: integration-tests
294310
language: bash
311+
standalone: true
295312
description: Runs integration tests.
296313
value: |
297314
unset ACTIVESTATE_ACTIVATED
@@ -300,35 +317,39 @@ scripts:
300317
go test `go list ./... | grep "${INTEGRATION_TEST_REGEX}"` -v "${@:1}" -timeout 20m
301318
- name: integration-tests-build-check
302319
language: bash
320+
standalone: true
303321
description: Builds integration tests and removes the executable artifact(s).
304322
value: |
305323
out="x.test"
306324
go list ./... | grep "${INTEGRATION_TEST_REGEX}" | xargs -L 1 go test -o $out -c
307325
[ -f $out ] && rm $out
308326
- name: clean
309327
language: bash
328+
standalone: true
310329
description: Cleans out the build dir.
311330
value: |
312331
go clean
313332
rm -Rf build
314333
- name: run
315334
language: bash
335+
standalone: true
316336
description: Builds the State Tool and runs it with `--help`
317337
value: |
318338
$scripts.build.path()
319339
build/state --help
320340
- name: debug
321341
language: bash
322-
description: "Runs a remote debugger that can be hooked into from your IDE. Example usage: `state run debug activate` (will debug `state activate`)"
323342
standalone: true
343+
description: "Runs a remote debugger that can be hooked into from your IDE. Example usage: `state run debug activate` (will debug `state activate`)"
324344
value: dlv debug --headless --listen=:2346 --api-version=2 github.com/ActiveState/cli/cmd/state -- $@
325345
- name: scripted
326346
language: bash
327-
description: "Runs a command via 'go run'"
328347
standalone: true
348+
description: "Runs a command via 'go run'"
329349
value: go run github.com/ActiveState/cli/cmd/state $@
330350
- name: story-cleanup
331351
language: bash
352+
standalone: true
332353
description: "Runs Python script to move old stories from primary project to storage project"
333354
value: |
334355
export PT_API_TOKEN=$secrets.project.PT_API_TOKEN
@@ -338,12 +359,14 @@ scripts:
338359
python3 ./scripts/story-cleanup/story-cleanup.py
339360
- name: lint
340361
language: bash
362+
standalone: true
341363
description: "Runs linting for untracked and unstaged changes (if any), or staged changes"
342364
value: |
343365
golangci-lint run --new
344366
actionlint
345367
- name: lint-staged
346368
language: bash
369+
standalone: true
347370
description: "Runs linting for staged changes (skipping untracked and unstaged-only files)"
348371
value: |
349372
golangci-lint run \
@@ -356,12 +379,14 @@ scripts:
356379
actionlint $actionfiles
357380
- name: lint-all
358381
language: bash
382+
standalone: true
359383
description: "Runs linting for all files"
360384
value: |
361385
golangci-lint run --no-config
362386
actionlint
363387
- name: check-format
364388
language: bash
389+
standalone: true
365390
description: "Checks if the code is formatted correctly"
366391
value: |
367392
set -e
@@ -392,48 +417,55 @@ scripts:
392417
fi
393418
- name: grab-mergecommits
394419
language: bash
420+
standalone: true
395421
value: |
396422
export JIRA_USERNAME=${secrets.user.JIRA_USERNAME}
397423
export JIRA_TOKEN=${secrets.user.JIRA_TOKEN}
398424
export GITHUB_TOKEN=${secrets.user.GITHUB_TOKEN}
399425
go run $project.path()/scripts/grab-mergecommits/main.go $1
400426
- name: target-version-pr
401427
language: bash
428+
standalone: true
402429
value: |
403430
export JIRA_USERNAME=${secrets.user.JIRA_USERNAME}
404431
export JIRA_TOKEN=${secrets.user.JIRA_TOKEN}
405432
export GITHUB_TOKEN=${secrets.user.GITHUB_TOKEN}
406433
go run $project.path()/scripts/ci/target-version-pr/main.go $1
407434
- name: create-version-pr
408435
language: bash
436+
standalone: true
409437
value: |
410438
export JIRA_USERNAME=${secrets.user.JIRA_USERNAME}
411439
export JIRA_TOKEN=${secrets.user.JIRA_TOKEN}
412440
export GITHUB_TOKEN=${secrets.user.GITHUB_TOKEN}
413441
go run $project.path()/scripts/create-version-pr/main.go $1
414442
- name: propagate-pr
415443
language: bash
444+
standalone: true
416445
value: |
417446
export JIRA_USERNAME=${secrets.user.JIRA_USERNAME}
418447
export JIRA_TOKEN=${secrets.user.JIRA_TOKEN}
419448
export GITHUB_TOKEN=${secrets.user.GITHUB_TOKEN}
420449
go run $project.path()/scripts/ci/propagate-pr/main.go $1
421450
- name: verify-pr
422451
language: bash
452+
standalone: true
423453
value: |
424454
export JIRA_USERNAME=${secrets.user.JIRA_USERNAME}
425455
export JIRA_TOKEN=${secrets.user.JIRA_TOKEN}
426456
export GITHUB_TOKEN=${secrets.user.GITHUB_TOKEN}
427457
go run $project.path()/scripts/ci/verify-pr/main.go $1
428458
- name: start-story
429459
language: bash
460+
standalone: true
430461
value: |
431462
export JIRA_USERNAME=${secrets.user.JIRA_USERNAME}
432463
export JIRA_TOKEN=${secrets.user.JIRA_TOKEN}
433464
export GITHUB_TOKEN=${secrets.user.GITHUB_TOKEN}
434465
go run $project.path()/scripts/start-story/main.go "$@"
435466
- name: ghapi
436467
language: bash
468+
standalone: true
437469
value: |
438470
curl \
439471
-H "Accept: application/vnd.github+json" \
@@ -442,6 +474,7 @@ scripts:
442474
- name: benchmark-exec
443475
if: eq .OS.Name "Linux"
444476
language: bash
477+
standalone: true
445478
description: "Benchmarks executable leveraging highly sensitive/accurate tooling"
446479
value: |
447480
# example usage:

0 commit comments

Comments
 (0)