Discord Script

Discord Script usage

Usage:

  • Copy the script at the root of your project (as send.sh)
  • Define a global variable for WEBHOOK_URL
  • Create according jobs for notifications
  • Modify/Create rules for execution of each notification job

Example notification stage

stages:
  - notification
success_notification:
  stage: notification
  script:
    - chmod +x send.sh
    - ./send.sh success $WEBHOOK_URL
  when: on_success
failure_notification:
  stage: notification
  script:
    - chmod +x send.sh
    - ./send.sh failure $WEBHOOK_URL
  when: on_failure

Discord Script to be used in pipeline

[Read More]

Dokku

Dokku and mi-git usage

Deployment

.gitlab-ci.yml (extract)

# Name of the job
deploy-job:
  # Stage of the job execution 
  stage: deploy
  # Image to use for job. Here we use the officila dokku image,
  # https://dokku.com/docs/deployment/continuous-integration/gitlab-ci/
  image: dokku/ci-docker-image:0.15.1
  # Setting some variables, local to the job
  variables:
    # We don't need history, just the last version
    GIT_DEPTH: 0
    # The name of our application, here we use something for our preprod
    # It will result in https://$DOKKU_APP_NAME.dokku.tecture.de as URL
    DOKKU_APP_NAME: geisel-spring-app-staging
  # Restrict the job to dev branch
  only:
    - dev
  # The script of the job. Here we deploy
  script: 
    - dokku-deploy

system.properties (needed at the application root to define the right java version)

[Read More]