mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-05-05 10:05:16 +02:00
1a567be793
- Copy code/image/config files across all modules - Translate brand-voice and code-review templates - Translate CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, STYLE_GUIDE - Copy CHANGELOG as-is (technical log) Ref: luongnv89/claude-howto#63
35 lines
789 B
JavaScript
35 lines
789 B
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Post-deployment hook
|
|
* Runs after deployment completes
|
|
*/
|
|
|
|
async function postDeploy() {
|
|
console.log('Running post-deployment tasks...');
|
|
|
|
const { execSync } = require('child_process');
|
|
|
|
// Wait for pods to be ready
|
|
console.log('Waiting for pods to be ready...');
|
|
try {
|
|
execSync('kubectl wait --for=condition=ready pod -l app=myapp --timeout=300s', {
|
|
stdio: 'inherit'
|
|
});
|
|
} catch (error) {
|
|
console.error('❌ Pods failed to become ready');
|
|
process.exit(1);
|
|
}
|
|
|
|
// Run smoke tests
|
|
console.log('Running smoke tests...');
|
|
// Add your smoke test commands here
|
|
|
|
console.log('✅ Post-deployment tasks complete');
|
|
}
|
|
|
|
postDeploy().catch(error => {
|
|
console.error('Post-deploy hook failed:', error);
|
|
process.exit(1);
|
|
});
|