# Features 
- Build environment variables for NodeJS builds
- Initial monorepo support (more tests needed!)

# Fixes
- Fix wrong redirects
- Logout fix for the session manager
This commit is contained in:
Andras Bacsai
2021-07-16 23:42:14 +02:00
committed by GitHub
parent 2d0f22b379
commit b4c836afbd
33 changed files with 1272 additions and 2194 deletions

View File

@@ -5,7 +5,7 @@ import { deleteSameDeployments, purgeImagesContainers } from './cleanup';
import yaml from 'js-yaml';
import { delay, execShellAsync } from '../common';
export default async function (configuration, imageChanged) {
export default async function (configuration, nextStep) {
const generateEnvs = {};
for (const secret of configuration.publish.secrets) {
generateEnvs[secret.name] = secret.value;
@@ -56,23 +56,25 @@ export default async function (configuration, imageChanged) {
};
await saveAppLog('### Publishing.', configuration);
await fs.writeFile(`${configuration.general.workdir}/stack.yml`, yaml.dump(stack));
if (imageChanged) {
if (nextStep === 2) {
// console.log('image changed')
await execShellAsync(
`docker service update --image ${containerName}:${containerTag} ${containerName}_${containerName}`
);
} else {
// console.log('new deployment or force deployment or config changed')
await deleteSameDeployments(configuration);
// if (originalDomain !== configuration.publish.domain) {
// await deleteSameDeployments(configuration, originalDomain);
// } else {
// await deleteSameDeployments(configuration);
// }
// await deleteSameDeployments(configuration);
await execShellAsync(
`cat ${configuration.general.workdir}/stack.yml | docker stack deploy --prune -c - ${containerName}`
);
}
async function purgeImagesAsync(found) {
await delay(10000);
await purgeImagesContainers(found);
}
//purgeImagesAsync(configuration);
await saveAppLog('### Published done!', configuration);
}