forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 1
Test docker gcp ent 2 #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lourw
wants to merge
25
commits into
main
Choose a base branch
from
test-docker-gcp-ent-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
a2af7f4
add nx with dte
xiongemi 959985b
setup docker
xiongemi f8a6b19
chore(repo): add docker test
lourw 5e33a80
chore(repo): use local setup
lourw 5f96abe
chore(repo): add sleep
lourw 6b6feb9
chore(repo): change java install
lourw 9e47355
chore(repo): fix agent steps
lourw 643fbac
chore(repo): connect to gcs tester
lourw 880d7a6
chore(repo): use larger agent
lourw a98b2c9
chore(repo): remove sleep
lourw 968bc1e
Apply suggestions from code review
lourw 24a01bd
Update .github/workflows/build-pull-request.yml
lourw 49074d8
chore(repo): fix formatting
lourw 2141b5f
Update nx.json
lourw 67bd206
Update agents.yaml
lourw 086bd47
Update build.gradle
lourw fd884b2
Update build.gradle
lourw a53655c
Update agents.yaml
lourw cf3e615
Update agents.yaml
lourw 1ff886f
Update build.gradle
lourw b3c573a
Update .github/actions/build/action.yml
lourw 044aba8
Update nx.json
lourw 66f79e4
Apply suggestions from code review
lourw 82cdbae
Update build.gradle
lourw c107c76
Update nx.json
lourw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NX_BATCH_MODE=true | ||
NX_VERBOSE_LOGGING=true | ||
NX_CLOUD_VERBOSE_LOGGING=true | ||
NX_TUI=false | ||
CI=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
"use strict"; | ||
// This file should be committed to your repository! It wraps Nx and ensures | ||
// that your local installation matches nx.json. | ||
// See: https://nx.dev/recipes/installation/install-non-javascript for more info. | ||
|
||
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const cp = require('child_process'); | ||
const installationPath = path.join(__dirname, 'installation', 'package.json'); | ||
function matchesCurrentNxInstall(currentInstallation, nxJsonInstallation) { | ||
if (!currentInstallation.devDependencies || | ||
!Object.keys(currentInstallation.devDependencies).length) { | ||
return false; | ||
} | ||
try { | ||
if (currentInstallation.devDependencies['nx'] !== | ||
nxJsonInstallation.version || | ||
require(path.join(path.dirname(installationPath), 'node_modules', 'nx', 'package.json')).version !== nxJsonInstallation.version) { | ||
return false; | ||
} | ||
for (const [plugin, desiredVersion] of Object.entries(nxJsonInstallation.plugins || {})) { | ||
if (currentInstallation.devDependencies[plugin] !== desiredVersion) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
} | ||
function ensureDir(p) { | ||
if (!fs.existsSync(p)) { | ||
fs.mkdirSync(p, { recursive: true }); | ||
} | ||
} | ||
function getCurrentInstallation() { | ||
try { | ||
return require(installationPath); | ||
} | ||
catch { | ||
return { | ||
name: 'nx-installation', | ||
version: '0.0.0', | ||
devDependencies: {}, | ||
}; | ||
} | ||
} | ||
function performInstallation(currentInstallation, nxJson) { | ||
fs.writeFileSync(installationPath, JSON.stringify({ | ||
name: 'nx-installation', | ||
devDependencies: { | ||
nx: nxJson.installation.version, | ||
...nxJson.installation.plugins, | ||
}, | ||
})); | ||
try { | ||
cp.execSync('npm i', { | ||
cwd: path.dirname(installationPath), | ||
stdio: 'inherit', | ||
windowsHide: false, | ||
}); | ||
} | ||
catch (e) { | ||
// revert possible changes to the current installation | ||
fs.writeFileSync(installationPath, JSON.stringify(currentInstallation)); | ||
// rethrow | ||
throw e; | ||
} | ||
} | ||
function ensureUpToDateInstallation() { | ||
const nxJsonPath = path.join(__dirname, '..', 'nx.json'); | ||
let nxJson; | ||
try { | ||
nxJson = require(nxJsonPath); | ||
if (!nxJson.installation) { | ||
console.error('[NX]: The "installation" entry in the "nx.json" file is required when running the nx wrapper. See https://nx.dev/recipes/installation/install-non-javascript'); | ||
process.exit(1); | ||
} | ||
} | ||
catch { | ||
console.error('[NX]: The "nx.json" file is required when running the nx wrapper. See https://nx.dev/recipes/installation/install-non-javascript'); | ||
process.exit(1); | ||
} | ||
try { | ||
ensureDir(path.join(__dirname, 'installation')); | ||
const currentInstallation = getCurrentInstallation(); | ||
if (!matchesCurrentNxInstall(currentInstallation, nxJson.installation)) { | ||
performInstallation(currentInstallation, nxJson); | ||
} | ||
} | ||
catch (e) { | ||
const messageLines = [ | ||
'[NX]: Nx wrapper failed to synchronize installation.', | ||
]; | ||
if (e instanceof Error) { | ||
messageLines.push(''); | ||
messageLines.push(e.message); | ||
messageLines.push(e.stack); | ||
} | ||
else { | ||
messageLines.push(e.toString()); | ||
} | ||
console.error(messageLines.join('\n')); | ||
process.exit(1); | ||
} | ||
} | ||
if (!process.env.NX_WRAPPER_SKIP_INSTALL) { | ||
ensureUpToDateInstallation(); | ||
} | ||
|
||
require('./installation/node_modules/nx/bin/nx'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
launch-templates: | ||
linux-extra-large-plus-jvm: | ||
env: | ||
NX_CLOUD_FORCE_USE_EXECUTE_TASKS_V3: "false" | ||
SERVICES_HOST: "" | ||
LANG: C.UTF-8 | ||
resource-class: 'docker_linux_amd64/extra_large' | ||
image: 'ubuntu22.04-node20.11-v10' | ||
lourw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
init-steps: | ||
- name: java version | ||
script: java -version | ||
|
||
- name: Checkout | ||
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml' | ||
|
||
- name: Setup Java 21 | ||
script: | | ||
sudo apt update | ||
sudo apt install -y openjdk-21-jdk openssh-server neovim lynx fzf | ||
java -version | ||
|
||
- name: Setup gradle | ||
script: ./gradlew wrapper && ./gradlew --stop && ./gradlew clean | ||
|
||
- name: Restore Node Modules Cache | ||
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml' | ||
inputs: | ||
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml' | ||
paths: 'node_modules' | ||
base-branch: 'main' | ||
- name: Install Node Modules | ||
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
distribute-on: | ||
default: 5 linux-extra-large-plus-jvm | ||
|
||
assignment-rules: | ||
- targets: | ||
- 'ciIntTest*' | ||
run-on: | ||
- agent: linux-extra-large-plus-jvm | ||
parallelism: 1 | ||
|
||
- projects: | ||
- "*" | ||
run-on: | ||
- agent: linux-extra-large-plus-jvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
command -v node >/dev/null 2>&1 || { echo >&2 "Nx requires NodeJS to be available. To install NodeJS and NPM, see: https://nodejs.org/en/download/ ."; exit 1; } | ||
command -v npm >/dev/null 2>&1 || { echo >&2 "Nx requires npm to be available. To install NodeJS and NPM, see: https://nodejs.org/en/download/ ."; exit 1; } | ||
path_to_root=$(dirname $BASH_SOURCE) | ||
node $path_to_root/.nx/nxw.js $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@ECHO OFF | ||
SETLOCAL | ||
SET path_to_root=%~dp0 | ||
WHERE node >nul 2>nul | ||
IF %ERRORLEVEL% NEQ 0 (ECHO Nx requires NodeJS to be available. To install NodeJS and NPM, see: https://nodejs.org/en/download/ . & GOTO exit) | ||
WHERE npm >nul 2>nul | ||
IF %ERRORLEVEL% NEQ 0 (ECHO Nx requires npm to be available. To install NodeJS and NPM, see: https://nodejs.org/en/download/ . & GOTO exit) | ||
node %path_to_root%\.nx\nxw.js %* | ||
:exit | ||
cmd /c exit /b %ERRORLEVEL% |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.