-
Notifications
You must be signed in to change notification settings - Fork 14
83 lines (82 loc) · 2.93 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Continuous Deployment
on: [push]
jobs:
build-n-publish-docker:
name: Build and publish CCO to DockerHub
runs-on: ubuntu-latest
services:
docker:
image: docker
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pip
run: |
python -m pip install --upgrade pip
## TODO: Bring me Back. Builds started failing cause of https://github.com/kubernetes/minikube/issues/7903
# - name: minikube
# env:
# K8_PROVIDER: minikube
# K8_VERSION: v1.16.0
# CHANGE_MINIKUBE_NONE_USER: true
# CCO_INTERACTIVE_CI: interactive.yaml
# run: |
# pip install -e .
# bash .travis.sh install-tools
# minikube config set cpus 4 && minikube config set memory 8192 && minikube config set vm-driver none && minikube config set kubernetes-version "${K8_VERSION}"
# sudo minikube start --memory=4976mb
# sudo chown -R $USER $HOME/.kube $HOME/.minikube
# echo Checking helm
# ckan-cloud-operator cluster initialize --cluster-provider=minikube
# sleep 60 && kubectl get ns && kubectl get pods -n ckan-cloud
# ckan-cloud-operator ckan instance create helm --instance-id a-ckan-instance --instance-name a-ckan-instance --update sample-values/values.datagov.yaml
# minikube delete
- name: Deploy
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
TRAVIS_REPO_SLUG: ${{ secrets.TRAVIS_REPO_SLUG }}
HELM_VERSION: v3.5.2
run: |
mkdir $HOME/bin
curl -L https://raw.githubusercontent.com/datopian/travis-ci-operator/master/travis_ci_operator.sh > $HOME/bin/travis_ci_operator.sh
bash $HOME/bin/travis_ci_operator.sh init
$HOME/bin/travis_ci_operator.sh docker-login
bash .travis.sh install
bash .travis.sh script
$HOME/bin/travis_ci_operator.sh docker-login
bash .travis.sh deploy
build-n-publish-pypy:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Build and publish CCO to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish CCO to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}