@@ -10,76 +10,108 @@ jobs:
1010 integration-test :
1111 environment : test
1212 runs-on : ubuntu-latest
13- defaults :
14- run :
15- working-directory : ansible/ansible_collections/devolutions/dvls
13+ # defaults:
14+ # run:
15+ # working-directory: ansible/ansible_collections/devolutions/dvls
1616
1717 steps :
1818 - name : Checkout code
1919 uses : actions/checkout@v4
20+
21+ # - name: Setup Node.js
22+ # uses: actions/setup-node@v3
23+ # with:
24+ # node-version: '22'
25+
26+ # - name: Install dependencies
27+ # run: npm install
28+
29+ - name : Login to Devolutions Server
30+ uses : Devolutions/actions-public/dvls-login@v1
2031 with :
21- path : ansible/ansible_collections/devolutions/dvls
32+ server_url : ' https://dvls-ops.devolutions.com'
33+ app_key : ${{ secrets.DVLS_APP_KEY }}
34+ app_secret : ${{ secrets.DVLS_APP_SECRET }}
2235
23- - name : Set up Python
24- uses : actions/setup-python@v4
36+ # Now you can use other Devolutions Server actions with the token
37+ - name : Get Secret
38+ uses : Devolutions/actions-public/dvls-get-secret-entry@v1
2539 with :
26- python-version : 3.13
40+ server_url : ' https://dvls-ops.devolutions.com'
41+ token : ${{ env.DVLS_TOKEN }}
42+ vault_name : ' ansible'
43+ entry_name : ' default-secret'
2744
28- - name : Install Python dependencies
45+ - name : Use Secret
2946 run : |
30- python3 -m pip install --upgrade pip
31- python3 -m pip install -r requirements.txt
32- python3 -m pip list
47+ echo "Secret is stored in ${{ env.DVLS_ENTRY_SECRET }}"
48+ # Your code that uses the secret
3349
34- - name : Test code sanity
35- run : ansible-test sanity
50+ # - name: Checkout code
51+ # uses: actions/checkout@v4
52+ # with:
53+ # path: ansible/ansible_collections/devolutions/dvls
3654
37- - name : Build collection
38- id : build
39- run : |
40- OUTPUT=$(ansible-galaxy collection build)
41- echo "$OUTPUT"
42- COLLECTION_PATH=$(echo "$OUTPUT" | grep -o '/[^ ]*\.tar\.gz')
43- echo "collection_path=$COLLECTION_PATH" >> $GITHUB_OUTPUT
44- echo "Collection path: $COLLECTION_PATH"
55+ # - name: Set up Python
56+ # uses: actions/setup-python@v4
57+ # with:
58+ # python-version: 3.13
4559
46- - name : Install collection
47- run : ansible-galaxy collection install ${{ steps.build.outputs.collection_path }} --force
48- working-directory : ansible/ansible_collections/devolutions/dvls/tests/integration
60+ # - name: Install Python dependencies
61+ # run: |
62+ # python3 -m pip install --upgrade pip
63+ # python3 -m pip install -r requirements.txt
64+ # python3 -m pip list
4965
50- - name : Test collection documentation
51- run : |
52- # Generate the list of modules dynamically
53- ansible_modules=($(ansible-doc -l devolutions.dvls | awk '{print $1}'))
54-
55- # Check if any modules were found
56- if [ ${#ansible_modules[@]} -eq 0 ]; then
57- echo "Error: No modules found for devolutions.dvls."
58- exit 1
59- fi
60- echo "Modules: ${ansible_modules[@]}"
61-
62- # Loop through each module and run ansible-doc
63- for ansible_module in "${ansible_modules[@]}"; do
64- echo "Running ansible-doc for module: $ansible_module"
65- ansible-doc -t module "$ansible_module"
66- echo "----------------------------------------------------"
67- done
68-
69- - name : Run get-vaults
70- run : ansible-playbook test_manage_server.yml
71- working-directory : ansible/ansible_collections/devolutions/dvls/tests/integration
72- env :
73- DVLS_APP_KEY : ${{ secrets.DVLS_APP_KEY }}
74- DVLS_APP_SECRET : ${{ secrets.DVLS_APP_SECRET }}
75- DVLS_SERVER_BASE_URL : ${{ secrets.DVLS_SERVER_BASE_URL }}
76- DVLS_VAULT_ID : ${{ secrets.DVLS_VAULT_ID }}
77-
78- - name : Run get-secrets
79- run : ansible-playbook test_manage_secrets.yml
80- working-directory : ansible/ansible_collections/devolutions/dvls/tests/integration
81- env :
82- DVLS_APP_KEY : ${{ secrets.DVLS_APP_KEY }}
83- DVLS_APP_SECRET : ${{ secrets.DVLS_APP_SECRET }}
84- DVLS_SERVER_BASE_URL : ${{ secrets.DVLS_SERVER_BASE_URL }}
85- DVLS_VAULT_ID : ${{ secrets.DVLS_VAULT_ID }}
66+ # - name: Test code sanity
67+ # run: ansible-test sanity
68+
69+ # - name: Build collection
70+ # id: build
71+ # run: |
72+ # OUTPUT=$(ansible-galaxy collection build)
73+ # echo "$OUTPUT"
74+ # COLLECTION_PATH=$(echo "$OUTPUT" | grep -o '/[^ ]*\.tar\.gz')
75+ # echo "collection_path=$COLLECTION_PATH" >> $GITHUB_OUTPUT
76+ # echo "Collection path: $COLLECTION_PATH"
77+
78+ # - name: Install collection
79+ # run: ansible-galaxy collection install ${{ steps.build.outputs.collection_path }} --force
80+ # working-directory: ansible/ansible_collections/devolutions/dvls/tests/integration
81+
82+ # - name: Test collection documentation
83+ # run: |
84+ # # Generate the list of modules dynamically
85+ # ansible_modules=($(ansible-doc -l devolutions.dvls | awk '{print $1}'))
86+
87+ # # Check if any modules were found
88+ # if [ ${#ansible_modules[@]} -eq 0 ]; then
89+ # echo "Error: No modules found for devolutions.dvls."
90+ # exit 1
91+ # fi
92+ # echo "Modules: ${ansible_modules[@]}"
93+
94+ # # Loop through each module and run ansible-doc
95+ # for ansible_module in "${ansible_modules[@]}"; do
96+ # echo "Running ansible-doc for module: $ansible_module"
97+ # ansible-doc -t module "$ansible_module"
98+ # echo "----------------------------------------------------"
99+ # done
100+
101+ # - name: Run get-vaults
102+ # run: ansible-playbook test_manage_server.yml
103+ # working-directory: ansible/ansible_collections/devolutions/dvls/tests/integration
104+ # env:
105+ # DVLS_APP_KEY: ${{ secrets.DVLS_APP_KEY }}
106+ # DVLS_APP_SECRET: ${{ secrets.DVLS_APP_SECRET }}
107+ # DVLS_SERVER_BASE_URL: ${{ secrets.DVLS_SERVER_BASE_URL }}
108+ # DVLS_VAULT_ID: ${{ secrets.DVLS_VAULT_ID }}
109+
110+ # - name: Run get-secrets
111+ # run: ansible-playbook test_manage_secrets.yml
112+ # working-directory: ansible/ansible_collections/devolutions/dvls/tests/integration
113+ # env:
114+ # DVLS_APP_KEY: ${{ secrets.DVLS_APP_KEY }}
115+ # DVLS_APP_SECRET: ${{ secrets.DVLS_APP_SECRET }}
116+ # DVLS_SERVER_BASE_URL: ${{ secrets.DVLS_SERVER_BASE_URL }}
117+ # DVLS_VAULT_ID: ${{ secrets.DVLS_VAULT_ID }}
0 commit comments