doc_id
stringlengths 36
36
| metadata
dict | input
stringlengths 28
4.3k
| output
stringlengths 11
5.45k
|
---|---|---|---|
a057791e-21d8-48ac-9dbe-2a7a1cc6872f | {
"language": "YAML"
} | ```yaml
version: 2
jobs:
build:
branches:
only:
- master
working_directory: /var/tmp
docker:
- image: diegovalle/elcrimen-docker
steps:
- checkout
- run:
name: Build the website https://elcri.men
command: |
sudo -H -E bash -c "cp ansible/* /etc/ansible && cd /etc/ansible && echo $ANSIBLE_PASSWORD > password.txt && ansible-playbook -c local ssh.yml --vault-password-file=/etc/ansible/password.txt --extra-vars 'secrets=true' && cd /root/new.crimenmexico && git pull && make"
no_output_timeout: 2400
# - store_artifacts:
# path: /root/new.crimenmexico/db/crimenmexico.db
# destination: crimenmexico.db```
Add docker auth [Skip CI] | ```yaml
version: 2
jobs:
build:
branches:
only:
- master
working_directory: /var/tmp
docker:
- image: diegovalle/elcrimen-docker
auth:
username: diegovalle # can specify string literal values
password: $DOCKERHUB_PASSWORD # or project environment variable reference
steps:
- checkout
- run:
name: Build the website https://elcri.men
command: |
sudo -H -E bash -c "cp ansible/* /etc/ansible && cd /etc/ansible && echo $ANSIBLE_PASSWORD > password.txt && ansible-playbook -c local ssh.yml --vault-password-file=/etc/ansible/password.txt --extra-vars 'secrets=true' && cd /root/new.crimenmexico && git pull && make"
no_output_timeout: 2400
# - store_artifacts:
# path: /root/new.crimenmexico/db/crimenmexico.db
# destination: crimenmexico.db
``` |
76b8c133-a8de-438a-96f7-eb6c572f698a | {
"language": "YAML"
} | ```yaml
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:8.7
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
# run tests!
- run: yarn test
```
Add more circleCI jobs with various node versions | ```yaml
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
node8:
docker:
# specify the version you desire here
- image: circleci/node:8.7
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
# run tests!
- run: yarn test
node6:
docker:
- image: circleci/node:6.11.4
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: yarn test
node4:
docker:
- image: circleci/node:4.8.4
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: yarn test
workflows:
version: 2
build:
jobs:
- node4
- node6
- node8
``` |
4bc25a3c-9998-44a6-9b99-a6d916a6aecb | {
"language": "YAML"
} | ```yaml
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
general:
branches:
ignore:
- gh-pages
jobs:
test:
docker:
- image: circleci/node:8.9.4
steps:
- checkout
- run: npm install
- run: npm test```
Replace build with lint circle.ci dummy | ```yaml
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
general:
branches:
ignore:
- gh-pages
jobs:
test:
docker:
- image: circleci/node:8.9.4
steps:
- checkout
- run: npm install
- run: npm test
build:
docker:
- image: circleci/node:8.9.4
steps:
- checkout
- run: npm run lint
workflows:
version: 2
test_build:
jobs:
- build
- test``` |
60f90132-67ff-481a-8d97-6c4e9191c8a7 | {
"language": "YAML"
} | ```yaml
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:8u171-jdk
environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx512m -Dorg.gradle.daemon=false
TERM: dumb
TZ: /usr/share/zoneinfo/America/Los_Angeles
branches:
ignore:
- /rel\/.*/
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Run tests
command: ./gradlew check
- deploy:
name: Publish artifacts
command: |
if [ -z ${CI_PULL_REQUEST} ]; then
./gradlew publish
fi
- store_artifacts:
path: ~/project/build/reports/tests
- store_test_results:
path: ~/project/build/test-results/test
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
```
Update jdk11 image for CircleCi | ```yaml
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:11-jdk
environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx512m -Dorg.gradle.daemon=false
TERM: dumb
TZ: /usr/share/zoneinfo/America/Los_Angeles
branches:
ignore:
- /rel\/.*/
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Run tests
command: ./gradlew check
- deploy:
name: Publish artifacts
command: |
if [ -z ${CI_PULL_REQUEST} ]; then
./gradlew publish
fi
- store_artifacts:
path: ~/project/build/reports/tests
- store_test_results:
path: ~/project/build/test-results/test
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
``` |
776af395-c29a-424b-83c6-0bf937e35a19 | {
"language": "YAML"
} | ```yaml
fullnameOverride: "runner"
daemonSet: true
initContainers: {}
envFromSecret: {}
nodeSelector: {}
affinity: {}
tolerations: []
service:
annotations:
prometheus.io/scrape: "true"
volumes:
- name: runner-tmp-dir
emptyDir:
medium: Memory
sizeLimit: "64Mi"
- name: docker-socket
hostPath:
path: /var/run/docker.sock
type: File
containers:
- name: runner
securityContext:
readOnlyRootFilesystem: true
volumeMounts:
- name: runner-tmp-dir
mountPath: /tmp
readOnly: false
- mountPath: /var/run/docker.sock
name: docker-socket
resources:
requests:
cpu: 20m
memory: 128Mi
limits:
memory: 768Mi
livenessProbe:
path: /alive
readinessProbe:
path: /ready
env:
CYBER_DOJO_USE_CONTAINERD: "true"
CYBER_DOJO_PROMETHEUS: "true"
CYBER_DOJO_RUNNER_PORT: "4597"
# CYBER_DOJO_K8S_PORT: "19661"
```
Update hostPath - type value for "docke.socket" volume | ```yaml
fullnameOverride: "runner"
daemonSet: true
initContainers: {}
envFromSecret: {}
nodeSelector: {}
affinity: {}
tolerations: []
service:
annotations:
prometheus.io/scrape: "true"
volumes:
- name: runner-tmp-dir
emptyDir:
medium: Memory
sizeLimit: "64Mi"
- name: docker-socket
hostPath:
path: /var/run/docker.sock
type: ""
containers:
- name: runner
securityContext:
readOnlyRootFilesystem: true
volumeMounts:
- name: runner-tmp-dir
mountPath: /tmp
readOnly: false
- mountPath: /var/run/docker.sock
name: docker-socket
resources:
requests:
cpu: 20m
memory: 128Mi
limits:
memory: 768Mi
livenessProbe:
path: /alive
readinessProbe:
path: /ready
env:
CYBER_DOJO_USE_CONTAINERD: "true"
CYBER_DOJO_PROMETHEUS: "true"
CYBER_DOJO_RUNNER_PORT: "4597"
# CYBER_DOJO_K8S_PORT: "19661"
``` |
741d00b2-ac4b-4022-9e8a-d887fbc8bd5c | {
"language": "YAML"
} | ```yaml
driver:
name: vagrant
provisioner:
name: chef_zero
deprecations_as_errors: true
verifier:
name: inspec
platforms:
- name: centos-6.8
- name: centos-7.3
- name: debian-7.11
- name: debian-8.7
- name: freebsd-10.3
- name: freebsd-11.0
- name: fedora-25
- name: opensuse-leap-42.2
- name: ubuntu-14.04
- name: ubuntu-14.04-chef127
driver_config:
box: bento/ubuntu-14.04
provisioner:
require_chef_omnibus: 12.7.2
- name: ubuntu-16.04
- name: windows-2008r2
driver_config:
box: chef/windows-server-2008r2-standard
- name: windows-2012r2
driver_config:
box: chef/windows-server-2012r2-standard
suites:
- name: default
run_list:
- recipe[ohai_test::default]
```
Test on CentOS 6.9 in TK | ```yaml
driver:
name: vagrant
provisioner:
name: chef_zero
deprecations_as_errors: true
verifier:
name: inspec
platforms:
- name: centos-6.9
- name: centos-7.3
- name: debian-7.11
- name: debian-8.7
- name: freebsd-10.3
- name: freebsd-11.0
- name: fedora-25
- name: opensuse-leap-42.2
- name: ubuntu-14.04
- name: ubuntu-14.04-chef127
driver_config:
box: bento/ubuntu-14.04
provisioner:
require_chef_omnibus: 12.7.2
- name: ubuntu-16.04
- name: windows-2008r2
driver_config:
box: chef/windows-server-2008r2-standard
- name: windows-2012r2
driver_config:
box: chef/windows-server-2012r2-standard
suites:
- name: default
run_list:
- recipe[ohai_test::default]
``` |
21af6ac8-8fb3-4660-bea9-dea88608a110 | {
"language": "YAML"
} | ```yaml
---
driver:
name: vagrant
provisioner:
name: chef_zero
driver_config:
require_chef_omnibus: true
platforms:
- name: ubuntu-12.04
driver_config:
box: opscode-ubuntu-12.04
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
run_list: ["recipe[apt]"]
- name: ubuntu-10.04
driver_config:
box: opscode-ubuntu-10.04
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
run_list: ["recipe[apt]"]
- name: centos-6.4
driver_config:
box: opscode-centos-6.4
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
- name: centos-5.9
driver_config:
box: opscode-centos-5.9
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box
suites:
- name: default
run_list: ["recipe[sqlite]"]
attributes: {}
```
Update format and add new platforms | ```yaml
driver:
name: vagrant
provisioner:
name: chef_zero
platforms:
- name: ubuntu-12.04
run_list:
- recipe[apt::default]
- name: ubuntu-14.04
run_list:
- recipe[apt::default]
- name: centos-5.11
- name: centos-6.7
- name: centos-7.1
suites:
- name: default
run_list: ["recipe[sqlite]"]
attributes: {}
``` |
fd64e514-0881-41fa-8587-8b0be1e1b992 | {
"language": "YAML"
} | ```yaml
name: "Let me lint:fix that for you"
on: [push]
jobs:
LMLFTFY:
runs-on: ubuntu-latest
steps:
- name: "Check out Git repository"
uses: actions/checkout@v2
- name: "Install CLI tools"
run: npm install -g @angular/cli
- name: "Install application"
run: |
npm install --ignore-scripts
cd frontend
npm install --ignore-scripts
- name: "Fix everything which can be fixed"
run: 'npm run lint:fix'
- uses: stefanzweifel/git-auto-commit-action@v4.0.0
with:
commit_message: "Auto-fix linting issues"
branch: ${{ github.head_ref }}
commit_options: '--signoff'
commit_user_name: JuiceShopBot
commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com
commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com>```
Install Node.js 14 before linting | ```yaml
name: "Let me lint:fix that for you"
on: [push]
jobs:
LMLFTFY:
runs-on: ubuntu-latest
steps:
- name: "Check out Git repository"
uses: actions/checkout@v2
- name: "Use Node.js 14"
uses: actions/setup-node@v1
with:
node-version: 14
- name: "Install CLI tools"
run: npm install -g @angular/cli
- name: "Install application"
run: |
npm install --ignore-scripts
cd frontend
npm install --ignore-scripts
- name: "Fix everything which can be fixed"
run: 'npm run lint:fix'
- uses: stefanzweifel/git-auto-commit-action@v4.0.0
with:
commit_message: "Auto-fix linting issues"
branch: ${{ github.head_ref }}
commit_options: '--signoff'
commit_user_name: JuiceShopBot
commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com
commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com>``` |
83b7792a-481c-433c-9822-212af8769c9b | {
"language": "YAML"
} | ```yaml
---
provisioner:
name: ansible_playbook
hosts: test-kitchen
require_ansible_repo: false
require_ansible_omnibus: true
driver:
name: docker
platforms:
- name: centos-6
driver_config:
image: dynatrace/centos-testing:6
- name: debian-7.8
driver_config:
image: dynatrace/debian-testing:7.8
- name: ubuntu-12.04
driver_config:
image: dynatrace/ubuntu-testing:12.04
suites:
- name: default
```
Drop dependency on external docker images. | ```yaml
---
provisioner:
name: ansible_playbook
hosts: test-kitchen
require_ansible_repo: false
require_ansible_omnibus: true
driver:
name: docker
platforms:
- name: centos-6
driver_config:
provision_command:
- yum update -y
- yum install -y net-tools tar
- name: debian-7.8
driver_config:
provision_command:
- apt-get update
- apt-get install -y net-tools tar
- name: ubuntu-12.04
driver_config:
provision_command:
- apt-get update
- apt-get install -y net-tools tar
suites:
- name: default
``` |
d1cf4688-705f-499a-89f1-76077f3bdfec | {
"language": "YAML"
} | ```yaml
pull_request_rules:
- name: auto merge when label is set
conditions:
- label!=WIP
- label!=waiting
- label=ready to merge
- status-success~=Travis CI
- status-success~=Codacy
- status-success~=pullapprove
actions:
merge:
method: merge
strict: true
- name: remove ready to merge label when merged
conditions:
- merged
- label=ready to merge
actions:
label:
remove:
- ready to merge
- name: remove "ready to merge" label when pull is not approved
conditions:
- status-failure~=pullapprove
- label~=ready to merge
- -merged
actions:
comment:
message: The "ready to merge" label can only be set after one pull request approval
label:
remove:
- ready to merge
```
Add label after auto merge | ```yaml
pull_request_rules:
- name: auto merge when label is set
conditions:
- label!=WIP
- label!=waiting
- label=ready to merge
- status-success~=Travis CI
- status-success~=Codacy
- status-success~=pullapprove
actions:
merge:
method: merge
strict: true
- name: remove ready to merge label when merged
conditions:
- merged
- label=ready to merge
actions:
label:
add:
- auto_merged
remove:
- ready to merge
- name: remove "ready to merge" label when pull is not approved
conditions:
- status-failure~=pullapprove
- label~=ready to merge
- -merged
actions:
comment:
message: The "ready to merge" label can only be set after one pull request approval
label:
remove:
- ready to merge
``` |
44774a18-e34a-4656-8d03-e96fa54bccbb | {
"language": "YAML"
} | ```yaml
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r attentive_scoring/requirements.txt
- name: Lint with flake8
run: |
flake8 --indent-size 2 --max-line-length 80 attentive_scoring
- name: Run tests
run: |
sh attentive_scoring/run_tests.sh
```
Use bash instead of sh | ```yaml
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r attentive_scoring/requirements.txt
- name: Lint with flake8
run: |
flake8 --indent-size 2 --max-line-length 80 attentive_scoring
- name: Run tests
run: |
bash attentive_scoring/run_tests.sh
``` |
870487a8-86da-4dac-b20b-64dac8083a43 | {
"language": "YAML"
} | ```yaml
parser: babel-eslint
extends: airbnb/base
plugins:
- flowtype
rules:
eqeqeq:
- error
- allow-null
no-unused-expressions:
- error
- allowShortCircuit: true
no-use-before-define: off
no-multi-spaces:
- warn
- exceptions:
VariableDeclarator: true
ImportDeclaration: true
no-nested-ternary: off
no-cond-assign:
- error
- except-parens
key-spacing:
- warn
-
beforeColon: false
afterColon: true
mode: 'minimum'
react/sort-comp: off```
Align lint config to other libs | ```yaml
parser: babel-eslint
extends: airbnb/base
plugins:
- flowtype
rules:
eqeqeq:
- error
- allow-null
no-unused-expressions:
- error
- allowShortCircuit: true
no-use-before-define: off
no-multi-spaces: off
no-nested-ternary: off
no-cond-assign:
- error
- except-parens
key-spacing:
- warn
-
beforeColon: false
afterColon: true
mode: 'minimum'
react/sort-comp: off
``` |
d0b96233-367a-4fee-b50f-20effdf421bb | {
"language": "YAML"
} | ```yaml
---
label: Page
hide_body: false
fields:
- type: text
name: title
label: Title
config:
required: true
- name: description
type: text
config:
required: false
label: Description
- type: datetime
name: date
label: Date
config:
date_format: YYYY-MM-DD
required: true
default: now
- name: updated
type: datetime
label: Updated
description: ''
config:
required: false
date_format: YYYY-MM-DD
time_format:
display_utc: false
- type: list
name: menu
label: Menu
- type: boolean
name: published
label: Published
default: false
- name: image
type: file
config:
maxSize: 250
label: Image
- name: alias
type: list
config:
use_select: false
min:
max:
source:
type: simple
label: Alias
- name: typora-root-url
type: text
config:
required: false
label: typora-root-url
default: "../static"
pages:
- content/a-propos.md
```
Update from Forestry.io - Updated Forestry configuration | ```yaml
---
label: Page
hide_body: false
fields:
- type: text
name: title
label: Title
config:
required: true
- name: description
type: text
config:
required: false
label: Description
- type: datetime
name: date
label: Date
config:
date_format: YYYY-MM-DD
required: true
default: now
- name: updated
type: datetime
label: Updated
description: ''
config:
required: false
date_format: YYYY-MM-DD
time_format:
display_utc: false
- name: menu
type: field_group_list
fields:
- name: weight
type: number
label: Weight
description: ''
default: 0
required: true
config:
min:
max:
step:
config:
min:
max:
labelField:
label: Menu
- type: boolean
name: published
label: Published
default: false
- name: image
type: file
config:
maxSize: 250
label: Image
- name: alias
type: list
config:
use_select: false
min:
max:
source:
type: simple
label: Alias
- name: typora-root-url
type: text
config:
required: false
label: typora-root-url
default: "../static"
pages:
- content/a-propos.md
``` |
8272dfba-d312-43cb-bc39-70a7dec42ae7 | {
"language": "YAML"
} | ```yaml
---
label: Page
hide_body: false
fields:
- type: text
name: title
label: Title
config:
required: true
- name: description
type: text
config:
required: false
label: Description
- name: image
type: file
config:
maxSize: 250
label: Image
- type: datetime
name: date
label: Date
config:
date_format: YYYY-MM-DD
required: true
default: now
- name: menu
type: list
label: Menu
- type: boolean
name: published
label: Published
default: false
- name: updated
type: datetime
label: Updated
description: ''
config:
required: false
date_format: YYYY-MM-DD
time_format:
display_utc: false
- name: alias
type: list
config:
use_select: false
min:
max:
source:
type: simple
label: Alias
- name: typora-root-url
type: text
config:
required: false
label: typora-root-url
default: "../static"
hidden: true
pages:
- content/a-propos.md
```
Update from Forestry.io - Updated Forestry configuration | ```yaml
---
label: Page
hide_body: false
display_field: title
fields:
- type: text
name: title
label: Title
config:
required: true
- name: description
type: text
config:
required: false
label: Description
- name: image
type: file
config:
maxSize: 250
label: Image
- type: datetime
name: date
label: Date
config:
date_format: YYYY-MM-DD
required: true
default: now
- name: menu
type: list
label: Menu
- type: boolean
name: published
label: Published
default: false
- name: updated
type: datetime
label: Updated
description: ''
config:
required: false
date_format: YYYY-MM-DD
time_format:
display_utc: false
- name: alias
type: list
config:
use_select: false
min:
max:
source:
type: simple
label: Alias
- name: typora-root-url
type: text
config:
required: false
label: typora-root-url
default: "../static"
hidden: true
pages:
- content/a-propos.md
``` |
c6efd8a3-536f-4b85-8371-c1e785c3c632 | {
"language": "YAML"
} | ```yaml
---
- name: Update /etc/hosts with freeipa's details
become: yes
lineinfile:
dest: "/etc/hosts"
line: "{{ freeipa_node_ipaddress }} {{ freeipa_node }}.{{ freeipa_cloud_domain }} {{ freeipa_node }}"
state: present
- name: Install python novajoin
become: yes
package:
name: python-novajoin
state: present
- name: Prepare novajoin to work
become: yes
shell: >
/usr/libexec/novajoin-ipa-setup --principal admin --password {{ freeipa_admin_password }} --server {{ freeipa_node }}.{{ freeipa_cloud_domain }} --realm {{ freeipa_cloud_domain|upper }}
--domain {{ freeipa_cloud_domain }} --hostname {{ groups['undercloud'][0] }}.{{ freeipa_cloud_domain }} --precreate
register: novajoin
- name: Edit undercloud.conf
blockinfile:
path: ~/undercloud.conf
backup: yes
marker: "# {mark} TLS EVERYWHERE SETTINGS -->"
content: |
enable_novajoin = True
ipa_otp = {{ novajoin.stdout }}
undercloud_hostname = {{ groups['undercloud'][0] }}.{{ freeipa_cloud_domain }}
undercloud_nameservers = {{ freeipa_node_ipaddress }}
overcloud_domain_name = {{ freeipa_cloud_domain }}
```
Add tls-everywhere settings before ctlplane-subnet section | ```yaml
---
- name: Update /etc/hosts with freeipa's details
become: yes
lineinfile:
dest: "/etc/hosts"
line: "{{ freeipa_node_ipaddress }} {{ freeipa_node }}.{{ freeipa_cloud_domain }} {{ freeipa_node }}"
state: present
- name: Install python novajoin
become: yes
package:
name: python-novajoin
state: present
- name: Prepare novajoin to work
become: yes
shell: >
/usr/libexec/novajoin-ipa-setup --principal admin --password {{ freeipa_admin_password }} --server {{ freeipa_node }}.{{ freeipa_cloud_domain }} --realm {{ freeipa_cloud_domain|upper }}
--domain {{ freeipa_cloud_domain }} --hostname {{ groups['undercloud'][0] }}.{{ freeipa_cloud_domain }} --precreate
register: novajoin
- name: Edit undercloud.conf
blockinfile:
path: ~/undercloud.conf
backup: yes
insertbefore: '^\[ctlplane-subnet\]'
marker: "# {mark} TLS EVERYWHERE SETTINGS -->"
content: |
enable_novajoin = True
ipa_otp = {{ novajoin.stdout }}
undercloud_hostname = {{ groups['undercloud'][0] }}.{{ freeipa_cloud_domain }}
undercloud_nameservers = {{ freeipa_node_ipaddress }}
overcloud_domain_name = {{ freeipa_cloud_domain }}
``` |
0adeac68-3923-4acc-b72a-1a6c6631c0cd | {
"language": "YAML"
} | ```yaml
image: eu.gcr.io/jetstack-build-infra-images/bazelbuild:v20181107-8aac55d-0.18.0
variables:
DOCKER_DRIVER: overlay
services:
- docker:1.12-dind
before_script:
- curl -L "https://get.docker.com/builds/Linux/x86_64/docker-1.9.1.tgz" | tar -C /usr/bin -xvzf- --strip-components=3 usr/local/bin/docker
- export DOCKER_HOST=${DOCKER_PORT}
- docker info > /dev/null
build:
tags:
- docker
script:
- make verify images
except:
- master
- tags
master_push:
tags:
- docker
script:
- mkdir -p ~/.docker && echo "${DOCKER_AUTH_CONFIG}" > ~/.docker/config.json && chmod 600 ~/.docker/config.json
- make verify
- APP_VERSION=${CI_BUILD_REF_SLUG}-${CI_PIPELINE_ID} make images_push
- APP_VERSION=canary make images_push
only:
- master
release_push:
tags:
- docker
script:
- mkdir -p ~/.docker && echo "${DOCKER_AUTH_CONFIG}" > ~/.docker/config.json && chmod 600 ~/.docker/config.json
- make verify
- APP_VERSION=${CI_COMMIT_TAG} make images_push DOCKER_TAG="${CI_COMMIT_TAG}"
only:
- tags
```
Fix GitLab build use of APP_VERSION | ```yaml
image: eu.gcr.io/jetstack-build-infra-images/bazelbuild:v20181107-8aac55d-0.18.0
variables:
DOCKER_DRIVER: overlay
services:
- docker:1.12-dind
before_script:
- curl -L "https://get.docker.com/builds/Linux/x86_64/docker-1.9.1.tgz" | tar -C /usr/bin -xvzf- --strip-components=3 usr/local/bin/docker
- export DOCKER_HOST=${DOCKER_PORT}
- docker info > /dev/null
build:
tags:
- docker
script:
- make verify images
except:
- master
- tags
master_push:
tags:
- docker
script:
- mkdir -p ~/.docker && echo "${DOCKER_AUTH_CONFIG}" > ~/.docker/config.json && chmod 600 ~/.docker/config.json
- make verify
- make images_push APP_VERSION="${CI_BUILD_REF_SLUG}-${CI_PIPELINE_ID}"
- make images_push APP_VERSION="canary"
only:
- master
release_push:
tags:
- docker
script:
- mkdir -p ~/.docker && echo "${DOCKER_AUTH_CONFIG}" > ~/.docker/config.json && chmod 600 ~/.docker/config.json
- make verify
- make images_push APP_VERSION="${CI_COMMIT_TAG}"
only:
- tags
``` |
52c104a3-0446-4735-b951-a8d248bd5267 | {
"language": "YAML"
} | ```yaml
gitlab-dev:
tags:
- meao
- gcp
only:
- gitlab
variables:
NAMESPACE: nucleus-dev
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- CLUSTER_NAME=iowa-b bin/update-config.sh
- CLUSTER_NAME=frankfurt bin/update-config.sh
master:
tags:
- meao
- gcp
only:
- master
variables:
NAMESPACE: nucleus-dev
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- bin/update-config.sh
stage:
tags:
- meao
- gcp
only:
- stage
variables:
NAMESPACE: nucleus-stage
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- bin/update-config.sh
prod:
tags:
- meao
- gcp
only:
- prod
variables:
NAMESPACE: nucleus-prod
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- bin/update-config.sh
```
Consolidate gitlab and master branches in to single dev job | ```yaml
dev:
tags:
- meao
- gcp
only:
- gitlab
- master
variables:
NAMESPACE: nucleus-dev
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- CLUSTER_NAME=iowa-b bin/update-config.sh
- CLUSTER_NAME=frankfurt bin/update-config.sh
stage:
tags:
- meao
- gcp
only:
- stage
variables:
NAMESPACE: nucleus-stage
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- bin/update-config.sh
prod:
tags:
- meao
- gcp
only:
- prod
variables:
NAMESPACE: nucleus-prod
script:
- docker/bin/build_images.sh
- docker/bin/push2dockerhub.sh
- bin/update-config.sh
``` |
b6308cd7-3b31-4972-b13a-7f8fcbafeeee | {
"language": "YAML"
} | ```yaml
stages:
- build
- test
- deploy
build:
image: docker
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
script:
- docker pull $CI_REGISTRY_IMAGE:CI_COMMIT_REF_NAME || true
- docker build --cache-from $CI_REGISTRY_IMAGE:CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
deploy-beta:
stage: deploy
image:
name: alpine/helm:3.7.2
entrypoint: [""]
script:
- helm repo add kobo https://gitlab.com/api/v4/projects/32216873/packages/helm/stable
- helm -n beta upgrade kobo-beta kobo/kobo --atomic --set-string kpi.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values
environment:
name: beta
url: https://kf.beta.kobotoolbox.org
only:
refs:
- master
variables:
- $CI_COMMIT_REF_PROTECTED
```
Use `public-beta` branch in `deploy-beta` job | ```yaml
stages:
- build
- test
- deploy
build:
image: docker
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
script:
- docker pull $CI_REGISTRY_IMAGE:CI_COMMIT_REF_NAME || true
- docker build --cache-from $CI_REGISTRY_IMAGE:CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
deploy-beta:
stage: deploy
image:
name: alpine/helm:3.7.2
entrypoint: [""]
script:
- helm repo add kobo https://gitlab.com/api/v4/projects/32216873/packages/helm/stable
- helm -n beta upgrade kobo-beta kobo/kobo --atomic --set-string kpi.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values
environment:
name: beta
url: https://kf.beta.kobotoolbox.org
only:
refs:
- public-beta
variables:
- $CI_COMMIT_REF_PROTECTED
``` |
ffb8abe2-b2a7-4732-a23e-d459448da280 | {
"language": "YAML"
} | ```yaml
stages:
- build
before_script:
- git submodule update --init --recursive
osx:
stage: build
script:
- atbuild check
- atbuild package
tags:
- openswift
- atbuild
artifacts:
paths:
- bin/xcode_emit*.tar.xz
- bin/xcode-emit.rb
```
Use release configuration for packaging | ```yaml
stages:
- build
before_script:
- git submodule update --init --recursive
osx:
stage: build
script:
- atbuild check
- atbuild package --configuration release
tags:
- openswift
- atbuild
artifacts:
paths:
- bin/xcode_emit*.tar.xz
- bin/xcode-emit.rb
``` |
04b3626b-b94a-486b-b731-83b32e2b0788 | {
"language": "YAML"
} | ```yaml
---
management:
security:
role: ADMIN
enabled: true
server:
port: 8080
secure:
port: 8443
spring:
datasource:
initialize: true
jackson:
serialization:
INDENT_OUTPUT: true
#http:
# mappers:
# jsonPrettyPrint: true
---
spring:
profiles: test
jpa:
hibernate:
ddl-auto: create-drop
generate-ddl: true
show-sql: true
---
spring:
profiles: postgres
jpa:
hibernate:
ddl-auto: create
database-platform: org.hibernate.dialect.PostgreSQLDialect
generate-ddl: true
show-sql: true
datasource:
driverClassName: org.postgresql.Driver
---
spring:
profiles: mysql
jpa:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQLDialect
generate-ddl: true
show-sql: true
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/my_db
username: testuser
password: testpassword
```
Update the schema instead of creating it in postgres | ```yaml
---
management:
security:
role: ADMIN
enabled: true
server:
port: 8080
secure:
port: 8443
spring:
datasource:
initialize: true
jackson:
serialization:
INDENT_OUTPUT: true
#http:
# mappers:
# jsonPrettyPrint: true
---
spring:
profiles: test
jpa:
hibernate:
ddl-auto: create-drop
generate-ddl: true
show-sql: true
---
spring:
profiles: postgres
jpa:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.PostgreSQLDialect
generate-ddl: true
show-sql: true
datasource:
driverClassName: org.postgresql.Driver
---
spring:
profiles: mysql
jpa:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQLDialect
generate-ddl: true
show-sql: true
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/my_db
username: testuser
password: testpassword
``` |
d79e0147-efdd-4ff3-81fb-ee4d89d1b977 | {
"language": "YAML"
} | ```yaml
- defaults:
link:
create: true
relink: true
- clean: ['~', '~/.config']
- link:
~/.agignore:
~/.aria2/aria2.conf:
~/.axelrc:
~/.bash:
~/.bash_profile:
~/.bashrc:
~/.dotfiles: ''
~/.emacs.d:
~/.emacs:
~/.gitconfig:
~/.gitignore_global:
~/.gnupg/gpg.conf:
~/.hgrc:
~/.inputrc:
~/.ipython/profile_default/ipython_kernel_config.py:
~/.irssi:
~/.jupyter/nbconfig/notebook.json: jupyter/notebook.json
~/.local/share/jupyter/nbextensions: jupyter/nbextensions
~/.pythonrc:
~/.rtorrent.rc:
~/.screenrc:
~/.shell:
~/.tmux.conf:
~/.vim:
~/.vimrc:
~/.zsh:
~/.zshrc:
- shell:
- mkdir -p ~/.rtorrent/session ~/.rtorrent/watch ~/.rtorrent/downloads
- git update-submodules # after linking ~/.gitconfig
```
Make install script remove deleted submodules | ```yaml
- defaults:
link:
create: true
relink: true
- clean: ['~', '~/.config']
- link:
~/.agignore:
~/.aria2/aria2.conf:
~/.axelrc:
~/.bash:
~/.bash_profile:
~/.bashrc:
~/.dotfiles: ''
~/.emacs.d:
~/.emacs:
~/.gitconfig:
~/.gitignore_global:
~/.gnupg/gpg.conf:
~/.hgrc:
~/.inputrc:
~/.ipython/profile_default/ipython_kernel_config.py:
~/.irssi:
~/.jupyter/nbconfig/notebook.json: jupyter/notebook.json
~/.local/share/jupyter/nbextensions: jupyter/nbextensions
~/.pythonrc:
~/.rtorrent.rc:
~/.screenrc:
~/.shell:
~/.tmux.conf:
~/.vim:
~/.vimrc:
~/.zsh:
~/.zshrc:
- shell:
- mkdir -p ~/.rtorrent/session ~/.rtorrent/watch ~/.rtorrent/downloads
# the following have to run after linking ~/.gitconfig
- git update-submodules
- >
git cleanall -f
emacs.d/vendor/
irssi/scripts/vendor/
jupyter/nbextensions/
shell/plugins/
vim/bundle/
zsh/plugins/
``` |
9dfb0aa6-7374-4338-8d3e-f5b86db16c1b | {
"language": "YAML"
} | ```yaml
require: rubocop-rspec
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
Include:
- "**/Rakefile"
- "**/config.ru"
Exclude:
- "db/**/*"
- "config/**/*"
- "script/**/*"
TargetRubyVersion: 2.3
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Layout/IndentationConsistency:
EnforcedStyle: rails
Layout/IndentationWidth:
Enabled: true
Layout/EndOfLine:
EnforcedStyle: lf
Layout/TrailingBlankLines:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true
Lint/LiteralAsCondition:
Enabled: true
Lint/UselessAssignment:
Enabled: true
Metrics/LineLength:
Max: 100
RSpec/NotToNot:
Enabled: true
Style/StringLiterals:
EnforcedStyle: double_quotes
```
Enable rubocop rules in config and seed files | ```yaml
require: rubocop-rspec
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
Include:
- "**/Rakefile"
- "**/config.ru"
Exclude:
- "db/migrate/**/*"
- "db/schema.rb"
TargetRubyVersion: 2.3
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Layout/IndentationConsistency:
EnforcedStyle: rails
Layout/IndentationWidth:
Enabled: true
Layout/EndOfLine:
EnforcedStyle: lf
Layout/TrailingBlankLines:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true
Lint/LiteralAsCondition:
Enabled: true
Lint/UselessAssignment:
Enabled: true
Metrics/LineLength:
Max: 100
RSpec/NotToNot:
Enabled: true
Style/StringLiterals:
EnforcedStyle: double_quotes
``` |
8abd3ec2-56ae-4318-a8c8-3470663c22b6 | {
"language": "YAML"
} | ```yaml
machine:
python:
version: 2.7.9
node:
version: 4.3.1
dependencies:
pre:
- pip install robotframework==3.0
- pip install robotframework-requests==0.4.4
- pip install robotframework-selenium2library==1.7.4
# Clean out node-modules to prevent issues with circle-ci's caching.
- rm -rf node_modules
test:
post:
- npm run build
- npm start:
background: true
- pybot -d "./e2e/robot/test_results" ./e2e/robot/tests
general:
artifacts:
- "./e2e/robot/test_results"
```
Test against latest Node LTS | ```yaml
machine:
python:
version: 2.7.9
node:
version: 4
dependencies:
pre:
- pip install robotframework==3.0
- pip install robotframework-requests==0.4.4
- pip install robotframework-selenium2library==1.7.4
# Clean out node-modules to prevent issues with circle-ci's caching.
- rm -rf node_modules
test:
post:
- npm run build
- npm start:
background: true
- pybot -d "./e2e/robot/test_results" ./e2e/robot/tests
general:
artifacts:
- "./e2e/robot/test_results"
``` |
a6dc00a6-42ae-4678-b459-01076f3fcdc1 | {
"language": "YAML"
} | ```yaml
machine:
services:
- docker
test:
override:
- mkdir logs
- docker build -t openvas . 2>&1 | tee logs/build.log:
timeout: 1200
general:
artifacts:
- "logs"
```
Add logs and log artifacts | ```yaml
machine:
services:
- docker
test:
override:
- mkdir logs
- docker build -t openvas . &> logs/build.log:
timeout: 1200
- sh test.sh &> logs/test.log:
timeout: 600
general:
artifacts:
- "logs"
``` |
4659ae23-677f-428e-a443-1e2c540fb0aa | {
"language": "YAML"
} | ```yaml
machine:
java:
version: oraclejdk6
test:
override:
- TERM=dumb ./gradlew --no-color install check
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
```
Replace deprecated gradle command line argument | ```yaml
machine:
java:
version: oraclejdk6
test:
override:
- TERM=dumb ./gradlew --console=plain install check
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
``` |
80e1ab56-62f4-4c05-80e9-825fb458599e | {
"language": "YAML"
} | ```yaml
name: Node.js v14 CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js v14
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm ci
- run: npm run lint
- run: npm test
```
Update actions/setup-node action to v2 | ```yaml
name: Node.js v14 CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js v14
uses: actions/setup-node@v2
with:
node-version: '14.x'
- run: npm ci
- run: npm run lint
- run: npm test
``` |
e07fe529-609b-43b4-8778-6198ac7b070a | {
"language": "YAML"
} | ```yaml
machine:
xcode:
version: "8.3.2"
dependencies:
pre:
- brew update 1> /dev/null 2> /dev/null
- brew outdated carthage || brew upgrade carthage
- gem install bundler
test:
override:
- ./scripts/macOS.sh
- ./scripts/iOS.sh
- ./scripts/tvOS.sh
post:
- carthage build --no-skip-current && for platform in Mac iOS tvOS; do test -d Carthage/Build/${platform}/Anchorage.framework || exit 1; done
# This is to work around the fact that CocoaPods wants to set up the master CocoaPods specs
# repo on pod lib lint, which takes several minutes on CircleCI. Without dependancies, this
# isn't a nescessary step. We can point it at any other (smaller) Git repo to speed up this
# step significantly. Because recursion is fun, let's point it at ourselves.
# Relevant CocoaPods bug: https://github.com/CocoaPods/CocoaPods/issues/6154
- bundle exec pod lib lint --sources="https://github.com/Raizlabs/Anchorage"
```
Enable auto-deploy on CircleCI based on tags. | ```yaml
machine:
xcode:
version: "8.3.2"
dependencies:
pre:
- brew update 1> /dev/null 2> /dev/null
- brew outdated carthage || brew upgrade carthage
- gem install bundler
test:
override:
- ./scripts/macOS.sh
- ./scripts/iOS.sh
- ./scripts/tvOS.sh
post:
- carthage build --no-skip-current && for platform in Mac iOS tvOS; do test -d Carthage/Build/${platform}/Anchorage.framework || exit 1; done
# This is to work around the fact that CocoaPods wants to set up the master CocoaPods specs
# repo on pod lib lint, which takes several minutes on CircleCI. Without dependancies, this
# isn't a nescessary step. We can point it at any other (smaller) Git repo to speed up this
# step significantly. Because recursion is fun, let's point it at ourselves.
# Relevant CocoaPods bug: https://github.com/CocoaPods/CocoaPods/issues/6154
- bundle exec pod lib lint --sources="https://github.com/Raizlabs/Anchorage"
deployment:
release:
tag: /\d+(\.\d+)*(-.*)*/
commands:
- bundle exec pod trunk push
``` |
08cd00d1-38e5-40da-9b10-89d0ead12005 | {
"language": "YAML"
} | ```yaml
machine:
node:
version: 0.10.33
services:
branches:
only:
- master
```
Add some overrides for starters | ```yaml
machine:
node:
version: 0.10.33
services:
branches:
only:
- master
dependencies:
pre:
override:
- mvn install
test:
override:
- mvn verify
``` |
e8728199-1aa5-4a7d-8dee-8bc3f58d8eea | {
"language": "YAML"
} | ```yaml
machine:
environment:
INSTALL_PREFIX_DIR: ~/opt
INSTALL_PREFIX_BIN_DIR: ${INSTALL_PREFIX_DIR}/bin
PATH: ${INSTALL_PREFIX_BIN_DIR}:${PATH}
checkout:
post:
- git submodule sync --recursive
- git submodule update --recursive --init
dependencies:
override:
- vendor-install-tools/install.ph meson --installPrefixDir=${INSTALL_PREFIX_BIN_DIR}
test:
post:
- meson --version
- echo 'Does nothing yet'
```
Fix typo and meson version is -v not --version. | ```yaml
machine:
environment:
INSTALL_PREFIX_DIR: ~/opt
INSTALL_PREFIX_BIN_DIR: ${INSTALL_PREFIX_DIR}/bin
PATH: ${INSTALL_PREFIX_BIN_DIR}:${PATH}
checkout:
post:
- git submodule sync --recursive
- git submodule update --recursive --init
dependencies:
override:
- vendor-install-tools/install.py meson --installPrefixDir=${INSTALL_PREFIX_BIN_DIR}
test:
post:
- meson -v
- echo 'Does nothing yet'
``` |
12a9257a-0561-4a2a-91d9-af95fb5267dd | {
"language": "YAML"
} | ```yaml
machine:
node:
version: 4.1.2
general:
artifacts:
- $CIRCLE_TEST_REPORTS
test:
override:
- npm run security:check
- npm test -- --reporter mocha-junit-reporter --reporter-options mochaFile=$CIRCLE_TEST_REPORTS/junit/results.xml
- npm run cover -- --output=$CIRCLE_TEST_REPORTS/coverage/
- CODECLIMATE_REPO_TOKEN=$CODECLIMATE_REPO_TOKEN ./node_modules/.bin/codeclimate-test-reporter < $CIRCLE_TEST_REPORTS/coverage/lcov.info
```
Copy the coverage report to the artifact directory | ```yaml
machine:
node:
version: 4.1.2
general:
artifacts:
- $CIRCLE_TEST_REPORTS
test:
override:
- npm run security:check
- npm test -- --reporter mocha-junit-reporter --reporter-options mochaFile=$CIRCLE_TEST_REPORTS/junit/results.xml
- npm run cover
- copy ./coverage $CIRCLE_TEST_REPORTS/coverage
- CODECLIMATE_REPO_TOKEN=$CODECLIMATE_REPO_TOKEN ./node_modules/.bin/codeclimate-test-reporter < $CIRCLE_TEST_REPORTS/coverage/lcov.info
``` |
a2eda39a-7b0b-4dbb-b768-1ff41b903c5c | {
"language": "YAML"
} | ```yaml
machine:
services:
- docker
environment:
IMAGE_NAME: centurylink/watchtower
dependencies:
override:
- docker pull centurylink/golang-builder:latest
test:
override:
- docker run -v $(pwd):/src centurylink/golang-builder:latest --test
deployment:
hub:
branch: master
commands:
- docker run -v $(pwd):/src centurylink/golang-builder:latest
- docker build -t $IMAGE_NAME:latest .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push $IMAGE_NAME:latest
hub_mirror:
branch: auth
owner: rosscado
commands:
- docker run -v $(pwd):/src centurylink/golang-builder:latest
- docker build -t rosscado/watchtower:latest .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push rosscado/watchtower:latest
```
Change image name to push to rosscado/watchtower | ```yaml
machine:
services:
- docker
environment:
IMAGE_NAME: rosscado/watchtower
dependencies:
override:
- docker pull centurylink/golang-builder:latest
test:
override:
- docker run -v $(pwd):/src centurylink/golang-builder:latest --test
deployment:
hub:
branch: master
commands:
- docker run -v $(pwd):/src centurylink/golang-builder:latest
- docker build -t $IMAGE_NAME:latest .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push $IMAGE_NAME:latest
hub_mirror:
branch: auth
owner: rosscado
commands:
- docker run -v $(pwd):/src centurylink/golang-builder:latest
- docker build -t rosscado/watchtower:latest .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push rosscado/watchtower:latest
``` |
27c1460a-7e7e-45a2-91c5-d35d03049df3 | {
"language": "YAML"
} | ```yaml
machine:
services:
- docker
dependencies:
override:
- docker version
- docker info
- docker build -t="blacklabelops/jenkins-swarm" .
test:
override:
- docker run -d --name="jenkins-swarm" blacklabelops/jenkins-swarm
- docker exec jenkins-swarm java -version
```
Build test set to log output. | ```yaml
machine:
services:
- docker
dependencies:
override:
- docker version
- docker info
- docker build -t="blacklabelops/jenkins-swarm" .
test:
override:
- docker run -d --name="jenkins-swarm" blacklabelops/jenkins-swarm
- docker logs jenkins-swarm
``` |
bd587e91-04e1-4f55-acc1-2146360c17a9 | {
"language": "YAML"
} | ```yaml
## Customize the test machine
machine:
services:
- docker
test:
override:
- lein do clean, test, bin
## deployment:
## docker-hub:
## branch: master
## commands:
## - docker build -t samsara/hydrant .
## - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
## - docker push samsara/hydrant
```
Fix Auto Docker builds and push | ```yaml
## Customize the test machine
machine:
services:
- docker
test:
override:
- lein do clean, test, bin
deployment:
docker-hub:
branch: master
commands:
- docker build -t samsara/hydrant .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push samsara/hydrant
``` |
450b0b2d-45b3-4f5b-85b5-b1b3a34e5f7d | {
"language": "YAML"
} | ```yaml
machine:
pre:
- sudo rm /home/ubuntu/virtualenvs/venv-system/lib/python2.7/no-global-site-packages.txt
```
Delete virtualenv configuration for no site packages | ```yaml
dependencies:
pre:
- sudo rm /home/ubuntu/virtualenvs/venv-system/lib/python2.7/no-global-site-packages.txt
``` |
c91507f9-521a-4192-a09c-c18b553d3991 | {
"language": "YAML"
} | ```yaml
version: 1.0.{build}
branches:
only:
- development/r1.0
- release/r1.0
image: Visual Studio 2015
install:
- cmd: >-
set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
dnvm install 1.0.0-rc1-update1 -r coreclr -arch x64
cache: C:\Users\appveyor\.dnx\packages
build_script:
- cmd: >-
dnvm use 1.0.0-rc1-update1 -r coreclr -arch x64
dnu restore
dnu build .\src\HTTPlease.Core
test_script:
- cmd: dnx -p test\HTTPlease.Core.Tests test
deploy_script:
- cmd: dnu pack .\src\HTTPlease.Core
```
Reduce output from dnu restore. | ```yaml
version: 1.0.{build}
branches:
only:
- development/r1.0
- release/r1.0
image: Visual Studio 2015
install:
- cmd: >-
set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
dnvm install 1.0.0-rc1-update1 -r coreclr -arch x64
cache: C:\Users\appveyor\.dnx\packages
build_script:
- cmd: >-
dnvm use 1.0.0-rc1-update1 -r coreclr -arch x64
dnu restore --quiet
dnu build .\src\HTTPlease.Core
test_script:
- cmd: dnx -p test\HTTPlease.Core.Tests test
deploy_script:
- cmd: dnu pack .\src\HTTPlease.Core
``` |
03ba6b90-c787-478a-86fc-11281e5769c4 | {
"language": "YAML"
} | ```yaml
environment:
EMACSBIN: emacs-24.4-bin%28i686-pc-mingw32%29.7z
matrix:
fast_finish: true
install:
- ps: Start-FileDownload "http://downloads.sourceforge.net/project/emacs-bin/releases/$env:EMACSBIN"
- ps: 7z x $env:EMACSBIN -oemacs-local | FIND /V "ing "
build_script:
- cmd: FSharp.AutoComplete\fake.cmd Test
test: off
```
Update Emacs link in AppVeyor | ```yaml
environment:
EMACSBIN: emacs-24.4-bin-i686-pc-mingw32.7z
matrix:
fast_finish: true
install:
- ps: Start-FileDownload "http://downloads.sourceforge.net/project/emacs-bin/releases/$env:EMACSBIN"
- ps: 7z x $env:EMACSBIN -oemacs-local | FIND /V "ing "
build_script:
- cmd: FSharp.AutoComplete\fake.cmd Test
test: off
``` |
5eb479d0-cfe5-49af-99c8-55597b4ae5a9 | {
"language": "YAML"
} | ```yaml
# image to use
image: Visual Studio 2017
# version format
version: 1.0.{build}
# Maximum number of concurrent jobs for the project
max_jobs: 1
services:
- mssql2014 # start SQL Server 2014 Express
build:
parallel: true # enable MSBuild parallel builds
project: src\bar-mgmt.sln # path to Visual Studio solution or project
# MSBuild verbosity level
verbosity: normal
```
Add nuget restore to before build in AppVeyor yaml to restore packages | ```yaml
# image to use
image: Visual Studio 2017
# version format
version: 1.0.{build}
# Maximum number of concurrent jobs for the project
max_jobs: 1
services:
- mssql2014 # start SQL Server 2014 Express
build:
parallel: true # enable MSBuild parallel builds
project: src\bar-mgmt.sln # path to Visual Studio solution or project
# MSBuild verbosity level
verbosity: normal
before_build:
- nuget restore``` |
19282190-7c24-4f94-92a2-177b61db3380 | {
"language": "YAML"
} | ```yaml
version: '{branch}-{build}'
os:
- Visual Studio 2015
- Visual Studio 2017
configuration: Release
branches:
only:
- master
init: []
before_build:
- del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
build_script:
- md build
- cd build
- IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" (SET GEN="Visual Studio 14 2015") ELSE (SET GEN="Visual Studio 15 2017")
- cmake -Wno-dev .. -G%GEN%
- cmake --build .
test_script:
- ctest -C Debug --output-on-failure
install: []
```
Create real build matrix for MSVC | ```yaml
version: '{branch}-{build}'
os:
- Visual Studio 2015
- Visual Studio 2017
platform:
- Win32
- x64
configuration:
- Release
- Debug
branches:
only:
- master
init: []
before_build:
- ps: |
Write-Output "Configuration: $env:CONFIGURATION"
Write-Output "Platform: $env:PLATFORM"
Write-Output "Toolset: $env:TOOLSET"
$generator = switch ($env:TOOLSET)
{
"v150" {"Visual Studio 15 2017"}
"v140" {"Visual Studio 14 2015"}
}
if ($env:PLATFORM -eq "x64")
{
$generator = "$generator Win64"
}
if ($env:TOOLSET -eq "v140")
{
del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
}
build_script:
- md build
- cd build
- cmake -Wno-dev --config "$env:CONFIGURATION" -G "$generator" ..
- cmake --build --config "$env:CONFIGURATION" .
test_script:
- ctest -C "$env:CONFIGURATION" --output-on-failure
install: []
``` |
29f305c1-88b0-4f66-ad1e-6839c87ed75b | {
"language": "YAML"
} | ```yaml
version: 1.0.{build}-{branch}
environment:
RUBYOPT: -Eutf-8
matrix:
- RUBY_VERSION: 200
- RUBY_VERSION: 200-x64
- RUBY_VERSION: 21
- RUBY_VERSION: 21-x64
- RUBY_VERSION: 22
- RUBY_VERSION: 22-x64
- RUBY_VERSION: 23
- RUBY_VERSION: 23-x64
- RUBY_VERSION: 24
- RUBY_VERSION: 24-x64
- RUBY_VERSION: 25
- RUBY_VERSION: 25-x64
- RUBY_VERSION: 26
- RUBY_VERSION: 26-x64
install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle install
build: off
before_test:
- ruby -v
- gem -v
- bundle -v
test_script:
- bundle exec rake
```
Test against Ruby 2.7 on AppVeyor | ```yaml
version: 1.0.{build}-{branch}
environment:
RUBYOPT: -Eutf-8
matrix:
- RUBY_VERSION: 200
- RUBY_VERSION: 200-x64
- RUBY_VERSION: 21
- RUBY_VERSION: 21-x64
- RUBY_VERSION: 22
- RUBY_VERSION: 22-x64
- RUBY_VERSION: 23
- RUBY_VERSION: 23-x64
- RUBY_VERSION: 24
- RUBY_VERSION: 24-x64
- RUBY_VERSION: 25
- RUBY_VERSION: 25-x64
- RUBY_VERSION: 26
- RUBY_VERSION: 26-x64
- RUBY_VERSION: 27
- RUBY_VERSION: 27-x64
install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle install
build: off
before_test:
- ruby -v
- gem -v
- bundle -v
test_script:
- bundle exec rake
``` |
49719a8c-05b7-4c70-ba2a-7214198d5b38 | {
"language": "YAML"
} | ```yaml
environment:
PYTEST_ADDOPTS: --numprocesses auto
matrix:
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python34"
- PYTHON: "C:\\Python27"
build: off
before_test:
- "%PYTHON%\\python.exe -m pip install tox wheel"
test_script:
- "%PYTHON%\\python.exe -m tox -e standard"
```
Upgrade pip to take advantage of env markers and avoid error in itertools | ```yaml
environment:
PYTEST_ADDOPTS: --numprocesses auto
matrix:
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python34"
- PYTHON: "C:\\Python27"
build: off
before_test:
- "%PYTHON%\\python.exe -m pip install --upgrade pip tox wheel"
test_script:
- "%PYTHON%\\python.exe -m tox -e standard"
``` |
2a4cf9a2-d3df-4441-8c85-39c9325e90ac | {
"language": "YAML"
} | ```yaml
build: false
shallow_clone: true
platform:
- x86
# - x64
cache:
- C:\tools\php -> appveyor.yml
init:
- SET PATH=C:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET COMPOSER=0
install:
- IF EXIST c:\tools\php\composer (SET COMPOSER=1)
- IF %COMPOSER%==0 cinst -y php -i && cinst -y composer -i -version 4.6.0 -ia /DEV=C:\tools\php
- IF %COMPOSER%==1 composer self-update
- cd %APPVEYOR_BUILD_FOLDER%
- composer install --prefer-dist --no-progress
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- php test.php
```
Print out build dir with cached | ```yaml
build: false
shallow_clone: true
platform:
- x86
# - x64
cache:
- C:\tools\php -> appveyor.yml
init:
- SET PATH=C:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET COMPOSER=0
install:
- IF EXIST c:\tools\php\composer (SET COMPOSER=1)
- IF %COMPOSER%==0 cinst -y php -i && cinst -y composer -i -version 4.6.0 -ia /DEV=C:\tools\php
- IF %COMPOSER%==1 composer self-update
- cd %APPVEYOR_BUILD_FOLDER%
- echo %APPVEYOR_BUILD_FOLDER%
- composer install --prefer-dist --no-progress
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- php test.php
``` |
dfafbcb7-38e6-4cc7-b75a-d669cfc4a93d | {
"language": "YAML"
} | ```yaml
# Thanks for Grunt for template of this file!
# http://www.appveyor.com/docs/appveyor-yml
# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input
# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "4.0"
- nodejs_version: "5.0"
- nodejs_version: "6.0"
- nodejs_version: "7.4"
# Install scripts. (runs after repo cloning)
install:
- ps: Install-Product node $env:nodejs_version
- npm install
- npm run build
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- ps: Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
- ps: if ($env:nodejs_version -Eq "7.4") { npm run test }
- ps: powershell.exe ".\test\full\test.ps1"
# Don't actually build.
build: off
# Set build version format here instead of in the admin panel.
version: "{build}"
```
Test on Node 6, 8, and 10 | ```yaml
# Thanks for Grunt for template of this file!
# http://www.appveyor.com/docs/appveyor-yml
# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input
# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "6.0"
- nodejs_version: "8.0"
- nodejs_version: "10.0"
# Install scripts. (runs after repo cloning)
install:
- ps: Install-Product node $env:nodejs_version
- npm install
- npm run build
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- ps: Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
- ps: if ($env:nodejs_version -Eq "8.0") { npm run test }
- ps: powershell.exe ".\test\full\test.ps1"
# Don't actually build.
build: off
# Set build version format here instead of in the admin panel.
version: "{build}"
``` |
1d90b979-c2ba-4a1c-b42c-d2743ee283a1 | {
"language": "YAML"
} | ```yaml
name: Update Transitive Dependencies
on:
schedule:
- cron: '15 11 * * 1' # weekly, on Monday morning (UTC)
jobs:
update:
name: Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: remove and re-create lock file
run: |
rm package-lock.json
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.ZORGBORT_TOKEN }}
commit-message: Update Transitive Dependencies
title: Update Transitive Dependencies
body: |
- Dependency updates
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
branch: auto-update-dependencies
labels: dependencies,autoupdate
```
Apply Correct Tag to Trigger Automerge | ```yaml
name: Update Transitive Dependencies
on:
schedule:
- cron: '15 11 * * 1' # weekly, on Monday morning (UTC)
jobs:
update:
name: Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: remove and re-create lock file
run: |
rm package-lock.json
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.ZORGBORT_TOKEN }}
commit-message: Update Transitive Dependencies
title: Update Transitive Dependencies
body: |
- Dependency updates
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
branch: auto-update-dependencies
labels: dependencies,automerge
``` |
487585e9-3f4e-4a53-8440-e2a9afc7c363 | {
"language": "YAML"
} | ```yaml
# This file contains ansible variables that are used by our zuul-executors.
---
# NOTE(ianw): 2019-05 this list of clouds will grow as we provision
# new opendev.org based mirrors, but then eventually be removed once
# all are updated.
zuul_site_mirror_fqdn: >-
{%- if nodepool.region + "." + nodepool.cloud in [ "dfw.rax" ] -%}
{{ nodepool.region }}.{{ nodepool.cloud }}.opendev.org
{%- else -%}
{{ nodepool.region }}.{{ nodepool.cloud }}.openstack.org
{%- endif -%}
zuul_site_traceroute_host: opendev.org
zuul_site_image_manifest_files:
- /etc/dib-builddate.txt
- /etc/image-hostname.txt
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
bindep_command: /usr/bindep-env/bin/bindep
bindep_fallback: /usr/local/bindep-fallback/bindep-fallback.txt
```
Fix mirror hostnames after opendev migration test | ```yaml
# This file contains ansible variables that are used by our zuul-executors.
---
# NOTE(ianw): 2019-05 this list of clouds will grow as we provision
# new opendev.org based mirrors, but then eventually be removed once
# all are updated.
zuul_site_mirror_fqdn: >-
{%- if nodepool.region + "." + nodepool.cloud in [ "DFW.rax" ] -%}
mirror.{{ nodepool.region | lower }}.{{ nodepool.cloud | lower }}.opendev.org
{%- else -%}
mirror.{{ nodepool.region | lower }}.{{ nodepool.cloud | lower }}.openstack.org
{%- endif -%}
zuul_site_traceroute_host: opendev.org
zuul_site_image_manifest_files:
- /etc/dib-builddate.txt
- /etc/image-hostname.txt
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
bindep_command: /usr/bindep-env/bin/bindep
bindep_fallback: /usr/local/bindep-fallback/bindep-fallback.txt
``` |
0f35f161-7a20-453f-99a1-80472bec1b14 | {
"language": "YAML"
} | ```yaml
name: GreenKnowe Theme
type: theme
description: Theme for GreenKnowe
package: Other
core: 8.x
libraries:
- gk_theme/global-styling
base theme: bartik
regions:
header: Header
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
page_top: 'Page top'
page_bottom: 'Page bottom'
highlighted: Highlighted
featured_top: 'Featured top'
breadcrumb: Breadcrumb
content: Content
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
featured_bottom_first: 'Featured bottom first'
featured_bottom_second: 'Featured bottom second'
featured_bottom_third: 'Featured bottom third'
footer_first: 'Footer first'
footer_second: 'Footer second'
footer_third: 'Footer third'
footer_fourth: 'Footer fourth'
footer_fifth: 'Footer fifth'
```
Mark gk theme d9 compatible | ```yaml
name: GreenKnowe Theme
type: theme
description: Theme for GreenKnowe
package: Other
core_version_requirement: ^8 || ^9
libraries:
- gk_theme/global-styling
base theme: bartik
regions:
header: Header
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
page_top: 'Page top'
page_bottom: 'Page bottom'
highlighted: Highlighted
featured_top: 'Featured top'
breadcrumb: Breadcrumb
content: Content
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
featured_bottom_first: 'Featured bottom first'
featured_bottom_second: 'Featured bottom second'
featured_bottom_third: 'Featured bottom third'
footer_first: 'Footer first'
footer_second: 'Footer second'
footer_third: 'Footer third'
footer_fourth: 'Footer fourth'
footer_fifth: 'Footer fifth'
``` |
6e0cb92c-c728-40bb-84cb-2a7c095ad3af | {
"language": "YAML"
} | ```yaml
---
- pressure_level_index: '0'
part: pipes
type: ye_olde_pipe
amount: '7'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '0'
part: connectors
type: ye_olde_connector
amount: '7'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '0'
part: pipes
type: magic_pipe
amount: '7'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '1'
part: pipes
type: ye_olde_pipe
amount: '3'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '1'
part: connectors
type: magic_connector
amount: '3'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '1'
part: pipes
type: magic_pipe
amount: '3'
stakeholder: customer
building_year: '1970'
```
Fix business case calculator spec | ```yaml
---
- pressure_level_index: '0'
part: pipes
type: big_pipe
amount: '7'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '0'
part: connectors
type: big_connector
amount: '7'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '0'
part: pipes
type: small_pipe
amount: '7'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '1'
part: pipes
type: big_pipe
amount: '3'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '1'
part: connectors
type: small_connector
amount: '3'
stakeholder: customer
building_year: '1960'
- pressure_level_index: '1'
part: pipes
type: small_pipe
amount: '3'
stakeholder: customer
building_year: '1970'
``` |
6f542a2e-70c3-49cb-9ec1-dc4d9bbe54a2 | {
"language": "YAML"
} | ```yaml
- name: composer
src: geerlingguy.composer
version: 1.7.6
- name: ntp
src: geerlingguy.ntp
version: 1.6.4
- name: logrotate
src: nickhammond.logrotate
version: v0.0.5
- name: swapfile
src: oefenweb.swapfile
version: v2.0.22
- name: mailhog
src: geerlingguy.mailhog
version: 2.1.4
```
Update `oefenweb.swapfile` from Ansible Galaxy | ```yaml
- name: composer
src: geerlingguy.composer
version: 1.7.6
- name: ntp
src: geerlingguy.ntp
version: 1.6.4
- name: logrotate
src: nickhammond.logrotate
version: v0.0.5
- name: swapfile
src: oefenweb.swapfile
version: v2.0.26
- name: mailhog
src: geerlingguy.mailhog
version: 2.1.4
``` |
81bd928b-f3f6-4ef0-acd2-ac751385e279 | {
"language": "YAML"
} | ```yaml
package: github.com/beamly/go-gocd
import:
- package: github.com/urakozz/go-json-schema-generator
- package: github.com/urfave/cli
version: 1.20.0
- package: gopkg.in/yaml.v2
- package: github.com/sirupsen/logrus
version: master
testImport:
- package: github.com/goreleaser/goreleaser
version: ^0.30.0
subpackages:
- assert
```
Add version parser as dependency | ```yaml
package: github.com/beamly/go-gocd
import:
- package: github.com/urakozz/go-json-schema-generator
- package: github.com/urfave/cli
version: 1.20.0
- package: gopkg.in/yaml.v2
- package: github.com/sirupsen/logrus
version: master
- package: github.com/hashicorp/go-version
testImport:
- package: github.com/goreleaser/goreleaser
version: ^0.30.0
subpackages:
- assert
``` |
6bd820da-ff30-4f15-b446-0069fcce28ad | {
"language": "YANG"
} | ```yang
module netconf-node-inventory {
namespace "urn:opendaylight:netconf-node-inventory";
prefix "netinv";
import opendaylight-inventory { prefix inv; revision-date "2013-08-19";}
import yang-ext {prefix ext; revision-date "2013-07-09";}
revision "2014-01-08" {
description "Initial revision of Inventory model";
}
grouping netconf-node-fields {
leaf connected {
type boolean;
}
leaf-list initial-capability {
type string;
}
leaf-list current-capability {
type string;
}
}
augment /inv:nodes/inv:node {
ext:augment-identifier "netconf-node";
uses netconf-node-fields;
}
}```
Add a container for pass-through netconf access | ```yang
module netconf-node-inventory {
namespace "urn:opendaylight:netconf-node-inventory";
prefix "netinv";
import opendaylight-inventory { prefix inv; revision-date "2013-08-19";}
import yang-ext {prefix ext; revision-date "2013-07-09";}
revision "2014-01-08" {
description "Initial revision of Inventory model";
}
grouping netconf-node-fields {
leaf connected {
type boolean;
}
leaf-list initial-capability {
type string;
}
leaf-list current-capability {
type string;
}
container pass-through {
when "../connected = true";
description
"When the underlying node is connected, its NETCONF context
is available verbatim under this container through the
mount extension.";
}
}
augment /inv:nodes/inv:node {
ext:augment-identifier "netconf-node";
uses netconf-node-fields;
}
}
``` |
6035e8a5-5046-4cd6-a257-e56c6a545c5a | {
"language": "YANG"
} | ```yang
module pcep-segment-routing-app-config {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config";
prefix "pcep-segment-routing-app-config";
description
"Configuration for the PCEP segment routing extension.";
revision "2016-07-07" {
description
"Initial revision.";
}
container pcep-segment-routing-config {
leaf iana-sr-subobjects-type {
description "If false (default) SR-ERO type (=5) and SR-RRO type (=6) is used,
else proposed type (36) is used for parsing/serialization";
type boolean;
default false;
}
leaf sr-capable {
type boolean;
default true;
}
}
}```
Add description to pcep SR capability model | ```yang
module pcep-segment-routing-app-config {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config";
prefix "pcep-segment-routing-app-config";
description
"Configuration for the PCEP segment routing extension.";
revision "2016-07-07" {
description
"Initial revision.";
}
container pcep-segment-routing-config {
leaf iana-sr-subobjects-type {
description "If false (default) SR-ERO type (=5) and SR-RRO type (=6) is used,
else proposed type (36) is used for parsing/serialization";
type boolean;
default false;
}
leaf sr-capable {
description "Advertize segment-routing capability";
type boolean;
default true;
}
}
}``` |
ba24d1fe-932b-4b67-8ebb-88c696501604 | {
"language": "YANG"
} | ```yang
module opendaylight-mdsal-list-test {
namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:list";
prefix list-test;
description
"This module contains a collection of YANG definitions used for
some test cases.";
revision 2014-07-01 {
description
"Test model for testing data broker with nested lists.";
}
grouping two-level-list {
list top-level-list {
description
"Top Level List";
key "name";
leaf name {
type string;
}
list nested-list {
key "name";
leaf name {
type string;
}
leaf type {
type string;
// mandatory true;
// description
// "Mandatory type of list.";
}
ordered-by user;
description
"A list of service functions that compose the service chain";
}
}
}
container top {
uses two-level-list;
}
notification two-level-list-changed {
uses two-level-list;
}
rpc put-top {
input {
uses two-level-list;
}
}
}
```
Add get-top rpc with output to sal-test-model | ```yang
module opendaylight-mdsal-list-test {
namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:list";
prefix list-test;
description
"This module contains a collection of YANG definitions used for
some test cases.";
revision 2014-07-01 {
description
"Test model for testing data broker with nested lists.";
}
grouping two-level-list {
list top-level-list {
description
"Top Level List";
key "name";
leaf name {
type string;
}
list nested-list {
key "name";
leaf name {
type string;
}
leaf type {
type string;
// mandatory true;
// description
// "Mandatory type of list.";
}
ordered-by user;
description
"A list of service functions that compose the service chain";
}
}
}
container top {
uses two-level-list;
}
notification two-level-list-changed {
uses two-level-list;
}
rpc put-top {
input {
uses two-level-list;
}
}
rpc get-top {
output {
uses two-level-list;
}
}
}
``` |
48678c52-cffc-49f0-b7c8-fd9115e87ae5 | {
"language": "YANG"
} | ```yang
module second-tape {
namespace "http://example.com/turing-machine/tape2";
prefix "t2";
import turing-machine {
prefix "tm";
}
augment "/tm:turing-machine" {
description
"State data for the second tape.";
leaf head-position-2 {
config "false";
type tm:cell-index;
description
"Head position of the second tape.";
}
container tape-2 {
description
"Contents of the second tape.";
config "false";
uses tm:tape-cells;
}
}
augment
"/tm:turing-machine/tm:transition-function/tm:delta/tm:input" {
description
"A new input parameter.";
leaf symbol-2 {
type tm:tape-symbol;
description
"Symbol read from the second tape.";
}
}
augment
"/tm:turing-machine/tm:transition-function/tm:delta/tm:output" {
description
"New output parameters.";
leaf symbol-2 {
type tm:tape-symbol;
description
"Symbol to be written to the second tape.";
}
leaf head-move-2 {
type tm:head-dir;
description
"Move the head on the second tape one cell to the left or
right.";
}
}
augment "/tm:initialize/tm:input" {
description
"A new RPC input parameter.";
leaf tape-content-2 {
type string;
description
"Initial content of the second tape.";
}
}
}
```
Modify namespace URI in the tutorial example. | ```yang
module second-tape {
namespace "http://example.net/turing-machine/tape-2";
prefix "t2";
import turing-machine {
prefix "tm";
}
augment "/tm:turing-machine" {
description
"State data for the second tape.";
leaf head-position-2 {
config "false";
type tm:cell-index;
description
"Head position of the second tape.";
}
container tape-2 {
description
"Contents of the second tape.";
config "false";
uses tm:tape-cells;
}
}
augment
"/tm:turing-machine/tm:transition-function/tm:delta/tm:input" {
description
"A new input parameter.";
leaf symbol-2 {
type tm:tape-symbol;
description
"Symbol read from the second tape.";
}
}
augment
"/tm:turing-machine/tm:transition-function/tm:delta/tm:output" {
description
"New output parameters.";
leaf symbol-2 {
type tm:tape-symbol;
description
"Symbol to be written to the second tape.";
}
leaf head-move-2 {
type tm:head-dir;
description
"Move the head on the second tape one cell to the left or
right.";
}
}
augment "/tm:initialize/tm:input" {
description
"A new RPC input parameter.";
leaf tape-content-2 {
type string;
description
"Initial content of the second tape.";
}
}
}
``` |
8ddc83d4-0d1e-4198-82e6-bf26b8f50332 | {
"language": "YANG"
} | ```yang
module actor-system-provider-service {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service";
prefix "actor-system";
import config { prefix config; revision-date 2013-04-05; }
description "Akka actor system provider service definition";
revision "2015-10-05" {
description "Initial revision";
}
identity actor-system-provider-service {
base "config:service-type";
config:java-class "org.opendaylight.controller.cluster.ActorSystemProvider";
}
}```
Modify config Module impls to co-exist with blueprint | ```yang
module actor-system-provider-service {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service";
prefix "actor-system";
import config { prefix config; revision-date 2013-04-05; }
description "Akka actor system provider service definition";
revision "2015-10-05" {
description "Initial revision";
}
identity actor-system-provider-service {
base "config:service-type";
config:java-class "org.opendaylight.controller.cluster.ActorSystemProvider";
config:disable-osgi-service-registration;
}
}``` |
711489f0-c0fa-406d-a748-39b721bf43f0 | {
"language": "YANG"
} | ```yang
```
Add IETF YANG metadata vendored module. | ```yang
module ietf-yang-metadata {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata";
prefix "md";
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: Lou Berger
<mailto:lberger@labn.net>
WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net>
Editor: Ladislav Lhotka
<mailto:lhotka@nic.cz>";
description
"This YANG module defines an 'extension' statement that allows
for defining metadata annotations.
Copyright (c) 2016 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 7952
(http://www.rfc-editor.org/info/rfc7952); see the RFC itself
for full legal notices.";
revision 2016-08-05 {
description
"Initial revision.";
reference
"RFC 7952: Defining and Using Metadata with YANG";
}
extension annotation {
argument name;
description
"This extension allows for defining metadata annotations in
YANG modules. The 'md:annotation' statement can appear only
at the top level of a YANG module or submodule, i.e., it
becomes a new alternative in the ABNF production rule for
'body-stmts' (Section 14 in RFC 7950).
The argument of the 'md:annotation' statement defines the name
of the annotation. Syntactically, it is a YANG identifier as
defined in Section 6.2 of RFC 7950.
An annotation defined with this 'extension' statement inherits
the namespace and other context from the YANG module in which
it is defined.
The data type of the annotation value is specified in the same
way as for a leaf data node using the 'type' statement.
The semantics of the annotation and other documentation can be
specified using the following standard YANG substatements (all
are optional): 'description', 'if-feature', 'reference',
'status', and 'units'.
A server announces support for a particular annotation by
including the module in which the annotation is defined among
the advertised YANG modules, e.g., in a NETCONF <hello>
message or in the YANG library (RFC 7950). The annotation can
then be attached to any instance of a data node defined in any
YANG module that is advertised by the server.
XML encoding and JSON encoding of annotations are defined in
RFC 7952.";
}
}
``` |
86b08a25-454d-47df-b97a-1c19d28ca595 | {
"language": "Zephir"
} | ```zephir
namespace Test\BuiltIn;
class CharMethods
{
public function getHex()
{
return 'a'->toHex();
}
public function getHexForString(string str)
{
var o = "", n;
char ch;
for ch in str {
let o .= ch->toHex();
}
return o;
}
}```
Remove unused variable n in Test\BuiltIn\CharMethods::getHexForString | ```zephir
namespace Test\BuiltIn;
class CharMethods
{
public function getHex()
{
return 'a'->toHex();
}
public function getHexForString(string str)
{
var o = "";
char ch;
for ch in str {
let o .= ch->toHex();
}
return o;
}
}``` |
b009a4e5-f33f-42c4-a544-ded2defd519d | {
"language": "Zephir"
} | ```zephir
namespace Stub;
class Functions
{
/**
* @issue https://github.com/phalcon/zephir/issues/658
*/
public function filterVar1() -> bool
{
var ret;
let ret = "0";
return false === filter_var($ret, FILTER_VALIDATE_FLOAT, 20480);
}
/**
* @issue https://github.com/phalcon/zephir/issues/658
*/
public function filterVar2() -> bool
{
var ret;
let ret = "0";
return false == filter_var($ret, FILTER_VALIDATE_FLOAT, 20480);
}
}
```
Remove dollar sign in Zephir code | ```zephir
namespace Stub;
class Functions
{
/**
* @issue https://github.com/phalcon/zephir/issues/658
*/
public function filterVar1() -> bool
{
var ret;
let ret = "0";
return false === filter_var(ret, FILTER_VALIDATE_FLOAT, 20480);
}
/**
* @issue https://github.com/phalcon/zephir/issues/658
*/
public function filterVar2() -> bool
{
var ret;
let ret = "0";
return false == filter_var(ret, FILTER_VALIDATE_FLOAT, 20480);
}
}
``` |
aea14744-945e-4c41-83a1-1d2dce785569 | {
"language": "Zephir"
} | ```zephir
namespace Test;
class Test
{
public static function check()
{
var arr;
var ret;
let arr = [0, 1, 2, 3, 4, 5];
let ret = arr->rev();
var_dump(ret);
}
public static function replace()
{
var patterns = [
":any": "[^/]+",
":num": "[0-9]+",
":all": ".*"
];
var replaces, str;
var searches = [];
let str = "mystringwith:anyinside";
let searches = array_keys(patterns),
replaces = array_values(patterns);
echo str_replace(searches, replaces, str);
}
public static function param(str)
{
echo trim(str);
}
public static function div(float a)
{
return 1/a;
}
public static function testBool()
{
var ret;
let ret = strpos("something","asome");
var_dump(ret);
if (ret === 0) {
echo "invalid comparison";
} else {
echo "succesfull comparison";
}
}
}
```
Test use constant key about array | ```zephir
namespace Test;
class Test
{
public static function check()
{
var arr;
var ret;
let arr = [0, 1, 2, 3, 4, 5];
let ret = arr->rev();
var_dump(ret);
}
public static function replace()
{
var patterns = [
":any": "[^/]+",
":num": "[0-9]+",
":all": ".*"
];
var replaces, str;
var searches = [];
let str = "mystringwith:anyinside";
let searches = array_keys(patterns),
replaces = array_values(patterns);
echo str_replace(searches, replaces, str);
}
public static function param(str)
{
echo trim(str);
}
public static function div(float a)
{
return 1/a;
}
public static function testBool()
{
var ret;
let ret = strpos("something","asome");
var_dump(ret);
if (ret === 0) {
echo "invalid comparison";
} else {
echo "succesfull comparison";
}
}
public static function testArray()
{
var elements;
let elements = ["abc": 1, ABDAY_1: DAY_1, ABDAY_2: DAY_2];
var_dump(elements);
}
}
``` |
574befc5-d4dc-4fc0-b47f-5bf4201798ef | {
"language": "Zephir"
} | ```zephir
namespace Arango\Handler;
use Arango\Document\Vertex;
use Arango\Document\Document;
use Arango\Handler\DocumentHandler;
/**
* A handler that manages vertex documents
*
* @package Arango/Handler
* @class VertexHandler
* @author Lucas S. Vieira
*/
class VertexHandler extends DocumentHandler {
/**
* Intermediate function to call the createFromArray function from the right context
*
* @throws Arango\Exception\ClientException
*
* @param array $data
* @param array $options
*
* @return Arango\Document\Document
*/
public function createFromArrayWithContext(array data, array options) -> <Document> {
return Vertex::createFromArray(data, options);
}
}
```
Change return type in VertexHandler | ```zephir
namespace Arango\Handler;
use Arango\Document\Vertex;
use Arango\Handler\DocumentHandler;
/**
* A handler that manages vertex documents
*
* @package Arango/Handler
* @class VertexHandler
* @author Lucas S. Vieira
*/
class VertexHandler extends DocumentHandler {
/**
* Intermediate function to call the createFromArray function from the right context
*
* @throws Arango\Exception\ClientException
*
* @param array $data
* @param array $options
*
* @return Arango\Document\Vertex
*/
public function createFromArrayWithContext(array data, array options) -> <Vertex> {
return Vertex::createFromArray(data, options);
}
}
``` |
b3e17234-7c03-430a-ba78-04a4b0fa2487 | {
"language": "Zig"
} | ```zig
// SPDX-License-Identifier: MIT
// Copyright (c) 2015-2020 Zig Contributors
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
usingnamespace @import("bits.zig");
pub extern "ole32" fn CoTaskMemFree(pv: LPVOID) callconv(.Stdcall) void;
pub extern "ole32" fn CoUninitialize() callconv(.Stdcall) void;
pub extern "ole32" fn CoGetCurrentProcess() callconv(.Stdcall) DWORD;
pub extern "ole32" fn CoInitializeEx(pvReserved: LPVOID, dwCoInit: DWORD) callconv(.Stdcall) HRESULT;
```
Fix CoInitializeEx so it can take a null pointer | ```zig
// SPDX-License-Identifier: MIT
// Copyright (c) 2015-2020 Zig Contributors
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
usingnamespace @import("bits.zig");
pub extern "ole32" fn CoTaskMemFree(pv: LPVOID) callconv(.Stdcall) void;
pub extern "ole32" fn CoUninitialize() callconv(.Stdcall) void;
pub extern "ole32" fn CoGetCurrentProcess() callconv(.Stdcall) DWORD;
pub extern "ole32" fn CoInitializeEx(pvReserved: ?LPVOID, dwCoInit: DWORD) callconv(.Stdcall) HRESULT;
``` |
5c1c5b93-79a7-4fee-9a2d-a434c5a1f2a7 | {
"language": "Zig"
} | ```zig
const std = @import("../std.zig");
const io = std.io;
pub fn BufferedWriter(comptime buffer_size: usize, comptime WriterType: type) type {
return struct {
unbuffered_writer: WriterType,
fifo: FifoType = FifoType.init(),
pub const Error = WriterType.Error;
pub const Writer = io.Writer(*Self, Error, write);
const Self = @This();
const FifoType = std.fifo.LinearFifo(u8, std.fifo.LinearFifoBufferType{ .Static = buffer_size });
pub fn flush(self: *Self) !void {
while (true) {
const slice = self.fifo.readableSlice(0);
if (slice.len == 0) break;
try self.unbuffered_writer.writeAll(slice);
self.fifo.discard(slice.len);
}
}
pub fn writer(self: *Self) Writer {
return .{ .context = self };
}
pub fn write(self: *Self, bytes: []const u8) Error!usize {
if (bytes.len >= self.fifo.writableLength()) {
try self.flush();
return self.unbuffered_writer.write(bytes);
}
self.fifo.writeAssumeCapacity(bytes);
return bytes.len;
}
};
}
pub fn bufferedWriter(underlying_stream: anytype) BufferedWriter(4096, @TypeOf(underlying_stream)) {
return .{ .unbuffered_writer = underlying_stream };
}
```
Stop using LinearFifo in BufferedWriter | ```zig
const std = @import("../std.zig");
const io = std.io;
const mem = std.mem;
pub fn BufferedWriter(comptime buffer_size: usize, comptime WriterType: type) type {
return struct {
unbuffered_writer: WriterType,
buf: [buffer_size]u8 = undefined,
end: usize = 0,
pub const Error = WriterType.Error;
pub const Writer = io.Writer(*Self, Error, write);
const Self = @This();
pub fn flush(self: *Self) !void {
try self.unbuffered_writer.writeAll(self.buf[0..self.end]);
self.end = 0;
}
pub fn writer(self: *Self) Writer {
return .{ .context = self };
}
pub fn write(self: *Self, bytes: []const u8) Error!usize {
if (self.end + bytes.len > self.buf.len) {
try self.flush();
if (bytes.len > self.buf.len)
return self.unbuffered_writer.write(bytes);
}
mem.copy(u8, self.buf[self.end..], bytes);
self.end += bytes.len;
return bytes.len;
}
};
}
pub fn bufferedWriter(underlying_stream: anytype) BufferedWriter(4096, @TypeOf(underlying_stream)) {
return .{ .unbuffered_writer = underlying_stream };
}
``` |
5f4a63b2-cb14-4092-8862-f30af91d90c8 | {
"language": "Zig"
} | ```zig
const Builder = @import("std").build.Builder;
pub fn build(b: &Builder) {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("YOUR_NAME_HERE", "src/main.zig");
exe.setBuildMode(mode);
b.default_step.dependOn(&exe.step);
b.installArtifact(exe);
}
```
Fix build template to match build runner changes | ```zig
const Builder = @import("std").build.Builder;
pub fn build(b: &Builder) -> %void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("YOUR_NAME_HERE", "src/main.zig");
exe.setBuildMode(mode);
b.default_step.dependOn(&exe.step);
b.installArtifact(exe);
}
``` |
af99a112-cb29-4894-80b3-7c9341427d17 | {
"language": "Zig"
} | ```zig
const std = @import("../std.zig");
usingnamespace std.c;
extern "c" fn __error() *c_int;
pub const _errno = __error;
pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize;
pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;
```
Add missing C dl_iterate_phdr function for FreeBSD | ```zig
const std = @import("../std.zig");
usingnamespace std.c;
extern "c" fn __error() *c_int;
pub const _errno = __error;
pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize;
pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;
pub const dl_iterate_phdr_callback = extern fn (info: *dl_phdr_info, size: usize, data: ?*c_void) c_int;
pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*c_void) c_int;
``` |