kube-workflow
Advanced tools
Comparing version 1.1.0 to 1.1.2
@@ -56,2 +56,18 @@ const os = require("os") | ||
logger.debug(`Add symlinks kube-workflow chart`) | ||
if (!(await fs.pathExists(`${KUBEWORKFLOW_PATH}/charts/kube-workflow/charts`))) { | ||
const getDirectories = require("./utils/getDirectories") | ||
const charts = await getDirectories(`${KUBEWORKFLOW_PATH}/charts`) | ||
await fs.ensureDir(`${KUBEWORKFLOW_PATH}/charts/kube-workflow/charts`) | ||
for (const chartName of charts) { | ||
if (chartName === "kube-workflow") { | ||
continue | ||
} | ||
await fs.symlink( | ||
`../../${chartName}`, | ||
`${KUBEWORKFLOW_PATH}/charts/kube-workflow/charts/${chartName}` | ||
) | ||
} | ||
} | ||
await fs.ensureDir(KWBUILD_PATH) | ||
@@ -110,8 +126,11 @@ | ||
} | ||
logger.debug(`Import template in kube-workflow chart`) | ||
if (await fs.pathExists(`${KWBUILD_PATH}/templates`)) { | ||
logger.debug(`Copy templates to kube-workflow chart`) | ||
await fs.copy(`${KWBUILD_PATH}/templates`, `${KWBUILD_PATH}/charts/kube-workflow/templates`) | ||
await fs.copy( | ||
`${KWBUILD_PATH}/templates`, | ||
`${KWBUILD_PATH}/charts/kube-workflow/templates` | ||
) | ||
} | ||
if (COMPONENTS) { | ||
@@ -118,0 +137,0 @@ logger.debug(`Enable only components: "${COMPONENTS}"`) |
@@ -9,3 +9,5 @@ const fs = require("fs-extra") | ||
const chart = yaml.load( | ||
await fs.readFile(`${rootDir}/charts/kube-workflow/Chart.yaml`, { encoding: "utf-8" }) | ||
await fs.readFile(`${rootDir}/charts/kube-workflow/Chart.yaml`, { | ||
encoding: "utf-8", | ||
}) | ||
) | ||
@@ -33,3 +35,6 @@ | ||
} | ||
await fs.writeFile(`${rootDir}/charts/kube-workflow/Chart.yaml`, yaml.dump(chart)) | ||
await fs.writeFile( | ||
`${rootDir}/charts/kube-workflow/Chart.yaml`, | ||
yaml.dump(chart) | ||
) | ||
@@ -36,0 +41,0 @@ for (const { name, alias } of dependencies) { |
@@ -18,3 +18,3 @@ const { spawn } = require("child_process") | ||
child.stderr.on("data", (data) => { | ||
if (data.includes("found symbolic link")){ | ||
if (data.includes("found symbolic link")) { | ||
return | ||
@@ -21,0 +21,0 @@ } |
@@ -71,6 +71,6 @@ #!/usr/bin/env node | ||
const theme = themeFromJson({ | ||
"keyword": "blue", | ||
"built_in": ["cyan", "dim"], | ||
"string": "green", | ||
"default": "gray" | ||
keyword: "blue", | ||
built_in: ["cyan", "dim"], | ||
string: "green", | ||
default: "gray", | ||
}) | ||
@@ -77,0 +77,0 @@ manifests = highlight(manifests, { |
@@ -5,2 +5,11 @@ # Changelog | ||
### [1.1.2](https://github.com/SocialGouv/kube-workflow/compare/v1.1.1...v1.1.2) (2022-03-20) | ||
### Bug Fixes | ||
* symlink ([89198e9](https://github.com/SocialGouv/kube-workflow/commit/89198e9ddc11f14f4c47fb3e864116b99d729094)) | ||
### [1.1.1](https://github.com/SocialGouv/kube-workflow/compare/v1.1.0...v1.1.1) (2022-03-20) | ||
## [1.1.0](https://github.com/SocialGouv/kube-workflow/compare/v1.0.4...v1.1.0) (2022-03-20) | ||
@@ -7,0 +16,0 @@ |
{ | ||
"name": "kube-workflow", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"repository": "git@github.com:SocialGouv/kube-workflow.git", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -10,7 +10,3 @@ /* eslint-disable no-undef */ | ||
const getDirectories = (source) => | ||
fs | ||
.readdirSync(source, { withFileTypes: true }) | ||
.filter((dirent) => dirent.isDirectory() || dirent.isSymbolicLink()) | ||
.map((dirent) => dirent.name) | ||
const getDirectoriesSync = require("../action/build/utils/getDirectoriesSync") | ||
@@ -20,3 +16,3 @@ const rootPath = path.resolve(`${__dirname}/..`) | ||
const samplesDir = `${__dirname}/samples` | ||
const testdirs = getDirectories(samplesDir) | ||
const testdirs = getDirectoriesSync(samplesDir) | ||
@@ -47,9 +43,2 @@ const defaultEnv = { | ||
const testdirPath = `${samplesDir}/${testdir}` | ||
const envFile = `${testdirPath}/.env` | ||
if (fs.pathExistsSync(envFile)) { | ||
const dotenvConfig = dotenv.parse( | ||
fs.readFileSync(envFile, { encoding: "utf-8" }) | ||
) | ||
Object.assign(env, dotenvConfig) | ||
} | ||
const env = { | ||
@@ -65,2 +54,9 @@ ...process.env, | ||
} | ||
const envFile = `${testdirPath}/.env` | ||
if (fs.pathExistsSync(envFile)) { | ||
const dotenvConfig = dotenv.parse( | ||
fs.readFileSync(envFile, { encoding: "utf-8" }) | ||
) | ||
Object.assign(env, dotenvConfig) | ||
} | ||
const output = await builder(env) | ||
@@ -70,2 +66,2 @@ expect(output).toMatchSpecificSnapshot( | ||
) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
591839
139
26