I have some questions related to gitlab-ci
- How can I use more than one image? Maybe one image per stage or depend on job name?
#### How use one image for JobA1 and JobA2 JobA1: stage: Test script: - ansible-playbook testa1.yml JobA2: stage: Test script: - ansible-playbook testa2.yml #### How use other image to JobB1 and JobB2 JobB1: stage: Test script: - ansible-playbook testa1.yml JobB2: stage: Test script: - ansible-playbook testa2.yml
- How can I use before_script depends on stage?
- How can I install dependency to image? I tried do it like that
- apt update
- apt install software-properties-common
- apt-add-repository --yes --update ppa:ansible/ansible
- apt install ansible
I see in the log that the commands from before_script will execute, but when installing ansible the installation must be confirmed - how can I do it? Alternatively, is there a better way to install ansible to the image?
0 upgraded, 73 newly installed, 0 to remove and 12 not upgraded. Need to get 24.8 MB of archives. After this operation, 112 MB of additional disk space will be used. Do you want to continue? [Y/n] Abort.