Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
commit pre-commit and ansible-lint fixes excluding syntax_highlightin…
Browse files Browse the repository at this point in the history
…g_demo.yml
  • Loading branch information
jeffmcutter committed Dec 18, 2023
1 parent 23817ee commit 189a3e3
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 25 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: "Docker quay.io Login"
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Check Commit Message
id: check_message
run: |
Expand All @@ -42,7 +42,7 @@ jobs:
else
echo "update_devfile=true" >> $GITHUB_OUTPUT
fi
- name: Build and push Docker image; Update image in devfile
if: steps.check_message.outputs.update_devfile == 'true' || github.actor == 'devstudio-release'
run: |
Expand All @@ -56,7 +56,7 @@ jobs:
fi
echo "Tag: $tag"
image_id=$(docker build -q -t "quay.io/devspaces/ansible-creator-ee:${tag}" .)
short_sha=$(echo $image_id | cut -c8-12)
echo "Short SHA: $short_sha"
docker tag quay.io/devspaces/ansible-creator-ee:${tag} quay.io/devspaces/ansible-creator-ee:${tag}-${short_sha}
Expand All @@ -66,13 +66,13 @@ jobs:
docker pull quay.io/devspaces/ansible-creator-ee:${tag}
digest=$(docker inspect --format='{{index .RepoDigests 0}}' quay.io/devspaces/ansible-creator-ee:${tag})
sed -r -i devfile.yaml -e "s|(image: .+devspaces/ansible-creator-ee.+)|image: ${digest}|g"
- name: Set up Git
if: steps.check_message.outputs.update_devfile == 'true' || github.actor == 'devstudio-release'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Valerii Svydenko"
- name: Commit and Push Changes
if: steps.check_message.outputs.update_devfile == 'true' || github.actor == 'devstudio-release'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"ansible.validation.enabled": true,
"ansible.validation.lint.enabled": true,
"ansible.validation.lint.path": "/usr/local/bin/ansible-lint"
}
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN \
curl -LO https://dl.k8s.io/release/`curl -LS https://dl.k8s.io/release/stable.txt`/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin && \
kubectl version --client
kubectl version --client

## helm
RUN \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ To reset your test pod back to a fresh instance you can run `molecule destroy` a
Contributions to this repository are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue with [Red Hat](https://issues.redhat.com/projects/CRW/issues).

## Code of Conduct
We ask all of our community members and contributors to adhere to the [Ansible code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html). If you have questions or need assistance, please reach out to our community team at [[email protected]](mailto:[email protected])
We ask all of our community members and contributors to adhere to the [Ansible code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html). If you have questions or need assistance, please reach out to our community team at [[email protected]](mailto:[email protected])
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
ansible.builtin.debug:
var: server

- name: Store container information # noqa: no-handler
- name: Store container information # noqa: no-handler
when: server.changed | default(false) | bool
block:

- name: Populate instance config dict
ansible.builtin.set_fact:
instance_conf_dict: {
'instance': "{{ item.result.status.containerStatuses[0].name }}",
}
}
with_items: "{{ server.results }}"
register: instance_config_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ansible.builtin.set_fact:
instance_conf: {}

- name: Dump instance config
- name: Dump instance config # noqa: no-handler
ansible.builtin.copy:
content: |
# Molecule managed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ readme: README.md
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
# @nicks:irc/im.site#channel'
authors:
- your name <[email protected]>
- your name <[email protected]>


### OPTIONAL but strongly recommended
Expand All @@ -26,15 +26,15 @@ description: your collection description
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
license:
- GPL-2.0-or-later
- GPL-2.0-or-later

# The path to the license file for the collection. This path is relative to the root of the collection. This key is
# mutually exclusive with 'license'
license_file: ''

# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags: []
tags: [linux, infrastructure]

# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
Expand Down Expand Up @@ -66,4 +66,3 @@ build_ignore: []
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
# with 'build_ignore'
# manifest: null

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
backup_file
=========

Sample role to demonstrate running molecule inside of OpenShift Dev Spaces. Molecule is configured to leverage the downstream API to create containers in the user's devspace namespace. This role does not require elevated permissions or modifications to OpenShift.
Sample role to demonstrate running molecule inside of OpenShift Dev Spaces. Molecule is configured to leverage the downstream API to create containers in the user's devspace namespace. This role does not require elevated permissions or modifications to OpenShift.

Requirements
------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
ansible.builtin.debug:
var: server

- name: Store container information # noqa: no-handler
- name: Store container information # noqa: no-handler
when: server.changed | default(false) | bool
block:

- name: Populate instance config dict
ansible.builtin.set_fact:
instance_conf_dict: {
'instance': "{{ item.result.status.containerStatuses[0].name }}",
}
}
with_items: "{{ server.results }}"
register: instance_config_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ansible.builtin.set_fact:
instance_conf: {}

- name: Dump instance config
- name: Dump instance config # noqa: no-handler
ansible.builtin.copy:
content: |
# Molecule managed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ubi8-int

2 changes: 1 addition & 1 deletion devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ commands:
if [ ! -d "$HOME/.cache/ansible-navigator" ]; then
mkdir -p "$HOME/.cache/ansible-navigator"
fi
cp /usr/local/lib/python3.11/site-packages/ansible_navigator/data/catalog_collections.py $HOME/.cache/ansible-navigator
cp /usr/local/lib/python3.11/site-packages/ansible_navigator/data/catalog_collections.py $HOME/.cache/ansible-navigator
ansible-navigator --ee false
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo
component: tooling-container
Expand Down
6 changes: 3 additions & 3 deletions playbooks/install_oc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
path: "{{ molecule_user_home_dir }}/bin"
state: directory
mode: 0770

- name: Download oc binary from OCP downloads svc endpoint
ansible.builtin.get_url:
url: http://downloads.openshift-console.svc.cluster.local/amd64/linux/oc
dest: "{{ molecule_user_home_dir }}/bin/oc"
mode: '0770'

- name: Add another bin dir to system-wide $PATH.
ansible.builtin.lineinfile:
path: "{{ molecule_user_home_dir }}/.bashrc"
Expand All @@ -36,4 +36,4 @@
ansible.builtin.pip:
name: "{{ molecule_pip_dependencies }}"
state: present
when: molecule_pip_dependencies is defined
when: molecule_pip_dependencies is defined

0 comments on commit 189a3e3

Please sign in to comment.