-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from AndrewTwydell/andrewtwydell-104
Andrewtwydell 1.0.4 public release
- Loading branch information
Showing
44 changed files
with
766 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
--- | ||
skip_list: | ||
- "name[template]" | ||
- "args[module]" | ||
- "yaml[line-length]" | ||
- "yaml[truthy]" | ||
- "galaxy[no-changelog]" | ||
- "meta-unsupported-ansible" | ||
- "meta-runtime[unsupported-version]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,28 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
name: CodeQL | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
branches: [main] | ||
schedule: | ||
- cron: '41 8 * * 1' | ||
- cron: "0 2 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
queries: security-extended | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: "python" | ||
queries: security-extended | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
env: | ||
- ANSIBLE_VERSION="stable-2.11" | ||
- ANSIBLE_VERSION="stable-2.12" | ||
- ANSIBLE_VERSION="stable-2.13" | ||
- ANSIBLE_VERSION="stable-2.14" | ||
- ANSIBLE_VERSION="devel" | ||
matrix: | ||
exclude: | ||
# Python 2.7 max ansible version is 2.11 | ||
- python: "2.7" | ||
env: ANSIBLE_VERSION="stable-2.12" | ||
- python: "2.7" | ||
env: ANSIBLE_VERSION="stable-2.13" | ||
- python: "2.7" | ||
env: ANSIBLE_VERSION="stable-2.14" | ||
- python: "2.7" | ||
env: ANSIBLE_VERSION="devel" | ||
# Python 3.8 max ansible version is 2.13 | ||
- python: "3.8" | ||
env: ANSIBLE_VERSION="stable-2.14" | ||
- python: "3.8" | ||
env: ANSIBLE_VERSION="devel" | ||
# Ansible 2.11 max python version support is 3.9 | ||
- python: "3.10" | ||
env: ANSIBLE_VERSION="stable-2.11" | ||
services: | ||
- docker | ||
before_script: source .travis/get_vault_data.sh | ||
script: | | ||
echo "" | ||
echo "#############################################" | ||
echo "# PYTHON VERSION: ${TRAVIS_PYTHON_VERSION}" | ||
echo "# ANSIBLE VERSION: ${ANSIBLE_VERSION}" | ||
echo "#############################################" | ||
echo "" | ||
ANSIBLE_NO_STABLE="${ANSIBLE_VERSION//stable-/}" | ||
ANSIBLE_NO_DOT="${ANSIBLE_NO_STABLE//./}" | ||
PYTHON_NO_DOT="${TRAVIS_PYTHON_VERSION//./}" | ||
IMAGE_NAME="cics-python-$PYTHON_NO_DOT-ansible-$ANSIBLE_NO_DOT" | ||
echo "$ARTIFACTORY_TOKEN" | docker login --username $ARTIFACTORY_USER --password-stdin $DOCKER_REGISTRY | ||
docker pull $DOCKER_REGISTRY/$IMAGE_NAME:latest | ||
bash "$TRAVIS_BUILD_DIR"/.travis/build_env.sh | ||
docker run --rm -it -v \ | ||
$(pwd):/root/ansible_collections/ibm/ibm_zos_cics \ | ||
-e TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION \ | ||
$DOCKER_REGISTRY/$IMAGE_NAME:latest \ | ||
bash -c "cd /root/ansible_collections/ibm/ibm_zos_cics && bash .travis/build_and_test.sh" | ||
jobs: | ||
include: | ||
- stage: deploy | ||
script: bash .travis/push_artifactory.sh | ||
python: "3.10" | ||
env: ANSIBLE_VERSION="stable-2.14" | ||
on: | ||
branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
git config --global --add safe.directory /root/ansible_collections/ibm/ibm_zos_cics | ||
|
||
pip install -r /root/ansible_collections/ibm/ibm_zos_cics/dev-requirements.txt | ||
|
||
# ansible-lint requires python >= 3.8 | ||
if [ "$TRAVIS_PYTHON_VERSION" != "2.7" ]; then | ||
echo "" | ||
echo "##########################################################" | ||
echo "###################### Ansible-lint ######################" | ||
echo "##########################################################" | ||
echo "" | ||
ansible-lint --profile production | ||
fi | ||
|
||
echo "" | ||
echo "##########################################################" | ||
echo "################## Ansible Sanity Tests ##################" | ||
echo "##########################################################" | ||
echo "" | ||
ansible-test sanity --python "$TRAVIS_PYTHON_VERSION" | ||
|
||
echo "" | ||
echo "##########################################################" | ||
echo "################### Ansible Unit Tests ###################" | ||
echo "##########################################################" | ||
echo "" | ||
ansible-test units --python "$TRAVIS_PYTHON_VERSION" | ||
|
||
echo "" | ||
echo "###########################################################" | ||
echo "################ Ansible Integration Tests ################" | ||
echo "###########################################################" | ||
echo "" | ||
ansible-test integration cics_cmci --python "$TRAVIS_PYTHON_VERSION" | ||
|
||
echo "" | ||
echo "##########################################################" | ||
echo "############## Ansible Missing Module Tests ##############" | ||
echo "##########################################################" | ||
echo "" | ||
pip uninstall xmltodict -y | ||
ansible-test integration cics_cmci_missing_xmltodict_library --python "$TRAVIS_PYTHON_VERSION" | ||
|
||
pip install -r /root/ansible_collections/ibm/ibm_zos_cics/dev-requirements.txt | ||
pip uninstall requests -y | ||
ansible-test integration cics_cmci_missing_requests_library --python "$TRAVIS_PYTHON_VERSION" | ||
|
||
echo "" | ||
echo "###########################################################" | ||
echo "#################### Build Collection #####################" | ||
echo "###########################################################" | ||
echo "" | ||
pip install -r /root/ansible_collections/ibm/ibm_zos_cics/dev-requirements.txt | ||
ansible-galaxy collection build /root/ansible_collections/ibm/ibm_zos_cics --output-path /root/ansible_collections/ibm/ibm_zos_cics --force | ||
ansible-galaxy collection install /root/ansible_collections/ibm/ibm_zos_cics/ibm-ibm_zos_cics-* --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
A="A" | ||
B="B" | ||
star="*" | ||
|
||
TRAVIS_NO_DOT="${TRAVIS_JOB_NUMBER//./D}" | ||
|
||
program_name_1="A$TRAVIS_NO_DOT$A" | ||
program_name_2="A$TRAVIS_NO_DOT$B" | ||
program_filter="A$TRAVIS_NO_DOT$star" | ||
|
||
echo "" | ||
echo "################ Job-Specific Variables ################" | ||
echo "## Program 1 Name: $program_name_1" | ||
echo "## Program 2 Name: $program_name_2" | ||
echo "## Program Filter: $program_filter" | ||
echo "" | ||
|
||
echo "############# Creating cmci-variables.yml #############" | ||
touch "$TRAVIS_BUILD_DIR"/tests/integration/targets/cics_cmci/cmci-variables.yml | ||
{ | ||
echo cmci_host: "$CMCI_HOST" | ||
echo cmci_port: "$CMCI_PORT" | ||
echo cmci_secure_port: "$CMCI_SECURE_PORT" | ||
echo cmci_user: "$CMCI_USER" | ||
echo cmci_password: "$CMCI_PASS" | ||
echo cmci_context: "$CMCI_CONTEXT" | ||
echo cmci_scope: "$CMCI_SCOPE" | ||
echo cmci_scope_region_1: "$CMCI_REGION_1" | ||
echo cmci_scope_region_2: "$CMCI_REGION_2" | ||
echo cmci_program_name_1: "$program_name_1" | ||
echo cmci_program_name_2: "$program_name_2" | ||
echo cmci_program_filter: "$program_filter" | ||
} >>"$TRAVIS_BUILD_DIR"/tests/integration/targets/cics_cmci/cmci-variables.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Wiki page on Vault Integration: | ||
# https://cicswiki.hursley.ibm.com:9443/wiki/CICS_Explorer/artifactory_vault | ||
|
||
VAULT_ONETIME_TOKEN=$(curl -k -s --request POST --data '{"role_id":"'"$VAULT_ROLE_ID"'","secret_id":"'"$VAULT_SECRET_ID"'"}' "$VAULT_URL"/auth/approle/login | jq -r ".auth.client_token") | ||
ARTI=$(curl -k -s --header "X-Vault-Token: $VAULT_ONETIME_TOKEN" "$VAULT_URL"/"$VAULT_PATH"/"artifactory" | jq -r ".data.data") | ||
export "ARTIFACTORY_USER"="$(jq -r ".user" <<<"$ARTI")" | ||
export "ARTIFACTORY_TOKEN"="$(jq -r ".token" <<<"$ARTI")" | ||
|
||
PLEX=$(curl -k -s --header "X-Vault-Token: $VAULT_ONETIME_TOKEN" "$VAULT_URL"/"$VAULT_PATH"/plex2 | jq -r ".data.data") | ||
export "CMCI_USER"="$(jq -r ".username" <<<"$PLEX")" | ||
export "CMCI_PASS"="$(jq -r ".password" <<<"$PLEX")" | ||
|
||
CMCI=$(curl -k -s --header "X-Vault-Token: $VAULT_ONETIME_TOKEN" "$VAULT_URL"/"$VAULT_PATH"/cmci | jq -r ".data.data") | ||
export "CMCI_HOST"="$(jq -r ".url" <<<"$CMCI")" | ||
export "CMCI_PORT"="$(jq -r ".port" <<<"$CMCI")" | ||
export "CMCI_SECURE_PORT"="$(jq -r ".secure_port" <<<"$CMCI")" | ||
export "CMCI_SCOPE"="$(jq -r ".scope" <<<"$CMCI")" | ||
export "CMCI_REGION_1"="$(jq -r ".region_1" <<<"$CMCI")" | ||
export "CMCI_REGION_2"="$(jq -r ".region_2" <<<"$CMCI")" | ||
export "CMCI_CONTEXT"="$(jq -r ".context" <<<"$CMCI")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pip install https://github.com/ansible/ansible/archive/stable-2.14.tar.gz | ||
|
||
ansible-galaxy collection build "$TRAVIS_BUILD_DIR" --force | ||
|
||
file_with_prefix="$(find . -type f -iname "ibm-ibm_zos_cics-*")" | ||
file="${file_with_prefix//.\//}" | ||
no_extension="${file//.tar.gz/}" | ||
no_starting="${no_extension//.\//}" | ||
version_number="${no_starting//ibm-ibm_zos_cics-/}" | ||
TRAVIS_NO_DOT="${TRAVIS_JOB_NUMBER//./D}" | ||
|
||
echo "" | ||
echo "##########################################################" | ||
echo "############# Uploading build to Artifactory #############" | ||
echo "##########################################################" | ||
echo "#" | ||
echo "# File: $file" | ||
echo "# Version: $version_number" | ||
echo "#" | ||
echo "##########################################################" | ||
|
||
curl -ksSf \ | ||
-H "Authorization: Bearer $ARTIFACTORY_TOKEN" -X PUT \ | ||
-T "$TRAVIS_BUILD_DIR"/"$file" \ | ||
"$ARTIFACTORY_URL"/"$version_number"/"$TRAVIS_NO_DOT"/"$file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"settingsInheritedFrom": "whitesource-config/whitesource-config@master", | ||
"remediateSettings": { | ||
"enableRenovate": true, | ||
"extends": [ | ||
"config:base" | ||
] | ||
}, | ||
"issueSettings": { | ||
"issueRepoName": "cics-ts-tracking" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# (c) Copyright IBM Corp. 2020,2023 | ||
# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) | ||
-r dev-requirements.txt | ||
|
||
ansible-doc-extractor==0.1.6; python_version >= '3' | ||
Sphinx==3.4.3; python_version >= '3' | ||
sphinx-rtd-theme==0.5.1; python_version >= '3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.