Skip to content

Commit 08ada53

Browse files
committed
fix: upgrade ansible version, address test and lint errors
1 parent c15b472 commit 08ada53

File tree

216 files changed

+4394
-4262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+4394
-4262
lines changed

.github/workflows/ansible-integration-tests.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: "Run integration tests for the cloud.google collection"
1+
---
2+
name: Run integration tests for the cloud.google collection
23
on:
34
pull_request: {}
45
push:
56
branches: master
67
env:
7-
GCP_SERVICE_ACCOUNT: "[email protected]"
8-
GCP_PROJECT: "ansible-gcp-ci"
8+
GCP_SERVICE_ACCOUNT: [email protected]
9+
GCP_PROJECT: ansible-gcp-ci
910
GCP_FOLDER_ID: "542027184392"
1011
jobs:
1112
integration:
@@ -31,7 +32,7 @@ jobs:
3132
- name: Set up Python
3233
uses: actions/setup-python@v1
3334
with:
34-
python-version: '3.9' # this is the minimum version required for Ansible 2.13
35+
python-version: "3.9" # this is the minimum version required for Ansible 2.13
3536
- name: Install dependencies
3637
run: pip install -r requirements.txt
3738
- name: Install ansible-base (${{ matrix.ansible_version }})
@@ -55,15 +56,15 @@ jobs:
5556
env:
5657
CI_SERVICE_ACCOUNT_FILE_CONTENTS: ${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}
5758
with:
58-
service_account: "$GCP_SERVICE_ACCOUNT"
59-
credentials_json: "${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}"
59+
service_account: $GCP_SERVICE_ACCOUNT
60+
credentials_json: ${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}
6061
- name: Set up Cloud SDK
6162
uses: google-github-actions/setup-gcloud@v1
6263
- name: Run cleanup
63-
run: |
64+
run: |
6465
./scripts/bootstrap-project.sh $GCP_PROJECT $GCP_SERVICE_ACCOUNT
6566
./scripts/cleanup-project.sh $GCP_PROJECT $GCP_FOLDER_ID
6667
# run tests
6768
- name: Run integration tests
6869
# Add the -vvv flag to print out more output
69-
run: ansible-test integration -v --color --python 3.9 --venv-system-site-packages
70+
run: ansible-test integration -v --color --python 3.9 --venv-system-site-packages

.github/workflows/ansible-test.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: "Run tests for the cloud.google collection"
1+
---
2+
name: Run tests for the cloud.google collection
23
on: [pull_request]
34
env:
45
PYTHON_VERSION: "3.9" # minimum version for Ansible 2.14
@@ -58,12 +59,12 @@ jobs:
5859
- name: Set up Python
5960
uses: actions/setup-python@v1
6061
with:
61-
python-version: "${{ env.PYTHON_VERSION }}"
62+
python-version: ${{ env.PYTHON_VERSION }}
6263
- name: Install dependencies
6364
run: pip install -r requirements.txt
6465
- name: Install test dependencies
6566
run: pip install -r requirements-test.txt
6667
- name: Install ansible-base (${{ matrix.ansible_version }})
6768
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
6869
- name: Run unit tests
69-
run: ansible-test units -v --color --python "$PYTHON_VERSION"
70+
run: ansible-test units -v --color --python "$PYTHON_VERSION"

.github/workflows/automationhub.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1+
---
12
name: Upload release to Automation Hub
23

34
on:
45
release:
56
types: [created]
6-
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up Python
13-
uses: actions/setup-python@v1
14-
with:
15-
python-version: '3.x'
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install ansible
20-
- name: Build and publish
21-
env:
22-
ANSIBLE_AUTOMATION_HUB_API_KEY: ${{ secrets.ANSIBLE_AUTOMATION_HUB_API_KEY }}
23-
run: |
24-
ansible-galaxy collection build .
25-
ansible-galaxy collection publish *.tar.gz --api-key=$ANSIBLE_AUTOMATION_HUB_API_KEY -s=https://cloud.redhat.com/api/automation-hub/
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.x
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install ansible
20+
- name: Build and publish
21+
env:
22+
ANSIBLE_AUTOMATION_HUB_API_KEY: ${{ secrets.ANSIBLE_AUTOMATION_HUB_API_KEY }}
23+
run: |
24+
ansible-galaxy collection build .
25+
ansible-galaxy collection publish *.tar.gz --api-key=$ANSIBLE_AUTOMATION_HUB_API_KEY -s=https://cloud.redhat.com/api/automation-hub/

.github/workflows/gcloud.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: "google.cloud.gcloud"
1+
---
2+
name: google.cloud.gcloud
23
on:
34
push:
45
paths:
5-
- 'roles/gcloud/**'
6-
- '.github/workflows/gcloud.yml'
7-
- 'molecule/gcloud/**'
6+
- roles/gcloud/**
7+
- .github/workflows/gcloud.yml
8+
- molecule/gcloud/**
89
pull_request:
910
paths:
10-
- 'roles/gcloud/**'
11-
- '.github/workflows/gcloud.yml'
12-
- 'molecule/gcloud/**'
11+
- roles/gcloud/**
12+
- .github/workflows/gcloud.yml
13+
- molecule/gcloud/**
1314
jobs:
1415
molecule:
1516
runs-on: ubuntu-18.04

.github/workflows/gcsfuse.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: "google.cloud.gcsfuse"
1+
---
2+
name: google.cloud.gcsfuse
23
on:
34
push:
45
paths:

.github/workflows/pythonpublish.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1+
---
12
name: Upload release to Galaxy
23

34
on:
45
release:
56
types: [created]
6-
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up Python
13-
uses: actions/setup-python@v1
14-
with:
15-
python-version: '3.x'
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install ansible
20-
- name: Build and publish
21-
env:
22-
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
23-
run: |
24-
ansible-galaxy collection build .
25-
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.x
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install ansible
20+
- name: Build and publish
21+
env:
22+
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
23+
run: |
24+
ansible-galaxy collection build .
25+
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ git clone <url> $TARGET_DIR/ansible_collections/google/cloud
2121
Then set up your Python virtual environment:
2222

2323
```shell
24-
cd $TARGET_DIR/ansible_collections/google
24+
cd $TARGET_DIR/ansible_collections/google/cloud
2525
python3 -m venv venv
2626
. ./venv/bin/activate
2727
pip3 install -r requirements.txt

0 commit comments

Comments
 (0)