Quick Start — Hello World Example
Now you have installed BeetleboxCI, you can get started with the basics of BeetleboxCI by getting a pipeline to print Hello World.
Git Repository
Beetlebox provides an example repository for getting started here Beetlebox Hello World Tutorial.
It contains a folder called .bbx
, which has a config.yaml
file inside.
This file contains the following code:
runners:
example-runner:
image: ubuntu
jobs:
hello-world:
resource_spec: micro
runner: example-runner
current_working_directory: ~/
output:
artifact:
- hello.txt
steps:
- run:
name: Say Hello World
command: echo "Hello World"
- run:
name: Text Hello World
command: echo "Hello World" > hello.txt
workflows:
hello-world-workflow:
jobs:
- hello-world
As a summary, this code tells BeetleboxCI to run a job that prints "Hello World" to both a terminal and a text file. Further on in the documentation, the exact details of these how the config.yaml file works is discussed in detail.
Create your first pipeline
Now that you have a code repository to work with, it is time to create a pipeline using it. In your BeetleboxCI application, you will be greeted by the following screen:
To make your first pipeline please perform the following steps:
- Click 'Create pipeline'
- In the following screen, fill in the following:
Pipeline Name: hello-world
Repository URL:
https://github.com/beetleboxorg/hello-world-tutorial
As this is a public repository, you do not need to specify any authentication information and these fields can be left blank.
- Click proceed. You will now be redirected to the pipelines page where you can see the pipeline that you just created.
- On the pipelines page, click hello-world so see the workflows in this pipeline
- Click the run (play button symbol) button on the top right hand corner of the workflows list. The pipeline will begin running and it should complete in under a minute.
- You will see "Passed" on the hello-world pipeline once it has completed.
Viewing our output
- You can also check our logs to make sure the output is correct. To do this, click on the pipeline name
hello-world
.
- In this page you will be able to view the workflows of the
hello-world
pipeline. There will be a single workflow namedhello-world-workflow
, which will take us to the jobs that make up that workflow.
- In the jobs page, you may view the jobs that are used in the
hello-world-workflow
. Click on the job namehello-world
- From here, you will be able to view details about the job, including an overview of its status as well as logs and artifacts generated by this job.
- By checking out the
Log
, you can see the generated logs by the job. In this case, you will be able to see that the job has successfully outputted theHello World
message.
Congratulations you have run your first pipeline!