0
0
Jenkinsdevops~20 mins

Jenkins to GitHub Actions path - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Jenkins to GitHub Actions Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Key difference in pipeline triggers between Jenkins and GitHub Actions

Which statement best describes how Jenkins and GitHub Actions trigger pipelines?

AJenkins pipelines trigger only manually, GitHub Actions triggers only on schedule.
BJenkins and GitHub Actions both require external cron jobs to trigger pipelines.
CJenkins triggers pipelines only on push events, GitHub Actions triggers only on pull requests.
DJenkins uses webhooks configured in GitHub, while GitHub Actions triggers are defined inside YAML files in the repository.
Attempts:
2 left
💡 Hint

Think about where the trigger configuration lives in each tool.

💻 Command Output
intermediate
1:30remaining
Output of GitHub Actions workflow run status command

What is the output of this GitHub CLI command after a successful workflow run?

Jenkins
gh run view 12345 --json status --jq .status
A"success"
B"completed"
C"passed"
D"done"
Attempts:
2 left
💡 Hint

Check the GitHub CLI documentation for the status field values.

Configuration
advanced
2:30remaining
Correct GitHub Actions YAML syntax for a build job

Which YAML snippet correctly defines a GitHub Actions job that runs on Ubuntu latest and executes a build script?

A
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - script: ./build.sh
B
jobs:
  build:
    runs_on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: ./build.sh
C
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: ./build.sh
D
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - checkout: actions/checkout@v3
      - run: ./build.sh
Attempts:
2 left
💡 Hint

Look carefully at the keys and syntax for steps in GitHub Actions.

Troubleshoot
advanced
2:00remaining
Reason for GitHub Actions workflow not triggering on push

A GitHub Actions workflow does not start when pushing to the main branch. The workflow YAML has:

on:
  push:
    branches:
      - master

What is the most likely cause?

AThe branch name in the YAML is 'master' but the repository uses 'main'.
BGitHub Actions workflows cannot trigger on push events.
CThe workflow file must be named 'main.yml' to trigger on main branch.
DPush events require a personal access token to trigger workflows.
Attempts:
2 left
💡 Hint

Check the branch names carefully.

🔀 Workflow
expert
3:00remaining
Order of steps to migrate Jenkins pipeline to GitHub Actions

Arrange the steps in the correct order to migrate a Jenkins pipeline to GitHub Actions.

A1,2,3,4
B2,1,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint

Think about logical migration steps from analysis to cleanup.