Skip to content

Commit 125a29d

Browse files
committed
Merge branch 'master' of github.com:HariSekhon/DevOps-Python-tools
2 parents 2b0d1d1 + e041450 commit 125a29d

File tree

13 files changed

+157
-22
lines changed

13 files changed

+157
-22
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313

1414
---
15-
name: Mac 10.15
15+
name: Mac 11
1616

1717
on:
1818
push:
@@ -80,6 +80,6 @@ jobs:
8080
name: Build
8181
uses: HariSekhon/GitHub-Actions/.github/workflows/make.yaml@master
8282
with:
83-
runs-on: macos-10.15
83+
runs-on: macos-11
8484
caches: brew pip cpanm
8585
debug: ${{ github.event.inputs.debug }}

.github/workflows/mac_12.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#
2+
# Author: Hari Sekhon
3+
# Date: Tue Feb 4 09:53:28 2020 +0000
4+
#
5+
# vim:ts=2:sts=2:sw=2:et
6+
#
7+
# https://github.com/HariSekhon/DevOps-Python-tools
8+
#
9+
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback
10+
#
11+
# https://www.linkedin.com/in/HariSekhon
12+
#
13+
14+
---
15+
name: Mac 12
16+
17+
on:
18+
push:
19+
branches:
20+
- master
21+
paths-ignore:
22+
- '**/*.md'
23+
- '.github/workflows/*'
24+
- '!.github/workflows/alpine.yaml'
25+
- '**/Dockerfile'
26+
- '**/Jenkinsfile'
27+
- '**/.envrc*'
28+
- .checkov.yaml
29+
- .dockerignore
30+
- .gcloudignore
31+
- .editorconfig
32+
- '.gitconfig*'
33+
- .gitignore
34+
- .grype.yaml
35+
- .hound.yml
36+
- .terraformignore
37+
- Jenkinsfile
38+
- .appveyor.yml
39+
- .buildkite/pipeline.yml
40+
- .circleci/config.yml
41+
- .cirrus.yml
42+
- .concourse.yml
43+
- .drone.yml
44+
- .gitlab-ci.yml
45+
- .gocd.yml
46+
- .scrutinizer.yml
47+
- .semaphore/semaphore.yml
48+
- .travis.yml
49+
- .werckerignore
50+
- azure-pipelines.yml
51+
- bitbucket-pipelines.yml
52+
- buddy.yml
53+
- buildspec.yml
54+
- cloudbuild.yaml
55+
- codefresh.yml
56+
- codeship.yml
57+
- shippable.yml
58+
- wercker.yml
59+
workflow_dispatch:
60+
inputs:
61+
debug:
62+
type: boolean
63+
required: false
64+
default: false
65+
schedule:
66+
- cron: '0 7 * * *'
67+
68+
permissions:
69+
contents: read
70+
71+
concurrency:
72+
group: ${{ github.ref }}-${{ github.workflow }}
73+
cancel-in-progress: true
74+
75+
jobs:
76+
build:
77+
# github.event.repository context not available in scheduled workflows
78+
#if: github.event.repository.fork == false
79+
if: github.repository_owner == 'HariSekhon'
80+
name: Build
81+
uses: HariSekhon/GitHub-Actions/.github/workflows/make.yaml@master
82+
with:
83+
runs-on: macos-12
84+
caches: brew pip cpanm
85+
debug: ${{ github.event.inputs.debug }}

.semaphore/semaphore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# https://docs.semaphoreci.com/reference/pipeline-yaml-reference/
1717

