Skip to main content

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:

  1. Create a new folder called .bbx in a Github code repository.
  2. 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: helloworldsplashscreen To make your first project please perform the following steps:

  1. Click 'Add your first project'
  2. 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>
  1. 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.'
  2. Fill in the following information:
    1. Copy the provided payload URL in.
    2. Change content type
    3. Copy the provided secret in.
  3. Once finished click 'Add webhook.'
  4. If the webhook has succeeded, the webhook should have a green tick next to it.
  5. 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.'
  6. Give a title to the deploy key and copy in the provided key.
  7. 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:

  1. In the git repo change the line command: echo "Hello World" to command: echo "Hello World!"
  2. Commit the code change.
  3. This will trigger the build process. Once this is complete, you will see a green pass tag next to your project.

jobsexample-1

Viewing our output#

  1. You can also check our logs to make sure the output is correct. To do this, click on the project name hello-world.

getting-started-check-1

  1. In this page you will be able to view the workflows of the hello-world project. There will be a single workflow named hello-world-workflow, which will take us to the jobs that make up that workflow.

getting-started-check-2

  1. In the jobs page, you may view the jobs that are used in the hello-world-workflow. Click on the job name hello-world

getting-started-check-3

  1. 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.

getting-started-check-4

  1. 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 the Hello World message.

getting-started-check-5

Congratulations you have run your first project!

What's next?#