mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
BREAKING (potentially) - Bump docker version (Ubuntu 22.04 LTS) (#556)
* fix: resolution errors and vulnerability * feat: bump (major) docker image rolling tag * chore: bump major version * fix: up workflow node to lts * fix: conventions
This commit is contained in:
parent
ff551fe06d
commit
a073719c29
@ -1,11 +1,22 @@
|
|||||||
{
|
{
|
||||||
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
|
"plugins": [
|
||||||
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"],
|
"jest",
|
||||||
|
"@typescript-eslint",
|
||||||
|
"prettier",
|
||||||
|
"unicorn"
|
||||||
|
],
|
||||||
|
"extends": [
|
||||||
|
"plugin:unicorn/recommended",
|
||||||
|
"plugin:github/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2020,
|
"ecmaVersion": 2020,
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"extraFileExtensions": [".mjs"],
|
"extraFileExtensions": [
|
||||||
|
".mjs"
|
||||||
|
],
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
"impliedStrict": true
|
"impliedStrict": true
|
||||||
},
|
},
|
||||||
@ -22,7 +33,10 @@
|
|||||||
// Namespaces or sometimes needed
|
// Namespaces or sometimes needed
|
||||||
"import/no-namespace": "off",
|
"import/no-namespace": "off",
|
||||||
// Properly format comments
|
// Properly format comments
|
||||||
"spaced-comment": ["error", "always"],
|
"spaced-comment": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
"lines-around-comment": [
|
"lines-around-comment": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
@ -38,14 +52,31 @@
|
|||||||
// Mandatory spacing
|
// Mandatory spacing
|
||||||
"padding-line-between-statements": [
|
"padding-line-between-statements": [
|
||||||
"error",
|
"error",
|
||||||
{ "blankLine": "always", "prev": "*", "next": "return" },
|
{
|
||||||
{ "blankLine": "always", "prev": "directive", "next": "*" },
|
"blankLine": "always",
|
||||||
{ "blankLine": "any", "prev": "directive", "next": "directive" }
|
"prev": "*",
|
||||||
|
"next": "return"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"blankLine": "always",
|
||||||
|
"prev": "directive",
|
||||||
|
"next": "*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"blankLine": "any",
|
||||||
|
"prev": "directive",
|
||||||
|
"next": "directive"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
// Enforce camelCase
|
// Enforce camelCase
|
||||||
"camelcase": "error",
|
"camelcase": "error",
|
||||||
// Allow forOfStatements
|
// Allow forOfStatements
|
||||||
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
|
"no-restricted-syntax": [
|
||||||
|
"error",
|
||||||
|
"ForInStatement",
|
||||||
|
"LabeledStatement",
|
||||||
|
"WithStatement"
|
||||||
|
],
|
||||||
// Continue is viable in forOf loops in generators
|
// Continue is viable in forOf loops in generators
|
||||||
"no-continue": "off",
|
"no-continue": "off",
|
||||||
// From experience, named exports are almost always desired. I got tired of this rule
|
// From experience, named exports are almost always desired. I got tired of this rule
|
||||||
@ -53,8 +84,17 @@
|
|||||||
// Unused vars are useful to keep method signatures consistent and documented
|
// Unused vars are useful to keep method signatures consistent and documented
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
// For this project only use kebab-case
|
// For this project only use kebab-case
|
||||||
"unicorn/filename-case": ["error", { "cases": { "kebabCase": true } }],
|
"unicorn/filename-case": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"cases": {
|
||||||
|
"kebabCase": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
// Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
|
// Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
|
||||||
"unicorn/prefer-spread": "off"
|
"unicorn/prefer-spread": "off",
|
||||||
|
// Temp disable to prevent mixing changes with other PRs
|
||||||
|
"i18n-text/no-en": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
.github/workflows/cleanup.yml
vendored
2
.github/workflows/cleanup.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
|||||||
lfs: true
|
lfs: true
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: '18'
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn run cli --help
|
- run: yarn run cli --help
|
||||||
env:
|
env:
|
||||||
|
2
.github/workflows/integrity-check.yml
vendored
2
.github/workflows/integrity-check.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '18'
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- run: yarn test --coverage
|
- run: yarn test --coverage
|
||||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
BIN
dist/licenses.txt
generated
vendored
BIN
dist/licenses.txt
generated
vendored
Binary file not shown.
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "unity-builder",
|
"name": "unity-builder",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Build Unity projects for different platforms.",
|
"description": "Build Unity projects for different platforms.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"repository": "git@github.com:game-ci/unity-builder.git",
|
"repository": "git@github.com:game-ci/unity-builder.git",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"test-i-k8s": "cross-env cloudRunnerTests=true providerStrategy=k8s yarn test -i -t \"cloud runner\""
|
"test-i-k8s": "cross-env cloudRunnerTests=true providerStrategy=k8s yarn test -i -t \"cloud runner\""
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.x"
|
"node": ">=18.x"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^3.1.3",
|
"@actions/cache": "^3.1.3",
|
||||||
@ -45,7 +45,7 @@
|
|||||||
"semver": "^7.5.2",
|
"semver": "^7.5.2",
|
||||||
"unity-changeset": "^2.0.0",
|
"unity-changeset": "^2.0.0",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"yaml": "^1.10.2"
|
"yaml": "^2.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@evilmartians/lefthook": "^1.2.9",
|
"@evilmartians/lefthook": "^1.2.9",
|
||||||
@ -70,7 +70,11 @@
|
|||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"ts-node": "10.4.0",
|
"ts-node": "10.4.0",
|
||||||
"typescript": "4.1.3",
|
"typescript": "4.7.4",
|
||||||
"yarn-audit-fix": "^9.3.8"
|
"yarn-audit-fix": "^9.3.8"
|
||||||
|
},
|
||||||
|
"volta": {
|
||||||
|
"node": "20.5.1",
|
||||||
|
"yarn": "1.22.19"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import waitUntil from 'async-wait-until';
|
import { waitUntil } from 'async-wait-until';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as k8s from '@kubernetes/client-node';
|
import * as k8s from '@kubernetes/client-node';
|
||||||
import BuildParameters from '../../../build-parameters';
|
import BuildParameters from '../../../build-parameters';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { CoreV1Api, KubeConfig } from '@kubernetes/client-node';
|
import { CoreV1Api, KubeConfig } from '@kubernetes/client-node';
|
||||||
import CloudRunnerLogger from '../../services/core/cloud-runner-logger';
|
import CloudRunnerLogger from '../../services/core/cloud-runner-logger';
|
||||||
import waitUntil from 'async-wait-until';
|
import { waitUntil } from 'async-wait-until';
|
||||||
import { CloudRunnerSystem } from '../../services/core/cloud-runner-system';
|
import { CloudRunnerSystem } from '../../services/core/cloud-runner-system';
|
||||||
import CloudRunner from '../../cloud-runner';
|
import CloudRunner from '../../cloud-runner';
|
||||||
import KubernetesPods from './kubernetes-pods';
|
import KubernetesPods from './kubernetes-pods';
|
||||||
@ -10,6 +10,7 @@ class KubernetesTaskRunner {
|
|||||||
static lastReceivedTimestamp: number = 0;
|
static lastReceivedTimestamp: number = 0;
|
||||||
static readonly maxRetry: number = 3;
|
static readonly maxRetry: number = 3;
|
||||||
static lastReceivedMessage: string = ``;
|
static lastReceivedMessage: string = ``;
|
||||||
|
|
||||||
static async runTask(
|
static async runTask(
|
||||||
kubeConfig: KubeConfig,
|
kubeConfig: KubeConfig,
|
||||||
kubeClient: CoreV1Api,
|
kubeClient: CoreV1Api,
|
||||||
|
@ -49,10 +49,10 @@ describe('ImageTag', () => {
|
|||||||
const image = new ImageTag({ editorVersion: '2099.1.1111', targetPlatform: testImageParameters.targetPlatform });
|
const image = new ImageTag({ editorVersion: '2099.1.1111', targetPlatform: testImageParameters.targetPlatform });
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2099.1.1111-1`);
|
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2099.1.1111-2`);
|
||||||
break;
|
break;
|
||||||
case 'linux':
|
case 'linux':
|
||||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-1`);
|
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-2`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -71,10 +71,10 @@ describe('ImageTag', () => {
|
|||||||
|
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-webgl-1`);
|
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-webgl-2`);
|
||||||
break;
|
break;
|
||||||
case 'linux':
|
case 'linux':
|
||||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-1`);
|
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-2`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -84,10 +84,10 @@ describe('ImageTag', () => {
|
|||||||
|
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-1`);
|
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-2`);
|
||||||
break;
|
break;
|
||||||
case 'linux':
|
case 'linux':
|
||||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-1`);
|
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-2`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -33,7 +33,7 @@ class ImageTag {
|
|||||||
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(
|
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(
|
||||||
isCloudRunnerLocal ? process.platform : cloudRunnerBuilderPlatform,
|
isCloudRunnerLocal ? process.platform : cloudRunnerBuilderPlatform,
|
||||||
);
|
);
|
||||||
this.imageRollingVersion = 1; // Will automatically roll to the latest non-breaking version.
|
this.imageRollingVersion = 2; // Will automatically roll to the latest non-breaking version.
|
||||||
}
|
}
|
||||||
|
|
||||||
static get versionPattern(): RegExp {
|
static get versionPattern(): RegExp {
|
||||||
@ -165,4 +165,5 @@ class ImageTag {
|
|||||||
return `${image}:${tag}`; // '0' here represents the docker repo version
|
return `${image}:${tag}`; // '0' here represents the docker repo version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ImageTag;
|
export default ImageTag;
|
||||||
|
Loading…
Reference in New Issue
Block a user