Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Commit

Permalink
Version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaerlocher authored Aug 8, 2019
2 parents 17ed303 + 2b41112 commit 0a5daf5
Show file tree
Hide file tree
Showing 21 changed files with 592 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
language: python
python: '3.6'

# Use the new container infrastructure
sudo: false

# Install ansible
addons:
apt:
packages:
- python-pip

install:
# Install ansible
- pip install ansible

# Install ansible-lint
- pip install ansible-lint

# Install yamllint
- pip install yamllint

# Install tests rules
- git submodule add https://github.com/arillso/tests tests

before_script:
# Check ansible version
- ansible --version

# Check ansible-lint version
- ansible-lint --version

# Check ansible-lint version
- yamllint --version

script:
# Ansible Lint check
- ansible-lint .

# YAML Lint check
- yamllint .

notifications:
email:
on_success: never
on_failure: always
6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: default

rules:
line-length:
max: 160
level: warning
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
and [human-readable changelog](https://keepachangelog.com/en/1.0.0/).

## 0.1.0

### Added

- Initial release
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## Makefile to build a Chocolatey package with chocomilk

## CUSTOMIZATION ###############################################################
#

# Ansible playbook repository which contains the playbook referenced
ANSIBLE_PLAYBOOK_REPO ?= https://github.com/itigoag/chocomilk.git

# Ansible before provisioning playbook
ANSIBLE_PLAYBOOK_BEFORE ?= chocomilk/before.yml

# Ansible provisioning playbook
ANSIBLE_PLAYBOOK ?= chocomilk/play.yml

.PHONY: all

all: clone \
hosts \
travis \
play

before: clone \
hosts \
travis

clone:
@git clone $(ANSIBLE_PLAYBOOK_REPO) chocomilk 2>&1

hosts:
@echo "chocomilk" > hosts

travis:
ansible-playbook $(ANSIBLE_PLAYBOOK_BEFORE) -i hosts

play:
ansible-playbook $(ANSIBLE_PLAYBOOK) -i hosts

debug:
ansible-playbook $(ANSIBLE_PLAYBOOK) -i hosts -vvvvv

package:
ansible-playbook $(ANSIBLE_PLAYBOOK) -i hosts --skip-tags "deployment,notifications"

package-debug:
ansible-playbook $(ANSIBLE_PLAYBOOK) -i hosts --skip-tags "deployment,notifications" -vvvvv
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Chocomilk

[![Build Status](https://img.shields.io/travis/itigoag/chocomilk?style=flat-square)](https://travis-ci.org/itigoag/chocomilk) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=popout-square)](licence)

Chocomilk is an autoupdater for Chocolatey Packages. The tool is built with Ansible and runs in the common CI Piplines.

## Credits

- Images by [macrovector / Freepik](http://www.freepik.co)
28 changes: 28 additions & 0 deletions before.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- name: 'before chocomilk'
hosts: chocomilk
connection: local
gather_facts: false
tasks:
- name: 'install python3-apt'
become: true
shell: apt install -y python3-apt

- name: 'install apt package'
become: true
apt:
state: latest
name:
- python-pip
- libxml2
- libxml2-dev
- libxslt-dev
- python-dev
update_cache: true

- name: 'install pip package'
become: true
pip:
name:
- docker
- lxml
17 changes: 17 additions & 0 deletions deploy/chocolatey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: '{{ package_id }} : Upload Package to {{ loop_deploy.repository }}'
become: true
docker_container:
auto_remove: true
name: choco_push
image: 'linuturk/mono-choco'
command: push "{{ nupkg }}" --source "'{{ repository }}'" -k="'{{ key }}'"
working_dir: '{{ pwd }}'
volumes:
- '{{ pwd }}:{{ pwd }}'
vars:
nupkg: '{{ path_package }}/{{ package_id }}.{{ version }}.nupkg'
repository: '{{ loop_deploy.repository }}'
key: '{{ loop_deploy.key }}'
tags:
- deployment
40 changes: 40 additions & 0 deletions deploy/github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
- name: '{{ package_id }} : git config e-mail'
shell: 'git config --global user.email "{{ loop_deploy.email }}"'
tags:
- deployment

- name: '{{ package_id }} : git config name'
shell: 'git config --global user.name "{{ loop_deploy.name }}"'
tags:
- deployment

- name: '{{ package_id }} : git config safecrlf'
shell: 'git config --global core.safecrlf false'
tags:
- deployment

- name: '{{ package_id }} : git add files'
shell: 'git --git-dir={{ path_package }}/.git/ --work-tree={{ path_package }}/ add .'
tags:
- deployment

- name: '{{ package_id }} : git commit'
shell: "git --git-dir={{ path_package }}/.git/ --work-tree={{ path_package }}/ commit -m 'chocomilk: Update to {{ version }}'"
tags:
- deployment

- name: '{{ package_id }} : remove origin'
shell: git --git-dir={{ path_package }}/.git/ --work-tree={{ path_package }}/ remote remove origin
tags:
- deployment

- name: '{{ package_id }} : add origin'
shell: 'git --git-dir={{ path_package }}/.git/ --work-tree={{ path_package }}/ remote add origin https://{{ loop_deploy.key }}@{{ loop_deploy.url }}'
tags:
- deployment

- name: '{{ package_id }} : push'
shell: 'git --git-dir={{ path_package }}/.git/ --work-tree={{ path_package }}/ push origin HEAD:master'
tags:
- deployment
117 changes: 117 additions & 0 deletions docs/_css/css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Properties
:root {
// App
// =========================================================================
// Monochrome
--mono-hue : 201;
--mono-saturation : 18%;

// Monochrome shades (darker) and tints (lighter)
--mono-shade3 : hsl(var(--mono-hue), var(--mono-saturation), 13%);
--mono-shade2 : hsl(var(--mono-hue), var(--mono-saturation), 15%);
--mono-shade1 : hsl(var(--mono-hue), var(--mono-saturation), 17%);
--mono-base : hsl(var(--mono-hue), var(--mono-saturation), 19%);
--mono-tint1 : hsl(var(--mono-hue), var(--mono-saturation), 25%);
--mono-tint2 : hsl(var(--mono-hue), var(--mono-saturation), 35%);
--mono-tint3 : hsl(var(--mono-hue), var(--mono-saturation), 43%);

// Spinner
--spinner-track-color : rgba(255, 255, 255, 0.15);


// Base
// =========================================================================
--base-background-color : var(--mono-base);
--base-color : #d3d3d3;

// Horizontal Rule
--hr-border : 1px solid var(--mono-tint2);

// Mark
--mark-background : #ffff6b;
--mark-color : var(--base-background-color);


// Content
// =========================================================================
// Blockquote
--blockquote-background : var(--mono-shade2);

// Code
--code-inline-background : var(--mono-tint1);
--code-theme-background : var(--mono-shade2);

// Headings
--heading-color : #fff;
--heading-h2-border-color : var(--mono-tint2);

// Keyboard
--kbd-background : var(--mono-shade2);
--kbd-border : none;
--kbd-color : var(--strong-color);

// Notice - Important
--notice-important-background : var(--mono-shade2);

// Notice - Tip
--notice-tip-background : var(--mono-shade2);

// Tables
--table-cell-border-color : var(--mono-tint1);
--table-row-odd-background : var(--mono-shade2);


// Cover
// =========================================================================
// Background
--cover-background-color : var(--base-background-color);
--cover-background-image : radial-gradient(ellipse at center bottom, var(--mono-tint3), transparent);

// Blockquote (Subtitle)
--cover-blockquote-color : var(--mark-background);

// Buttons
--cover-button-border : 1px solid var(--mono-tint3);
--cover-button-color : #fff;


// Navbar
// =========================================================================
// Menus
--navbar-menu-background : var(--mono-tint1);
--navbar-menu-box-shadow : rgba(0,0,0,0.05) 0px 0px 1px, rgba(0,0,0,0.05) 0px 1px 2px, rgba(0,0,0,0.05) 0px 2px 4px, rgba(0,0,0,0.05) 0px 4px 8px, rgba(0,0,0,0.05) 0px 8px 16px, rgba(0,0,0,0.05) 0px 16px 32px;


// Plugin: Copy Code
// =========================================================================
--copycode-background : var(--mono-tint1);
--copycode-color : #fff;


// Plugin: Pagination
// =========================================================================
--pagination-border-top : 1px solid var(--mono-tint2);
--pagination-title-color : #fff;


// Plugin: Search
// =========================================================================
// Input
--search-input-background-color : var(--mono-shade2);
--search-input-background-image : #{svg-data-uri('<svg height="20px" width="20px" viewBox="0 0 24 24" fill="none" stroke="rgba(255, 255, 255, 0.3)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg"><circle cx="10.5" cy="10.5" r="7.5" vector-effect="non-scaling-stroke"></circle><line x1="21" y1="21" x2="15.8" y2="15.8" vector-effect="non-scaling-stroke"></line></svg>')};
--search-input-border-color : var(--mono-tint1);
--search-input-placeholder-color : rgba(255, 255, 255, 0.4);

// Clear Button
--search-clear-icon-color1 : rgba(255, 255, 255, 0.3);


// Sidebar
// =========================================================================
--sidebar-background : var(--mono-shade1);
--sidebar-border-color : var(--mono-tint1);
--sidebar-width : 0rem;

// Nav Page Links
--sidebar-nav-pagelink-background-image: #{chevron-data-uri(right, 7px, null, 1.5, #495d68)};
}
Binary file added docs/_images/chocomilk.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/ci/gitlab-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# gitlab-ci
1 change: 1 addition & 0 deletions docs/ci/travis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# travis
42 changes: 42 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Arillso</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta
name="description"
content="Chocomilk is an autoupdater for Chocolatey Packages"
/>
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<link
rel="stylesheet"
href="//unpkg.com/docsify-themeable/dist/css/theme-simple-dark.css"
/>
<link rel="stylesheet" href="_css/css.scss" />
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
coverpage: false,
loadSidebar: true,
name: 'Project chocomilk',
repo: 'itigoag/chocomilk',
// routerMode: 'history',
basePath: '/',
homepage:
'https://raw.githubusercontent.com/itigoag/chocomilk/master/README.md',
auto2top: true,
maxLevel: 3,
subMaxLevel: 3
};
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify-themeable"></script>
<script src="//unpkg.com/docsifyfooter/dist/docsifyfooter.min.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions docs/milk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# milk
12 changes: 12 additions & 0 deletions notifications/mattermost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: 'Send notification to {{ loop_notifications.url }}'
mattermost:
url: '{{ loop_notifications.url }}'
api_key: '{{ loop_notifications.key }}'
text: '{{ package_id }} has been updated to version {{ version }}'
channel: '{{ loop_notifications.channel }}'
username: 'chocomilk'
icon_url: 'https://rawcdn.githack.com/itigoag/chocomilk/3ee96aed4195f465e2927bab9e96ce0fb1364cb5/docs/_images/chocomilk.jpg'
delegate_to: localhost
tags:
- notifications
Loading

0 comments on commit 0a5daf5

Please sign in to comment.