Skip to content

Commit d91754d

Browse files
Pull request #119: Release v1.162.0 - release → staging
Merge in FEE/cloud-manager from release/v1.162.0 to staging * commit '11e05a3d345c951c4bac5f5aa2e96e836e3d6f9d': (85 commits) bump package version in sonar Cloud version 1.162.0, API v4 version 0.160.0, Validation version 0.85.0, UI version 0.26.0, Utilities version 0.17.0, Queries version 0.24.0, Shared version 0.11.0 Pull request #118: fix: vitest --related scope 2 Pull request #108: feat: STORIF-320 - Object storage landing page updated. Pull request #117: fix: Vitest --related scope Pull request #86: Feature/STORIF-335 Pull request #111: chore: re-introduce longer vitest timeout Pull request #74: change: [DPS-41187] - Custom Https - add pendo ids Pull request #112: refactor(analytics): UIE-10717 - Import checkOptanonConsent from @akamai/compute-ui-core/analytics Pull request #95: refactor(datetime): UIE-11069 - Import parseExpiryYear from @akamai/compute-ui-core/datetime Pull request #81: feat: [UIE-10549] - Add Valkey types/endpoints/queries/factories Pull request #66: upcoming: [DPS-42065] - Add virtualization in CloudPulseResourcesSelect dropdown, Loading indicator in CloudPulse Metrics Pull request #67: upcoming: [DPS-42097] - Migrate from entity_ids to entity object in Alerts API response Pull request #90: STORIF-349: added Volumes quotas support. Pull request #100: upcoming: [UIE-11134] - Global Banner for Compute Pricing Changes Pull request #109: fix: skip flaky test Pull request #110: fix: [UIE-10445] Add link in Zuplo's Documentation tab Pull request #84: Feature/storif 330 quotas selector Pull request #101: upcoming: [UIE-10692, UIE-10693, UIE-10694, UIE-10695] – Add new Summary and Metrics sections in the NodeBalancer Details Pull request #60: UIE-10782 iam circle progress ...
2 parents abf048c + 11e05a3 commit d91754d

518 files changed

Lines changed: 19990 additions & 7938 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.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ yarn-error.log*
4141

4242
# Test results
4343
junit.xml
44+
reports/vitest-junit*.xml
4445

4546
# Runtime data
4647
pids

