-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ant role * add molecule test * update travis * update readme * fix lint isues * add tests folder * add ant scenario * try this * fix role name * add more tests * update role readme * add jfrog,nodejs and openjdk roles and tests * update readme * add tag and publish script * try to run deploy script * remove dist beta * move to scripts folder and make executable * test gh release creation * rever to main branch * update EL versios in meta Co-authored-by: SIANOBRI <[email protected]>
- Loading branch information
Showing
22 changed files
with
472 additions
and
6 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
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
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 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
|
||
collections: | ||
- ibm.spm_toolbox | ||
|
||
roles: | ||
- jfrog | ||
|
||
vars: | ||
jfrog_version: '1.9.0' |
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,31 @@ | ||
--- | ||
driver: | ||
name: docker | ||
provider: | ||
name: docker | ||
|
||
lint: | | ||
set -e | ||
yamllint . | ||
platforms: | ||
- name: centos-8 | ||
image: centos:8 | ||
dockerfile: ../_resources/Dockerfile.j2 | ||
pre_build_image: False | ||
privileged: True | ||
volume_mounts: | ||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw" | ||
command: "/usr/sbin/init" | ||
environment: | ||
container: docker | ||
|
||
provisioner: | ||
name: ansible | ||
log: true | ||
config_options: | ||
defaults: | ||
stderr_callback: debug | ||
stdout_callback: debug | ||
env: | ||
ANSIBLE_FORCE_COLOR: 'true' |
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,26 @@ | ||
--- | ||
# This is an example playbook to execute Ansible tests. | ||
|
||
- name: Verify | ||
hosts: all | ||
vars: | ||
jfrog_version: '1.9.0' | ||
|
||
pre_tasks: | ||
- name: Check if JFrog downloaded | ||
stat: | ||
path: "/usr/local/bin/jfrog" | ||
register: jfrog_check | ||
|
||
- name: Check if Jfrog executes | ||
shell: "/usr/local/bin/jfrog -v | grep {{ jfrog_version }}" | ||
register: jfrog_installed | ||
|
||
tasks: | ||
- name: Check that jfrog folder exists | ||
assert: | ||
that: jfrog_check.stat.exists | ||
|
||
- name: Check jfrog installed and version is correct | ||
assert: | ||
that: jfrog_installed.rc == 0 |
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,9 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
|
||
collections: | ||
- ibm.spm_toolbox | ||
|
||
roles: | ||
- nodejs |
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,31 @@ | ||
--- | ||
driver: | ||
name: docker | ||
provider: | ||
name: docker | ||
|
||
lint: | | ||
set -e | ||
yamllint . | ||
platforms: | ||
- name: centos-8 | ||
image: centos:8 | ||
dockerfile: ../_resources/Dockerfile.j2 | ||
pre_build_image: False | ||
privileged: True | ||
volume_mounts: | ||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw" | ||
command: "/usr/sbin/init" | ||
environment: | ||
container: docker | ||
|
||
provisioner: | ||
name: ansible | ||
log: true | ||
config_options: | ||
defaults: | ||
stderr_callback: debug | ||
stdout_callback: debug | ||
env: | ||
ANSIBLE_FORCE_COLOR: 'true' |
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 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
|
||
pre_tasks: | ||
- stat: "path=/usr/local/bin/node" | ||
register: node_bin | ||
- stat: "path=/usr/local/bin/npm" | ||
register: npm_bin | ||
- stat: "path=/usr/local/bin/npx" | ||
register: npx_bin | ||
|
||
tasks: | ||
- name: Check that node exists | ||
assert: | ||
that: node_bin.stat.exists | ||
- name: Check that npm exists | ||
assert: | ||
that: npm_bin.stat.exists | ||
- name: Check that npx exists | ||
assert: | ||
that: npx_bin.stat.exists |
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,42 @@ | ||
# jfrog | ||
|
||
The `jfrog` role downloads JFrog CLI appropriate for the OS. | ||
|
||
## Requirements | ||
|
||
None | ||
|
||
## Role Variables | ||
|
||
| Property Name | Default value | | ||
| ----------------- | ------------- | | ||
| `jfrog_version` | `1.39.5` | | ||
| `jfrog_owner` | `root` | | ||
| `jfrog_group` | `root` | | ||
|
||
The `jfrog_version` variable may be set to `$latest` for Linux platforms to download the latest available binary. | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
## Example Playbook | ||
|
||
``` | ||
--- | ||
- name: Install JFrog CLI | ||
hosts: all | ||
collections: | ||
- ibm.spm_toolbox | ||
roles: | ||
- jfrog | ||
vars: | ||
jfrog_version: "$latest" | ||
``` | ||
|
||
## License | ||
|
||
MIT |
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,4 @@ | ||
--- | ||
jfrog_version: '1.9.0' | ||
jfrog_owner: 'root' | ||
jfrog_group: 'root' |
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,39 @@ | ||
--- | ||
galaxy_info: | ||
author: SPM DevOps Team | ||
description: Download JFrog CLI appropriate for the OS. | ||
company: Watson Health SPM | ||
|
||
# If the issue tracker for your role is not on github, uncomment the | ||
# next line and provide a value | ||
# issue_tracker_url: http://example.com/issue/tracker | ||
|
||
license: MIT | ||
|
||
min_ansible_version: 2.9 | ||
|
||
# | ||
# Provide a list of supported platforms, and for each platform a list of versions. | ||
# If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
# To view available platforms and versions (or releases), visit: | ||
# https://galaxy.ansible.com/api/v1/platforms/ | ||
# | ||
platforms: | ||
- name: EL | ||
versions: | ||
- '7' | ||
- '8' | ||
|
||
galaxy_tags: | ||
[] | ||
# List tags for your role here, one per line. A tag is a keyword that describes | ||
# and categorizes the role. Users find roles by searching for tags. Be sure to | ||
# remove the '[]' above, if you add tags to this list. | ||
# | ||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters. | ||
# Maximum 20 tags per role. | ||
|
||
dependencies: | ||
[] | ||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. |
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,16 @@ | ||
--- | ||
- name: Download Linux jfrog-cli | ||
get_url: | ||
url: "https://releases.jfrog.io/artifactory/jfrog-cli/v1/{{ jfrog_version }}/jfrog-cli-linux-amd64/jfrog" | ||
dest: '/usr/local/bin/jfrog' | ||
owner: "{{ jfrog_owner }}" | ||
group: "{{ jfrog_group }}" | ||
mode: '0755' | ||
when: ansible_os_family != "Windows" | ||
|
||
- name: Download Windows jfrog-cli | ||
win_chocolatey: | ||
name: jfrog-cli | ||
version: "{{ jfrog_version }}" | ||
state: present | ||
when: ansible_os_family == "Windows" |
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,36 @@ | ||
# nodejs | ||
|
||
The `nodejs` role downloads NodeJS. | ||
|
||
## Requirements | ||
|
||
None | ||
|
||
## Role Variables | ||
|
||
| Property Name | Default value | | ||
| ----------------- | ------------- | | ||
| `nodejs_version` | `v12.21.0` | | ||
| `profiled_path` | `/opt/profile.d` | | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
## Example Playbook | ||
|
||
``` | ||
--- | ||
- name: Install NodeJS | ||
hosts: all | ||
collections: | ||
- ibm.spm_toolbox | ||
roles: | ||
- nodejs | ||
``` | ||
|
||
## License | ||
|
||
MIT |
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,5 @@ | ||
--- | ||
nodejs_version: v12.21.0 | ||
|
||
# Common | ||
profiled_path: /opt/profile.d |
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,39 @@ | ||
--- | ||
galaxy_info: | ||
author: SPM DevOps Team | ||
description: Download NodeJS. | ||
company: Watson Health SPM | ||
|
||
# If the issue tracker for your role is not on github, uncomment the | ||
# next line and provide a value | ||
# issue_tracker_url: http://example.com/issue/tracker | ||
|
||
license: MIT | ||
|
||
min_ansible_version: 2.9 | ||
|
||
# | ||
# Provide a list of supported platforms, and for each platform a list of versions. | ||
# If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
# To view available platforms and versions (or releases), visit: | ||
# https://galaxy.ansible.com/api/v1/platforms/ | ||
# | ||
platforms: | ||
- name: EL | ||
versions: | ||
- '7' | ||
- '8' | ||
|
||
galaxy_tags: | ||
[] | ||
# List tags for your role here, one per line. A tag is a keyword that describes | ||
# and categorizes the role. Users find roles by searching for tags. Be sure to | ||
# remove the '[]' above, if you add tags to this list. | ||
# | ||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters. | ||
# Maximum 20 tags per role. | ||
|
||
dependencies: | ||
[] | ||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. |
Oops, something went wrong.