-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create main.yml * runs on ubuntu * set secret * set secret * format * format * lint * job level * matrix * quote * add scenarios * add collection * use a way * fix lint issue * fix lint issue * add another branch for test * add ohs * typo * add sanity check * fix branches * not working * python_ver * add release.yml * add release.yml * yamllint issue * remove dotnet * remove some tools * wrong file * more space * more space * more space * more space * more space * more space * more space * more space * more space * more space * more space * update version * description * Enable GH Actions (#28) * Test Actions matrix Signed-off-by: Andrey Zhereshchin <[email protected]> * Configure cache Signed-off-by: Andrey Zhereshchin <[email protected]> * Rename workflow Signed-off-by: Andrey Zhereshchin <[email protected]> * Disable fail-fast for matrix Signed-off-by: Andrey Zhereshchin <[email protected]> * Checkout into custom directory Signed-off-by: Andrey Zhereshchin <[email protected]> * Change working directory for run commands Signed-off-by: Andrey Zhereshchin <[email protected]> * Setup separate workflow for sanity checks Signed-off-by: Andrey Zhereshchin <[email protected]> * Prepare environment for sanity tests Signed-off-by: Andrey Zhereshchin <[email protected]> * Only run within upstream org Signed-off-by: Andrey Zhereshchin <[email protected]> * Add release workflow Signed-off-by: Andrey Zhereshchin <[email protected]> * Add guard around molecule test execution Signed-off-by: Andrey Zhereshchin <[email protected]> * Update workflow descriptions Signed-off-by: Andrey Zhereshchin <[email protected]> * Add token variables for Galaxy Signed-off-by: Andrey Zhereshchin <[email protected]> * Synchronise logic with upstream main branch * merge testaction Co-authored-by: root <[email protected]> Co-authored-by: Andrey Zhereshchin <[email protected]>
- Loading branch information
1 parent
6262b93
commit 7e6378f
Showing
4 changed files
with
187 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 |
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,107 @@ | ||
--- | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events | ||
# but only for the main branch | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: ['*'] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs | ||
# that can run sequentially or in parallel | ||
jobs: | ||
ci: | ||
env: | ||
ARTIFACTORY_TOKEN: "${{ secrets.ARTIFACTORY_TOKEN }}" | ||
ARTIFACTORY_REPO: "${{ secrets.ARTIFACTORY_REPO }}" | ||
ARTIFACTORY_URL: "${{ secrets.ARTIFACTORY_URL }}" | ||
collection_namespace: ibm | ||
collection_name: spm_middleware | ||
python_ver: 3.8 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
scenario: | ||
- websphere-v90-centos-8 | ||
- websphere-v85-centos-7 | ||
- db2111 | ||
- db2115 | ||
- oracle12cR1-centos-7 | ||
- oracle12cR2-centos-7 | ||
- oracle19c-centos-8 | ||
- iim-191-centos-8 | ||
- ihs-v90-centos-8 | ||
- ihs-v80-centos-7 | ||
- ohs-v12.2.1-centos-7 | ||
- ohs-v12.2.1-centos-8 | ||
- ohs-v12.1.3-centos-7 | ||
- liberty-centos-7 | ||
- liberty-centos-8 | ||
- weblogic-centos-7 | ||
- weblogic-centos-8 | ||
defaults: | ||
run: | ||
working-directory: ansible_collections/${{ env.collection_namespace }}/${{ env.collection_name }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ansible_collections/${{ env.collection_namespace }}/${{ env.collection_name }} | ||
- name: Setup Python v${{ env.python_ver }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.python_ver }} | ||
# remove android and dotnet to gain more spaces for oracle installation | ||
- name: Maximize build space | ||
run: | | ||
df -h | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /usr/share/dotnet | ||
df -h | ||
- name: Setup Python Cache | ||
uses: actions/cache@v2 | ||
with: | ||
key: pip-${{ matrix.scenario }}-${{ hashFiles('ci-requirements.txt') }} | ||
path: | | ||
~/.cache/pip | ||
!~/.cache/pip/log/debug.log | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -r ci-requirements.txt | ||
- name: Prepare environment | ||
run: | | ||
mkdir -pv ~/.ansible/collections/${{ env.collection_namespace }} | ||
ln -s ansible_collections/${{ env.collection_namespace }}/${{ env.collection_name }} ~/.ansible/collections/${{ env.collection_namespace }}/${{ env.collection_name }} | ||
chmod -v +x ./scripts/* | ||
- name: Sanity checks | ||
run: | | ||
ansible-test sanity --docker -v --color --python ${{ env.python_ver }} | ||
- name: Molecule | ||
run: | | ||
molecule test -s ${{ matrix.scenario }} | ||
# - name: Publish to Galaxy | ||
# env: | ||
# ANSIBLE_GALAXY_SERVER_LIST: release | ||
# ANSIBLE_GALAXY_SERVER_RELEASE_URL: https://galaxy.ansible.com/ | ||
# ANSIBLE_GALAXY_SERVER_RELEASE_TOKEN: "${{ secrets.GALAXY_TOKEN }}" | ||
# run: | | ||
# ansible-galaxy collection build | ||
# ls -l *.tar.gz | ||
# ansible-galaxy collection publish -c -vvv "./${{ env.collection_namespace }}-${{ env.collection_name }}-*.tar.gz" | ||
# - name: Create GitHub Release | ||
# uses: marvinpinto/action-automatic-releases@latest | ||
# with: | ||
# repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
# prerelease: false | ||
# files: | | ||
# ${{ env.collection_namespace }}-${{ env.collection_name }}-*.tar.gz |
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,71 @@ | ||
--- | ||
# This is a basic workflow to help you get started with Actions | ||
name: release | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events | ||
# but only for the main branch | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs | ||
# that can run sequentially or in parallel | ||
jobs: | ||
release: | ||
env: | ||
collection_namespace: ibm | ||
collection_name: spm_middleware | ||
python_ver: 3.8 | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ansible_collections/${{ env.collection_namespace }}/${{ env.collection_name }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ansible_collections/${{ env.collection_namespace }}/${{ env.collection_name }} | ||
- name: Setup Python v${{ env.python_ver }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.python_ver }} | ||
|
||
- name: Setup Python Cache | ||
uses: actions/cache@v2 | ||
with: | ||
key: pip-${{ matrix.scenario }}-${{ hashFiles('ci-requirements.txt') }} | ||
path: | | ||
~/.cache/pip | ||
!~/.cache/pip/log/debug.log | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -r ci-requirements.txt | ||
- name: Prepare environment | ||
run: | | ||
mkdir -pv ~/.ansible/collections/${{ env.collection_namespace }} | ||
ln -s ansible_collections/${{ env.collection_namespace }}/${{ env.collection_name }} ~/.ansible/collections/${{ env.collection_namespace }}/${{ env.collection_name }} | ||
chmod -v +x ./scripts/* | ||
- name: Not fully ready yet | ||
run: | | ||
echo "Need more test before push to https://galaxy.ansible.com/" | ||
# - name: Publish to Galaxy | ||
# env: | ||
# ANSIBLE_GALAXY_SERVER_LIST: release | ||
# ANSIBLE_GALAXY_SERVER_RELEASE_URL: https://galaxy.ansible.com/ | ||
# ANSIBLE_GALAXY_SERVER_RELEASE_TOKEN: "${{ secrets.GALAXY_TOKEN }}" | ||
# run: | | ||
# ansible-galaxy collection build | ||
# ls -l *.tar.gz | ||
# ansible-galaxy collection publish -c -vvv "./${{ env.collection_namespace }}-${{ env.collection_name }}-*.tar.gz" | ||
# - name: Create GitHub Release | ||
# uses: marvinpinto/action-automatic-releases@latest | ||
# with: | ||
# repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
# prerelease: false | ||
# files: | | ||
# ${{ env.collection_namespace }}-${{ env.collection_name }}-*.tar.gz |
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