_about-me
//
professional-info
experience
adesso-2023.md
// Code snippet showcase:
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
name: Run
on: [push, pull_request]
jobs:
test-run:
name: Dependabot ${{ matrix.package_manager }}
runs-on: ubuntu-latest
strategy:
matrix:
package_manager: [bundler]
steps:
- uses: actions/checkout@v3
- name: Prepare environment variables
run: echo "IMAGE_NAME=dependabot/dependabot-script" >> $GITHUB_ENV
- name: Build Dockerfile
run: docker build -t "$IMAGE_NAME" -f Dockerfile .
- name: Run ${{ matrix.package_manager }} tests
run: |
docker run --rm \
--env "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" \
--env "PROJECT_PATH=${{ github.repository }}" \
--env "PACKAGE_MANAGER=${{ matrix.package_manager }}" \
"$IMAGE_NAME"
# Display name when the pipeline is running
name: 'Dependabot -- $(Date:yyyyMMdd)$(Rev:.r)'
# Disable CI trigger
trigger: none
# Schedules instead of triggers runs the job on interval not on trigger
schedules:
# daily at 2am GMT-7
- cron: '0 9 * * *'
# run even when there are no code changes
always: true
# run only on these branches
branches:
include:
- main
displayName: Daily
jobs:
- job: 'Dependabot'
pool:
# requires macos or ubuntu (windows is not supported)
vmImage: 'ubuntu-latest'
# Vars to be passed to the docker image
variables:
- name: DIRECTORY_PATH
value: /
- name: PACKAGE_MANAGER
value: pip
# On Azure DevOps this should be the: <Org>/<Project>/_git/<Repo_Name>
- name: PROJECT_PATH
value: Covered-CA/Data%20Team/_git/Python%20Intake%20Process%20App
# Who "Opened" the Pull request. Useful to assign to a service account named "Dependabot"
- name: PULL_REQUESTS_ASSIGNEE
value: 'Dependabot'
steps:
# Get the repo
- script: git clone https://github.com/dependabot/dependabot-script.git
displayName: Clone Dependabot config repo
# Build the docker image
- script: |
cd dependabot-script
docker build -t "dependabot/dependabot-script" -f Dockerfile .
displayName: Build Dependabot Image
# Pass your vars to the docker image and execute
# NOTE:
# You need to get a Person Access Token and to keep it {SECRET} use The [Variables] button in the
# Azure-Pipelines interface to create a Environmental Variable that the docker image can access but
# isn't in plain text. Same for the GitHub Access Token if your dependencies are only on GitHub
- script: |
docker run --rm -e AZURE_ACCESS_TOKEN='$(PAT)' \
-e GITHUB_ACCESS_TOKEN='$(GHPAT)' \
-e PACKAGE_MANAGER='$(PACKAGE_MANAGER)' \
-e PROJECT_PATH='$(PROJECT_PATH)' \
-e DIRECTORY_PATH='$(DIRECTORY_PATH)' \
-e PULL_REQUESTS_ASSIGNEE='$(PULL_REQUESTS_ASSIGNEE)' \
dependabot/dependabot-script
displayName: Run Dependabot
# GitLab CI configuration for Dependabot
build-image:
stage: build
script:
- docker build -t "dependabot/dependabot-script" -f Dockerfile .
.dependabot:
image: dependabot/dependabot-script
variables:
PACKAGE_MANAGER: $CI_JOB_NAME
script:
- bundle exec ruby ./generic-update-script.rb
only:
- schedules
bundler:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bbundler\b/
pip:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bpip\b/
npm_and_yarn:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /(\bnpm|yarn\b)/
maven:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bmaven\b/
gradle:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bgradle\b/
cargo:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bcargo\b/
hex:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bhex\b/
composer:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bcomposer\b/
nuget:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bnuget\b/
dep:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bdep\b/
go_modules:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bgo_modules\b/
elm:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\belm\b/
submodules:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bsubmodules\b/
docker:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bdocker\b/
terraform:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bterraform\b/
github_actions:
extends: .dependabot
only:
variables:
- $PACKAGE_MANAGER_SET =~ /\bgithub_actions\b/