Hello World
Now you have created an account, you can get started with the basics of builds by getting a project to print Hello World.
Creating our git repo
Before you can create a project, you need to create a code repository that will form the code base of the project:
- Create a new folder called
.bbx
in a Github code repository. - Make a
config.yaml
file and copy in the following code:
runners:
example-runner:
image: ubuntu-generic
jobs:
hello-world:
runner: example-runner
steps:
- run:
name: Say Hello World
command: echo "Hello World"
workflows:
hello-world-workflow:
jobs:
- hello-world
Create your first project
Now you have created your code repository, it is time to link it to your first project. In your BeetleboxCI account, you will be greeted by the following screen:
To make your first project please perform the following steps:
- Click 'Add your first project'
- In the following screen, fill in the following:
- Project Name: hello-world
- Git organisation name: <The name of your git account or organisation name>
- Git repo name: <the name of your git repo>
- After clicking to the next screen you will be presented with the information needed to link your github repo with the project. In your Github Repository go to settings and then to webhooks. On the webhooks page click 'Add webhook.'
- Fill in the following information:
- Copy the provided payload URL in.
- Change content type
- Copy the provided secret in.
- Once finished click 'Add webhook.'
- If the webhook has succeeded, the webhook should have a green tick next to it.
- Now that the webhook has succeeded, we need to setup the deploy key. In settings, go to the Deploy keys page and click 'Add deploy key.'
- Give a title to the deploy key and copy in the provided key.
- In BeetleboxCI, head back to Projects and you will see our 'hello-world' project in the
Idle
.
Triggering the project
To trigger the build, a commit to the code needs to occur. To do this, you can perform the following steps:
- In the git repo change the line
command: echo "Hello World"
tocommand: echo "Hello World!"
- Commit the code change.
- This will trigger the build process. Once this is complete, you will see a green pass tag next to your project.
Viewing our output
- You can also check our logs to make sure the output is correct. To do this, click on the project name
hello-world
.
- In this page you will be able to view the workflows of the
hello-world
project. 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 project!