Skip to content

Commit

Permalink
Inject modules into cekit venv (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
rigazilla authored Oct 3, 2024
1 parent 1859919 commit f881520
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,20 @@ const installPythonDependencies = () => {
);
};

const installRequiredPipPackages = () => {
core.info("Installing required PiP modules...");
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx install pip', {stdio: 'inherit'});
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx install wheel', {stdio: 'inherit'});
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx install odcs', {stdio: 'inherit'});
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx install --include-deps docker', {stdio: 'inherit'});
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx install docker_squash', {stdio: 'inherit'});
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx install behave', {stdio: 'inherit'});
const injectingRequiredPipPackages = () => {
core.info("Injecting required PiP modules...");
child_process.execSync('PIPX_BIN_DIR=/usr/local/bin pipx inject cekit pip wheel odcs docker docker_squash behave lxml', {stdio: 'inherit'});
};

const install = inputs => {
installPythonDependencies();
installRequiredPipPackages();
core.info('Installing CEKit...');
let cekitInstallCommand = 'PIPX_BIN_DIR=/usr/local/bin pipx install cekit';
if (inputs.version) {
cekitInstallCommand = `PIPX_BIN_DIR=/usr/local/bin pipx install cekit==${inputs.version}`;
}
child_process.execSync(cekitInstallCommand, {stdio: 'inherit'});
injectingRequiredPipPackages();
core.addPath('/home/runner/.local/bin');
const pythonVersion = child_process
.execSync(`python --version`)
Expand Down

0 comments on commit f881520

Please sign in to comment.