Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/collections/ansible_collections/ibm/ibm_zos_cics,type=bind",
"workspaceFolder": "/workspace/collections",
"postAttachCommand": "bash /workspace/collections/ansible_collections/ibm/ibm_zos_cics/.devcontainer/setup.sh",
"initializeCommand": "eval \"$(ssh-agent -s)\" > /dev/null && grep -slR \"PRIVATE\" ~/.ssh | xargs ssh-add",
"mounts" : [
"source=vscode-shell-history,target=/commandhistory,type=volume",
"source=${localEnv:HOME}/.ssh,target=/root/.ssh-local,type=bind,consistency=cached"
"source=vscode-shell-history,target=/commandhistory,type=volume"
],
"customizations": {
"vscode": {
Expand All @@ -22,7 +20,16 @@
"ms-python.python",
"eamodio.gitlens",
"ms-vsliveshare.vsliveshare"
]
],
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/bin/zsh"
}
},
"terminal.integrated.cwd": "/workspace/collections/ansible_collections/ibm/ibm_zos_cics/"
}
}
}
}
31 changes: 1 addition & 30 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -1,38 +1,9 @@
#!/usr/bin/env bash
# Copy contents to the .ssh directory
cp -r /root/.ssh-local/. /root/.ssh
if [ -e /root/.ssh/config ]; then
# If config file exists
mv ~/.ssh/config ~/.ssh/config-local
touch ~/.ssh/config
cat ~/.ssh/config-local > ~/.ssh/config
rm ~/.ssh/config-local
fi

python3 -m pip install --user ansible-core==2.16

ansible-galaxy collection install ibm.ibm_zos_core:==1.9.1 -p /workspace/collections
ansible-galaxy collection install community.general -p /workspace/collections

echo -e "[defaults]\nstdout_callback=community.general.yaml\nCOLLECTIONS_PATHS=/workspace/collections" > ~/.ansible.cfg

pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/dev-requirements.txt
pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/doc-requirements.txt

mkdir -p /commandhistory
touch /commandhistory/.zsh_history
chown -R root /commandhistory

{
# Add history to zsh shell
echo "export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history"

# Make this ansible_cics_collection repo the default repo when opening a new zsh terminal
echo "cd /workspace/collections/ansible_collections/ibm/ibm_zos_cics/"
echo "git config --global --add safe.directory /workspaces/collections/ansible_collections/ibm/ibm_zos_cics"
} >> "/root/.zshrc"



# .zshrc file configuration - Use default zsh_theme
sed -i '/^ZSH_THEME/c\ZSH_THEME="robbyrussell"' ~/.zshrc
pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/doc-requirements.txt
Loading