AllSpice CI/CD Actions Quickstart
    • PDF

    AllSpice CI/CD Actions Quickstart

    • PDF

    Article summary

    ""

    CI/CD Actions quickstart

    If you require more help, please don’t hesistate to reach out to us at support@allspice.io.

    Sign up for Actions

    Currently in private beta. Talk to one of our friendly engineers to get early access to Actions for your team.

    Enable actions in your repository

    Enable actions by visiting your repository->🔧Settings, and clicking [X] Enable Repository Actions

    image.png

    Scroll down to search (ctrl+f) for "Actions"

    Ensure Enable Repository Actions is checked

    image.png

    enable actions in your repository.gif

    Actions are only for organization repos
    Actions will not currently work on a personal repositories during this phase of the beta. You must use a repository owned by an organization.

    Create workflow file

    Actions are defined in workflow.yml files

    Create a file in your repo .allspice/workflows/hello-world.yml with the following text

    name: Workflow-hello-world
    
    on: 
      push:
      issues:
        # Trigger on issue open, close, or reopen
        types: [opened, closed, reopened]
    
    jobs:
      Job-Hello-World:
        runs-on: ubuntu-latest
        steps:
          - name: "Print Hello World 🔎" 
            run: echo "Hello World"    

    Select repository→Add File→New File

    AllSpice demo file tab, at the bottom the add file drop-down menu is expanded. "New file" within the menu is circled in red along with the menu title, "add file".

    Name the file .allspice/workflows/hello-world.yml

    Note: you must put workflow files in .allspice/workflows/ folder

    Paste the code from above and commit the changes

    AllSpice demo in the new file tab in a repository. Code from above the image is pasted as the 18th line of code. Below the code is a commit changes section. At the very bottom there is a commit changes button in blue, and a cancel button in red.

    Note: This workflow specifies that actions will trigger on push or issue open/close

    Trigger your action

    The example above should trigger an action as soon as you commit the files. To trigger this action again do one of the following:

    • Push changes to the repo

    • Open an issue

    • Close an issue

    View Actions results

    Visit the Actions tab and see the actions result

    AllSpice demos, actions tab open in a repository. Actions tab in circled in red.

    Click on the workflow to see the results

    AllSpice demo, actions tab is opened in a repsitory. An option to add workflow is in the tab, which is also circled.

    Click on your job step to see Hello World

    AllSpice actions demo with action tab opened. To the left there is text that states "generalize server URL to current server with a green checkmark to its left. Underneath that is text stating "job-hello-world" with a green checkmark to its left. To the right of that is a gif in dark mode titled job-hello-world. Directly underneath the title it says success. There are 3 drop-down menus in the gif that are expanded and closed, which are "set up job", "print hello world", and "complete job".

    If something goes wrong, let’s troubleshoot!

    Next

    Hello world demos - line-by-line explanations of the workflow file.


    Was this article helpful?