Skip to content

Commit c2368c2

Browse files
authored
Support Package Update 2025-06 (#33)
This update has the following - Moved back to deno - Used the kubernetes SDK instead of kubectl - simplified data collection - small update to package layout
1 parent dcc2568 commit c2368c2

Some content is hidden

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

41 files changed

+816
-1346
lines changed

.devcontainer/devcontainer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
// For format details, see https://aka.ms/devcontainer.json.
22
{
33
"name": "Codefresh Support Package",
4-
"image": "mcr.microsoft.com/devcontainers/go:1",
4+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
5+
"onCreateCommand": "curl -fsSL https://deno.land/install.sh | sh -s -- -y",
56
"customizations": {
67
"vscode": {
8+
"settings": {
9+
"deno.enable": true,
10+
"deno.lint": true
11+
},
712
"extensions": [
13+
"denoland.vscode-deno",
814
"davidanson.vscode-markdownlint",
9-
"redhat.vscode-yaml",
10-
"golang.go"
15+
"redhat.vscode-yaml"
1116
]
1217
}
1318
}

.github/workflows/release.yaml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,42 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v*' # Trigger only on tags starting with "v" (e.g., v1.0.0)
6+
- 'v*' # Triggers the workflow on new tags that start with 'v'
77

88
jobs:
9-
build-and-release:
9+
build:
1010
runs-on: ubuntu-latest
1111

12-
permissions:
13-
contents: write # Needed to create GitHub releases
14-
1512
steps:
16-
- name: Checkout code
13+
- name: Checkout repository
1714
uses: actions/checkout@v4
1815

19-
- name: Set up Go
20-
uses: actions/setup-go@v5
16+
- name: Set up Deno
17+
uses: denoland/setup-deno@v2
2118
with:
22-
go-version: '1.24' # Use the version of Go your project requires
19+
deno-version: vx.x.x
2320

24-
- name: Run goreleaser
25-
uses: goreleaser/goreleaser-action@v6
26-
with:
27-
version: latest # Or pin a specific version
28-
args: release --clean
21+
- name: Compile and package binaries
22+
run: |
23+
sed -i "s/__APP_VERSION__/$TAG_NAME/g" main.js
24+
deno task compile
25+
deno task package
2926
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
TAG_NAME: ${{ github.ref_name }}
28+
29+
- name: Create GitHub Release
30+
id: create_release
31+
uses: ncipollo/release-action@v1
32+
with:
33+
artifacts: |
34+
./bin/cf-support_windows_amd64.zip
35+
./bin/cf-support_darwin_amd64.tar.gz
36+
./bin/cf-support_darwin_arm64.tar.gz
37+
./bin/cf-support_linux_amd64.tar.gz
38+
./bin/cf-support_linux_arm64.tar.gz
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
tag: ${{ github.ref_name }}
41+
name: ${{ github.ref_name }}
42+
body: ${{ github.event.head_commit.message }}
43+
draft: false
44+
prerelease: false

.gitignore

Lines changed: 129 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,132 @@
1-
# If you prefer the allow list template instead of the deny list, see community template:
2-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3-
#
4-
# Binaries for programs and plugins
5-
*.exe
6-
*.exe~
7-
*.dll
8-
*.so
9-
*.dylib
10-
/dist
11-
12-
# Test binary, built with `go test -c`
13-
*.test
14-
15-
# Output of the go coverage tool, specifically when used with LiteIDE
16-
*.out
17-
18-
# Dependency directories (remove the comment below to include it)
19-
# vendor/
20-
21-
# Go workspace file
22-
go.work
23-
go.work.sum
24-
25-
# env file
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
2676
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
27124

28-
#macos files
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
29131
.DS_Store
132+
bin

.goreleaser.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ This project is designed to gather data from Codefresh Hybrid Runtimes OnPrem in
1313
- `CF_URL`: URL of the platform (ex: `https://g.codefresh.io`)
1414
- Need an Account Admin Token for Pipelines Hybrid Runtime.
1515
- Need a System Admin Token for the OnPrem Installation.
16-
- JQ
17-
- Used only to get the latest version of the binary for *nix systems.
16+
- Other - Not Required
17+
- `jq`
18+
- Used to get current version to download the support package.
19+
20+
## Build Info
21+
22+
The binary is built on using `ubuntu-latest`. You can find what is included in this environemnt at [Ubuntu2404-Readme.md](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md)
1823

1924
## Usage
2025

@@ -25,7 +30,7 @@ This project is designed to gather data from Codefresh Hybrid Runtimes OnPrem in
2530
VERSION=$(curl --silent "https://api.github.com/repos/codefresh-support/codefresh-support-package/releases/latest" | jq -r ".tag_name")
2631

2732
# download and extract the binary
28-
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_darwin_arm64.tar.gz | tar -zx -O cf-support > cf-support
33+
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_darwin_arm64.tar.gz | tar -zx -O cf-support_darwin_arm64 > cf-support
2934

3035
# set execution to binary
3136
chmod +x cf-support
@@ -41,7 +46,7 @@ chmod +x cf-support
4146
VERSION=$(curl --silent "https://api.github.com/repos/codefresh-support/codefresh-support-package/releases/latest" | jq -r ".tag_name")
4247

4348
# download and extract the binary
44-
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_darwin_amd64.tar.gz | tar -zx -O cf-support > cf-support
49+
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_darwin_amd64.tar.gz | tar -zx -O cf-support_darwin_amd64 > cf-support
4550

4651
# set execution to binary
4752
chmod +x cf-support
@@ -57,7 +62,7 @@ chmod +x cf-support
5762
VERSION=$(curl --silent "https://api.github.com/repos/codefresh-support/codefresh-support-package/releases/latest" | jq -r ".tag_name")
5863

5964
# download and extract the binary
60-
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_linux_arm64.tar.gz | tar -zx -O cf-support > cf-support
65+
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_linux_arm64.tar.gz | tar -zx -O cf-support_linux_arm64 > cf-support
6166

6267
# set execution to binary
6368
chmod +x cf-support
@@ -73,7 +78,7 @@ chmod +x cf-support
7378
VERSION=$(curl --silent "https://api.github.com/repos/codefresh-support/codefresh-support-package/releases/latest" | jq -r ".tag_name")
7479

7580
# download and extract the binary
76-
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_linux_amd64.tar.gz | tar -zx -O cf-support > cf-support
81+
curl -L --output - https://github.com/codefresh-support/codefresh-support-package/releases/download/$VERSION/cf-support_linux_amd64.tar.gz | tar -zx -O cf-support_linux_amd64 > cf-support
7782

7883
# set execution to binary
7984
chmod +x cf-support
@@ -82,10 +87,10 @@ chmod +x cf-support
8287
./cf-support
8388
```
8489

85-
### Windows - arm64/amd6
90+
### Windows - amd6
8691

8792
1. Go the the [Latest](https://github.com/codefresh-support/codefresh-support-package/releases/latest) release.
88-
1. Download the cf-support_windows_arm64.zip / cf-support_windows_amd64.zip file
93+
1. Download the cf-support_windows_amd64.zip file
8994
1. Run the `.exe` file via CMD or PowerShell
9095

9196
## How to Release a New Version

0 commit comments

Comments
 (0)