diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..da378ee7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +--- +name: CI +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +env: + ANSIBLE_FORCE_COLOR: 1 +jobs: + ubuntu-22: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4.1.7 + with: + fetch-depth: 0 + - name: Install ansible + run: | + sudo apt-add-repository --yes --update ppa:ansible/ansible + sudo apt-get update + sudo apt-get install ansible -y + ansible --version + - name: Run playbook + run: | + ansible-galaxy install -r requirements.yml + cd .. + ansible-playbook ansible-role-jenkins/playbook.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 90fa957b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -os: linux -dist: bionic - -language: python -python: - - "3.8.0" - -services: - - docker - -before_install: - - git clone https://github.com/lean-delivery/ansible-lint-rules.git ~/ansible-lint-rules - -install: - - pip3 install --upgrade ansible==2.9.* docker molecule==2.22 - - pip3 install git+https://github.com/ansible/ansible-lint.git - - git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning - - ansible --version - - ansible-lint --version - -script: - - yamllint . -c .yamllint - - ansible-lint . -c .ansible-lint - - molecule test -s default - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/playbook.yml b/playbook.yml new file mode 100644 index 00000000..c9fe68dd --- /dev/null +++ b/playbook.yml @@ -0,0 +1,9 @@ +- name: Install and Configure Jenkins + hosts: localhost + roles: + - role: lean_delivery.java + java_distribution: zulu + transport: fallback + java_major_version: 11 + java_package: jdk + - role: ansible-role-jenkins diff --git a/requirements.yml b/requirements.yml index e6224319..c0ab4367 100755 --- a/requirements.yml +++ b/requirements.yml @@ -1,2 +1,4 @@ --- -- src: lean_delivery.java +- name: lean_delivery.java + src: https://github.com/lean-delivery/ansible-role-java + version: 7.2.2