1818
version: v1.0
19-
name: devops-python-tools
19+
name: DevOps-Python-tools
2020
agent:
2121
machine:
2222
type: e1-standard-2
@@ -90,7 +90,7 @@ blocks:
9090
# - for version in $(rbenv versions | grep -v system | sed 's/^\*//'); do yes | rbenv uninstall "$version"; rbenv install "$version"; done
9191
#
9292
# fix for python vs pip version mismatch
93-
- ln -svf /usr/local/bin/python3 /usr/local/bin/python
93+
- ln -svf -- /usr/local/bin/python3 /usr/local/bin/python
9494
jobs:
9595
- name: build
9696
commands:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@
8484
[![Docker Build (Ubuntu)](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/docker_pytools_ubuntu.yaml/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/docker_pytools_ubuntu.yaml)
8585

8686
[![GitHub Actions Ubuntu](https://github.com/HariSekhon/DevOps-Python-tools/workflows/GitHub%20Actions%20Ubuntu/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions?query=workflow%3A%22GitHub+Actions+Ubuntu%22)
87-
[![Mac](https://github.com/HariSekhon/DevOps-Python-tools/workflows/Mac/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions?query=workflow%3A%22Mac%22)
88-
[![Mac 10.15](https://github.com/HariSekhon/DevOps-Python-tools/workflows/Mac%2010.15/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions?query=workflow%3A%22Mac+10.15%22)
87+
[![Mac](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/mac.yaml/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/mac.yaml)
88+
[![Mac 11](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/mac_11.yaml/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/mac_11.yaml)
89+
[![Mac 12](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/mac_12.yaml/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions/workflows/mac_12.yaml)
8990
[![Ubuntu](https://github.com/HariSekhon/DevOps-Python-tools/workflows/Ubuntu/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions?query=workflow%3A%22Ubuntu%22)
9091
[![Ubuntu 14.04](https://github.com/HariSekhon/DevOps-Python-tools/workflows/Ubuntu%2014.04/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions?query=workflow%3A%22Ubuntu+14.04%22)
9192
[![Ubuntu 16.04](https://github.com/HariSekhon/DevOps-Python-tools/workflows/Ubuntu%2016.04/badge.svg)](https://github.com/HariSekhon/DevOps-Python-tools/actions?query=workflow%3A%22Ubuntu+16.04%22)

azure-pipelines.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,13 @@ steps:
4545
# displayName: test
4646

4747
# hacky workaround to Azure Pipelines ubuntu environment limitations of unprivileged container and no /dev/stderr in vmImage :-(
48-
- script: sudo docker run -v "$PWD":/code ubuntu:18.04 /bin/bash -c 'set -ex && cd /code && setup/ci_bootstrap.sh && make init && make ci test'
48+
- script: |
49+
sudo docker run -v "$PWD":/code ubuntu:18.04 /bin/bash -c '
50+
set -ex
51+
cd /code
52+
setup/ci_bootstrap.sh
53+
setup/ci_git_set_dir_safe.sh
54+
make init
55+
make ci test
56+
'
4957
displayName: docker build

bash-tools

Submodule bash-tools updated 294 files

codeship.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
---
4545
install:
4646
# these cause package installation breakages due to GPG or 403 errors, old addresses etc.
47-
- sudo rm -fv /etc/apt/sources.list.d/cli_assets_heroku_com_branches_stable_apt.list
48-
- sudo rm -fv /etc/apt/sources.list.d/apache_bintray_com_couchdb_deb.list
49-
- sudo rm -fv /etc/apt/sources.list.d/www_apache_org_dist_cassandra_debian.list
47+
- sudo rm -fv -- /etc/apt/sources.list.d/cli_assets_heroku_com_branches_stable_apt.list
48+
- sudo rm -fv -- /etc/apt/sources.list.d/apache_bintray_com_couchdb_deb.list
49+
- sudo rm -fv -- /etc/apt/sources.list.d/www_apache_org_dist_cassandra_debian.list
5050
- make
5151
#before_script:
5252
# - somecommand

setup/bootstrap.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515

1616
# Alpine / Wget:
1717
#
18-
# wget -O- https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh | sh
18+
# wget -O- https://raw.githubusercontent.com/HariSekhon/DevOps-Python-tools/master/setup/bootstrap.sh | sh
1919
#
2020
# Curl:
2121
#
22-
# curl https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh | sh
22+
# curl https://raw.githubusercontent.com/HariSekhon/DevOps-Python-tools/master/setup/bootstrap.sh | sh
2323

2424
set -eu
2525
[ -n "${DEBUG:-}" ] && set -x
2626
srcdir="$(dirname "$0")"
2727

2828
repo="https://github.com/HariSekhon/DevOps-Python-tools"
2929

30-
directory="python-tools"
30+
directory="pytools"
3131

3232
sudo=""
3333
[ "$(whoami)" = "root" ] || sudo=sudo
@@ -81,4 +81,6 @@ else
8181
fi
8282
fi
8383

84-
make
84+
if [ -z "${NO_MAKE:-}" ]; then
85+
make
86+
fi

setup/ci_git_set_dir_safe.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
# vim:ts=4:sts=4:sw=4:et
3+
#
4+
# Author: Hari Sekhon
5+
# Date: 2022-08-03 20:07:09 +0100 (Wed, 03 Aug 2022)
6+
#
7+
# https://github.com/HariSekhon/DevOps-Python-tools
8+
#
9+
# License: see accompanying Hari Sekhon LICENSE file
10+
#
11+
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
12+
#
13+
# https://www.linkedin.com/in/HariSekhon
14+
#
15+
16+
# Necessary for some CI/CD systems like Azure DevOps Pipelines which have incorrect ownership on the git checkout dir triggering this error:
17+
#
18+
# fatal: detected dubious ownership in repository at '/code/sql'
19+
20+
# standalone script without lib dependency so it can be called directly from bootstrapped CI before submodules, since that is the exact problem that needs to be solved to allow CI/CD systems with incorrect ownership of the checkout directory to be able to checkout the necessary git submodules
21+
22+
set -euo pipefail
23+
[ -n "${DEBUG:-}" ] && set -x
24+
srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
25+
26+
dir="${1:-$srcdir/..}"
27+
28+
cd "$dir"
29+
30+
echo "Setting directory as safe: $PWD"
31+
git config --global --add safe.directory "$PWD"
32+
33+
while read -r submodule_dir; do
34+
dir="$PWD/$submodule_dir"
35+
echo "Setting directory as safe: $dir"
36+
git config --global --add safe.directory "$dir"
37+
done < <(git submodule | awk '{print $2}')
38+
39+
echo "Done"

0 commit comments

Comments
 (0)