acc/Jenkinsfile

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
pipeline {
2+
agent {
3+
label "fee"
4+
}
5+
6+
options {
7+
disableConcurrentBuilds()
8+
}
9+
10+
environment {
11+
CI = 'true'
12+
// Vitest JUnit for Jenkins test reporting (full + PR partial runs).
13+
VITEST_JUNIT_OUT = "${WORKSPACE}/reports/vitest-junit.xml"
14+
}
15+
16+
stages {
17+
// Core CI only for protected branches and open PRs — not for every feature-branch push.
18+
// (Lunabuild must trigger the multibranch *PR* job so CHANGE_ID / BITBUCKET_PR_ID is set;
19+
// otherwise branch-only indexing runs will skip these stages.)
20+
stage("Setup pnpm") {
21+
when {
22+
anyOf {
23+
branch 'develop'
24+
branch 'staging'
25+
branch 'master'
26+
expression { env.CHANGE_ID != null }
27+
expression { env.BITBUCKET_PR_ID != null }
28+
}
29+
}
30+
steps {
31+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
32+
sh "node -v"
33+
sh "npm -v"
34+
sh "pnpm -v || corepack enable pnpm"
35+
sh "pnpm install:all"
36+
}
37+
}
38+
}
39+
40+
stage("Build dependencies") {
41+
when {
42+
anyOf {
43+
branch 'develop'
44+
branch 'staging'
45+
branch 'master'
46+
expression { env.CHANGE_ID != null }
47+
expression { env.BITBUCKET_PR_ID != null }
48+
}
49+
}
50+
steps {
51+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
52+
sh "pnpm build:validation"
53+
sh "pnpm build:sdk"
54+
}
55+
}
56+
}
57+
58+
stage("Validate") {
59+
when {
60+
anyOf {
61+
branch 'develop'
62+
branch 'staging'
63+
branch 'master'
64+
expression { env.CHANGE_ID != null }
65+
expression { env.BITBUCKET_PR_ID != null }
66+
}
67+
}
68+
parallel {
69+
stage("Lint") {
70+
steps {
71+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
72+
sh "pnpm lint:all"
73+
}
74+
}
75+
}
76+
stage("Typecheck") {
77+
steps {
78+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
79+
sh "pnpm -r --parallel typecheck"
80+
}
81+
}
82+
}
83+
}
84+
}
85+
86+
stage("Test") {
87+
when {
88+
anyOf {
89+
branch 'develop'
90+
branch 'staging'
91+
branch 'master'
92+
expression { env.CHANGE_ID != null }
93+
expression { env.BITBUCKET_PR_ID != null }
94+
}
95+
}
96+
steps {
97+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
98+
sh "pnpm test:ci"
99+
}
100+
}
101+
}
102+
103+
stage("Build PR") {
104+
when {
105+
expression { env.CHANGE_ID != null } // It's a PR
106+
}
107+
steps {
108+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
109+
sh "pnpm build"
110+
}
111+
}
112+
}
113+
114+
stage("Build develop") {
115+
when {
116+
anyOf {
117+
branch pattern: "develop"
118+
}
119+
}
120+
environment {
121+
REACT_APP_API_MAX_PAGE_SIZE = "500"
122+
REACT_APP_API_ROOT = "https://api.devcloud.linode.com/v4"
123+
REACT_APP_APP_ROOT = "https://cloud.devcloud.linode.com"
124+
REACT_APP_CLIENT_ID = "4bd20531408b51e73313"
125+
REACT_APP_LAUNCH_DARKLY_ID = "67ed97f93736be0c14fa0ea2"
126+
REACT_APP_LKE_HIGH_AVAILABILITY_PRICE = "60"
127+
REACT_APP_LOGIN_ROOT = "https://login.devcloud.linode.com"
128+
}
129+
steps {
130+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
131+
sh "pnpm build"
132+
sh "pnpm release --env=develop"
133+
}
134+
}
135+
}
136+
137+
stage("Build staging") {
138+
when {
139+
anyOf {
140+
branch pattern: "staging"
141+
}
142+
}
143+
environment {
144+
REACT_APP_PAYPAL_CLIENT_ID = "AWdnFJ_Yx5X9uqKZQdbdkLfCnEJwtauQJ2tyesKf3S0IxSrkRLmB2ZN2ACSwy37gxY_AZoTagHWlZCOA"
145+
REACT_APP_GPAY_MERCHANT_ID = "BCR2DN6TZ6OMNHTP"
146+
REACT_APP_ALGOLIA_APPLICATION_ID = "KGUN8FAIPF"
147+
REACT_APP_ALGOLIA_SEARCH_KEY = "d4847002cd30392fe0fbd00a1da933ed"
148+
REACT_APP_API_ROOT = "https://cloud.staging.linode.com/api/v4"
149+
REACT_APP_APP_ROOT = "https://cloud.staging.linode.com"
150+
REACT_APP_CLIENT_ID = "6714f4f895cbe13a5781"
151+
REACT_APP_ENVIRONMENT_NAME = "staging"
152+
REACT_APP_LISH_ROOT = "webconsole.linode.com"
153+
REACT_APP_LOGIN_ROOT = "https://login.staging.linode.com"
154+
REACT_APP_ADOBE_ANALYTICS_URL = "https://assets.adobedtm.com/fcfd3580c848/15e23aa7fce2/launch-5bda4b7a1db9-staging.min.js"
155+
REACT_APP_PENDO_API_KEY = "46f744c8-8628-4dc4-55f9-83fdd3bf2eef"
156+
REACT_APP_SENTRY_URL = "https://ec5fcee0daee4bc9bb74e5b614e27ee0@o83654.ingest.sentry.io/182732"
157+
REACT_APP_LAUNCH_DARKLY_ID = "5ed11a54d310ac0a0e542702"
158+
REACT_APP_API_MAX_PAGE_SIZE = "500"
159+
REACT_APP_STATUS_PAGE_URL = "https://status.linode.com/api/v2"
160+
}
161+
steps {
162+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
163+
sh "pnpm build"
164+
sh "pnpm release --env=staging"
165+
}
166+
}
167+
}
168+
169+
stage("Build master") {
170+
when {
171+
anyOf {
172+
branch pattern: "master"
173+
}
174+
}
175+
environment {
176+
REACT_APP_ADOBE_ANALYTICS_URL = "https://assets.adobedtm.com/fcfd3580c848/15e23aa7fce2/launch-9ea21650035a.min.js"
177+
REACT_APP_ALGOLIA_APPLICATION_ID = "KGUN8FAIPF"
178+
REACT_APP_ALGOLIA_SEARCH_KEY = "d4847002cd30392fe0fbd00a1da933ed"
179+
REACT_APP_API_MAX_PAGE_SIZE = "500"
180+
REACT_APP_API_ROOT = "https://cloud.linode.com/api/v4"
181+
REACT_APP_APP_ROOT = "https://cloud.linode.com"
182+
REACT_APP_CLIENT_ID = "04b4276a4094ce378d27"
183+
REACT_APP_ENVIRONMENT_NAME = "production"
184+
REACT_APP_GPAY_MERCHANT_ID = "BCR2DN6TZ6OMNHTP"
185+
REACT_APP_LAUNCH_DARKLY_ID = "5cd5be32283709081fd70fbc"
186+
REACT_APP_LISH_ROOT = "webconsole.linode.com"
187+
REACT_APP_LOGIN_ROOT = "https://login.linode.com"
188+
REACT_APP_PAYPAL_CLIENT_ID = "AWdnFJ_Yx5X9uqKZQdbdkLfCnEJwtauQJ2tyesKf3S0IxSrkRLmB2ZN2ACSwy37gxY_AZoTagHWlZCOA"
189+
REACT_APP_PENDO_API_KEY = '46f744c8-8628-4dc4-55f9-83fdd3bf2eef'
190+
REACT_APP_SENTRY_URL = "https://ec5fcee0daee4bc9bb74e5b614e27ee0@o83654.ingest.sentry.io/182732"
191+
REACT_APP_STATUS_PAGE_URL = "https://status.linode.com/api/v2"
192+
}
193+
steps {
194+
nodejs(configId: "npmrc-ro", nodeJSInstallationName: "v22") {
195+
sh "pnpm build"
196+
sh "pnpm release --env=master"
197+
}
198+
}
199+
}
200+
201+
stage("Scan") {
202+
when {
203+
anyOf {
204+
branch pattern: "develop"
205+
branch pattern: "staging"
206+
branch pattern: "master"
207+
}
208+
}
209+
steps {
210+
pulsarBlackduck(bdApplicationId: "cloud-manager", buildType: "FRONTEND")
211+
pulsarSonar(jobType: "FREESTYLE", projectName: "cloud-manager", customSrc: true)
212+
}
213+
}
214+
}
215+
216+
post {
217+
always {
218+
junit testResults: 'reports/vitest-junit*.xml', allowEmptyResults: true
219+
}
220+
}
221+
}

