Merge "[DCAE] Switch to global jobs - java sub-components (KPI-ms)"
[ci-management.git] / packer / provision / local-docker.yaml
index ca9db41..869202d 100644 (file)
@@ -6,10 +6,11 @@
   become_method: sudo
   vars:
     apt_file: /etc/apt/sources.list.d/google-chrome.list
-    docker_compose_version: 1.17.1
+    docker_compose_version: 1.29.2
     glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c
     glide_version: v0.13.1
     golang_version: 1.9.1
+    npm_version: "6.14.13"
 
   tasks:
     - name: "Checking for x86_64"
           - python3.9
           - python3.9-dev
           - python3.9-tk
+          - python3.9-distutils
       become: true
       when: ansible_distribution == 'Ubuntu'
 
       become: true
       when: ansible_distribution == 'Ubuntu'
 
+    - name: npm self-update
+      command: npm install npm@{{ npm_version }} -g
+      become: true
+
+    - name: npm install n module
+      command: npm install n -g
+      become: true
+
+    - name: Upgrade latest stable node version
+      command: n stable | PATH="$PATH"
+      become: true
+
     - name: Add Google Chrome key
       apt_key:
         url: https://dl-ssl.google.com/linux/linux_signing_key.pub
       become: true
       when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
 
-    - name: Clone rebar3
-      git:
-        repo: 'https://github.com/erlang/rebar3.git'
-        dest: /tmp/rebar3
-      when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
-
-    - name: Bootstrap rebar3
-      command: ./bootstrap
-      args:
-        chdir: /tmp/rebar3
-      when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
-
-    - name: Install rebar3 to bin
-      copy:
-        src: /tmp/rebar3/rebar3
-        dest: /usr/bin/rebar3
-        mode: 0755
-        remote_src: true
+    - name: 'Download latest rebar3 bin'
+      command: curl -o /usr/bin/rebar3 -L "https://s3.amazonaws.com/rebar3/rebar3"
       become: true
       when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
 
-    - name: Remove unused rebar3 source
-      file:
-        path: /tmp/rebar3
-        state: absent
+    - file:
+        path: /usr/bin/rebar3
+        mode: "+x"
+      become: true
       when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
 
     - name: Download geckodriver