0
0
Node.jsframework~20 mins

CI/CD pipeline basics in Node.js - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
CI/CD Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:00remaining
Output of a simple CI pipeline step
Consider a CI pipeline step that runs the following Node.js command to check the version of Node.js installed. What will be the output?
Node.js
node --version
Av20.0.0
BSyntaxError: Unexpected token
CNode.js version not found
DError: command not found
Attempts:
2 left
💡 Hint
The command 'node --version' prints the installed Node.js version.
🧠 Conceptual
intermediate
1:30remaining
Purpose of a build stage in CI/CD
What is the main purpose of the build stage in a CI/CD pipeline?
ATo compile source code and create executable artifacts
BTo deploy the application to production servers
CTo monitor application performance in production
DTo write documentation for the project
Attempts:
2 left
💡 Hint
Think about what happens before testing and deployment.
Troubleshoot
advanced
2:00remaining
Troubleshooting a failing test step in CI pipeline
A CI pipeline runs tests using the command 'npm test' but fails with the error 'Cannot find module'. What is the most likely cause?
AThe pipeline has no internet access
BThe test files have syntax errors
CThe Node.js version is too new
DThe dependencies were not installed before running tests
Attempts:
2 left
💡 Hint
Think about what is needed before running tests in Node.js projects.
🔀 Workflow
advanced
1:30remaining
Correct order of CI/CD pipeline stages
Arrange the following CI/CD pipeline stages in the correct order from start to finish.
A2,4,3,1
B4,2,3,1
C4,3,2,1
D3,2,4,1
Attempts:
2 left
💡 Hint
Think about what happens first when a developer works, then what happens before deployment.
Best Practice
expert
2:00remaining
Best practice for handling secrets in CI/CD pipelines
Which option is the best practice for managing sensitive information like API keys in a CI/CD pipeline?
ASend secrets via email to the deployment server
BHardcode secrets directly in the source code
CStore secrets in environment variables managed by the CI/CD system
DCommit secrets to the public repository for easy access
Attempts:
2 left
💡 Hint
Think about security and automation in pipelines.