Skip to content

Commit d685bc1

Browse files
authored
Update to Ansible 2.21.1 and add CI support (#7)
- Updated ansible to 2.21.1, pants, pex, pbs
1 parent e14ac95 commit d685bc1

8 files changed

Lines changed: 277 additions & 123 deletions

File tree

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Documentation for all configuration options is here:
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "github-actions"
7+
cooldown:
8+
default-days: 7
9+
directory: "/"
10+
groups:
11+
gha-deps:
12+
patterns:
13+
- "*"
14+
schedule:
15+
interval: "monthly"

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_call:
8+
outputs:
9+
artifact-name:
10+
description: The name of the uploaded artifacts
11+
value: ${{ jobs.build.outputs.artifact-name }}
12+
artifact-path:
13+
description: The path of the uploaded artifacts
14+
value: ${{ jobs.build.outputs.artifact-path }}
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
build:
22+
name: Checkout and build
23+
runs-on: macos-latest
24+
outputs:
25+
artifact-name: ${{ steps.define-vars.outputs.artifact-name }}
26+
artifact-path: ${{ steps.define-vars.outputs.artifact-path }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v6
30+
31+
- name: Define output vars
32+
id: define-vars
33+
run: |
34+
echo "artifact-name=pantsible" >> "$GITHUB_OUTPUT"
35+
echo "artifact-path=dist/pantsible-*" >> "$GITHUB_OUTPUT"
36+
37+
- uses: pantsbuild/actions/init-pants@8c037ac70a2cf031e8278af07d1d04732177684d
38+
with:
39+
# cache0 makes it easy to bust the cache if needed
40+
gha-cache-key: v0
41+
named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }}
42+
43+
- name: Bootstrap Pants
44+
run: |
45+
pants --version
46+
47+
- name: Create packages
48+
run: |
49+
pants package ::
50+
51+
- name: Upload artifacts
52+
id: upload-artifact
53+
if: ${{ github.event_name == 'workflow_dispatch' }}
54+
uses: actions/upload-artifact@v7
55+
with:
56+
name: ${{ steps.define-vars.outputs.artifact-name }}
57+
path: ${{ steps.define-vars.outputs.artifact-path }}
58+
retention-days: 7

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: The release version to create (e.g. 1.2.3).
7+
required: true
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
15+
determine-version:
16+
name: Validate sanity check the requested version
17+
runs-on: ubuntu-latest
18+
outputs:
19+
release-version: ${{ steps.determine-version.outputs.release-version }}
20+
steps:
21+
- name: Determine release version
22+
id: determine-version
23+
run: |
24+
version="${{ inputs.version }}"
25+
26+
if [[ -z "$version" ]]; then
27+
echo "::error::An input 'version' must be specified"
28+
exit 1
29+
30+
elif (( ${#version} > 7 )); then
31+
echo "::error::The input 'version' must be smaller than 8 characters (i.e. allows '2.99.99')"
32+
exit 1
33+
34+
elif [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35+
echo "::error::The input version '${version}' must be of the form MAJOR.MINOR.PATCH (8.9.10)"
36+
exit 1
37+
fi
38+
39+
echo "::notice::Release version is: ${version}"
40+
echo "release-version=${version}" >> $GITHUB_OUTPUT
41+
42+
run-ci:
43+
needs: determine-version
44+
uses: ./.github/workflows/ci.yml
45+
46+
github-release:
47+
name: Create a Github Release with build provenance attestations
48+
runs-on: ubuntu-latest
49+
needs:
50+
- determine-version
51+
- run-ci
52+
permissions:
53+
attestations: write
54+
contents: write
55+
id-token: write
56+
57+
steps:
58+
- name: Download artifacts
59+
uses: actions/download-artifact@v8
60+
with:
61+
name: ${{ needs.run-ci.outputs.artifact-name }}
62+
63+
- name: Generate
64+
env:
65+
GH_TOKEN: ${{ github.token }}
66+
RELEASE_VERSION: ${{ steps.determine-version.outputs.release-version }}
67+
ARTIFACT_PATH: ${{ needs.run-ci.outputs.artifact-path }}
68+
run: |
69+
gh release create \
70+
"${RELEASE_VERSION}" \
71+
"${ARTIFACT_PATH}" \
72+
--fail-on-no-commits \
73+
--generate-notes \
74+
--repo sureshjoshi/pantsible
75+
76+
- name: Generate ${{ needs.determine-version.outputs.release-version }} build provenance attestations
77+
uses: actions/attest@v4
78+
with:
79+
subject-path: ${{ needs.run-ci.outputs.artifact-path }}
80+

build-support/lockfiles/python-default.lock

Lines changed: 96 additions & 117 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"version": 5,
2+
"version": 8,
33
"valid_for_interpreter_constraints": [
44
"CPython==3.14.*"
55
],
66
"generated_with_requirements": [
7-
"ansible-core==2.20.0"
7+
"ansible-core==2.21.1"
88
],
99
"manylinux": "manylinux2014",
1010
"requirement_constraints": [],
@@ -13,5 +13,10 @@
1313
"excludes": [],
1414
"overrides": [],
1515
"sources": [],
16+
"lock_style": "universal",
17+
"complete_platforms": [],
18+
"uploaded_prior_to": null,
19+
"lockfile_format": "pex",
20+
"resolve": "python-default",
1621
"description": "This lockfile was generated by Pants. To regenerate, run: pants generate-lockfiles --resolve=python-default"
1722
}

lift.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@ platforms = [
88
# "macos-x86_64",
99
]
1010

11+
#[lift.ptex]
12+
#version = "1.7.0"
13+
14+
#[lift.scie_jump]
15+
#version = "1.11.2"
16+
1117
[[lift.interpreters]]
1218
id = "cpython"
19+
#flavor = "install_only_stripped"
1320
provider = "PythonBuildStandalone"
14-
release = "20251031"
15-
version = "3.14.0"
21+
release = "20260610"
22+
version = "3.14.6"
1623

1724
[[lift.files]]
1825
name = ":pex"

pants.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[GLOBAL]
2-
pants_version = "2.31.0.dev0"
2+
pants_version = "2.32.0"
33
pantsd = true
44
pants_ignore_use_gitignore = false
55
plugins = ["robotpajamas.pants.scie==0.1.1"]
66

77
backend_packages = [
88
"pants.backend.python",
9+
"pants.backend.python.providers.experimental.python_build_standalone",
910
"experimental.scie"
1011
]
1112
build_patterns = ["BUILD.pants", "BUILD"]
@@ -19,5 +20,14 @@ separate_lockfile_metadata_file = true
1920
[python.resolves]
2021
python-default = "build-support/lockfiles/python-default.lock"
2122

23+
[pex-cli]
24+
version = "v2.96.0"
25+
known_versions = [
26+
"v2.96.0|linux_arm64|7d51fc3c979f94ff4898f4d3ef8405b34a5988ffbee6ec4627946cfda154e0fc|5125572",
27+
"v2.96.0|linux_x86_64|7d51fc3c979f94ff4898f4d3ef8405b34a5988ffbee6ec4627946cfda154e0fc|5125572",
28+
"v2.96.0|macos_arm64|7d51fc3c979f94ff4898f4d3ef8405b34a5988ffbee6ec4627946cfda154e0fc|5125572",
29+
"v2.96.0|macos_x86_64|7d51fc3c979f94ff4898f4d3ef8405b34a5988ffbee6ec4627946cfda154e0fc|5125572",
30+
]
31+
2232
[anonymous-telemetry]
2333
enabled = false

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ansible-core==2.20.0
1+
ansible-core==2.21.1

0 commit comments

Comments
 (0)