Miguel Palhas / @naps62

git push
<do stuff>

Not everything is a commit


  git checkout \
    -b release-2020-02-10
workflows:
  deploy:
    jobs:
      - tests:
         ...
         
      - deploy:
         only:
           - /^release-.*/
           - master

CircleCI Config

git push
deploy

Wait... So only
developers can deploy??

workflows:
  deploy:
    jobs:
      - approval_step
          type: approval
         
      - deploy:
         requires:
           - approval_step

@ Utrust

  • Multiple live environments:
     
    • Development
       
    • Staging/QA
       
    • Sandbox/Production

Deployed ASAP

~weekly

~weekly'ish

github.repos.createDeployment({
  owner: "utrustdev",
  repo: "platform",
  ref: "091a52bf",
  environment: "development"
})
name: Github Action Example

on:
  push:
    branches:
      - master

jobs:
  ...

Triggers

name: Github Action Example

on:
  push:
  
  pull_request:
    types: [opened, synchronize]
    
  issue_comment:
    types: [created]

jobs:
  ...

Triggers

name: Github Action Example

jobs:
  test:
    runs-on: ubuntu-latest
    container: node:9.11.2
    
    steps:
      - name: Hello
        run: echo "Hello World"

Commands

name: Deploy

jobs:
  test:
    steps:
      - name: Checkout
        run: actions/checkout@v1

Reusable Actions

name: Deploy

on: [deployment]

jobs:
  test:
    steps:
      - name: Checkout
        run: actions/checkout@v1
        with:
          ref: ${{ github.event.deployment.ref }}

Reusable Actions



    steps:
      - name: Trigger Deploy
        uses: actions/github-script@0.3.0
        with:
          script: |
            const x = 1;
            console.log("wow, javascript!")
            await github.repos.createDeployment({
              # ...
            })

github-script

Miguel Palhas / @naps62

ENEI 2020 - Continuous Stuff

By Miguel Palhas

ENEI 2020 - Continuous Stuff

  • 291