acc/publish.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import fs from "fs";
2+
import path from "path";
3+
import { execSync } from "child_process";
4+
import { fileURLToPath } from "url";
5+
6+
const args = process.argv.slice(2);
7+
const envFlag = args.find(arg => arg.startsWith("--env="));
8+
const env = envFlag ? envFlag.split("=")[1] : '';
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
13+
const pathToPackage = path.join(
14+
__dirname,
15+
"../packages/manager/package.json",
16+
);
17+
const file = fs.readFileSync(pathToPackage, "utf-8");
18+
const pkg = JSON.parse(file);
19+
20+
const gitHash = execSync("git rev-parse --short HEAD", {
21+
encoding: "utf8",
22+
}).trim();
23+
const currentDate = execSync("date +%Y%m%dT%H%M%S", {
24+
encoding: "utf8",
25+
}).trim();
26+
27+
// uses a variable that we know exists on jenkins: https://wiki.jenkins.io/display/JENKINS/Git+Plugin
28+
const branch = (process.env.GIT_BRANCH || "").trim();
29+
const isDev = branch === "develop";
30+
const isStage = branch === "staging";
31+
const isProd = branch === "master";
32+
33+
if (isDev || isStage) {
34+
console.log("Publishing develop:", pkg.version);
35+
pkg.version = `${pkg.version.split("-")[0]}-${env}-${currentDate}-${gitHash}`;
36+
fs.writeFileSync(pathToPackage, JSON.stringify(pkg, null, 2));
37+
execSync("pnpm publish --no-git-checks", {
38+
cwd: path.join(__dirname, "../packages/manager"),
39+
stdio: "inherit",
40+
});
41+
} else if (isProd) {
42+
console.log("Publishing master:", pkg.version);
43+
execSync("pnpm publish --no-git-checks", {
44+
cwd: path.join(__dirname, "../packages/manager"),
45+
stdio: "inherit",
46+
});
47+
} else {
48+
console.log("On branch:", branch, ", skipping publish");
49+
}

0 commit comments

Comments
 (0)