From 5feba725cb36cab1dc2c5c3c8e83995db4db3932 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 12:06:56 +0200 Subject: [PATCH 01/17] Refactor docker image structure & CI --- .gitlab-ci.yml | 38 ++++++++++++++++++++--- docker/Dockerfile | 34 ++++++++++---------- docker/ligo.sh | 2 -- scripts/build_docker_image.sh | 1 + scripts/install_ligo_with_dependencies.sh | 1 + scripts/install_native_dependencies.sh | 7 +++++ {docker => scripts}/installer.sh | 9 +++--- scripts/ligo.sh | 2 ++ scripts/setup_ligo_opam_repository.sh | 3 ++ 9 files changed, 69 insertions(+), 28 deletions(-) delete mode 100644 docker/ligo.sh create mode 100755 scripts/build_docker_image.sh create mode 100755 scripts/install_ligo_with_dependencies.sh create mode 100755 scripts/install_native_dependencies.sh rename {docker => scripts}/installer.sh (59%) mode change 100644 => 100755 create mode 100755 scripts/ligo.sh create mode 100755 scripts/setup_ligo_opam_repository.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 253c5bbda..27ef64802 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,16 @@ variables: GIT_SUBMODULE_STRATEGY: recursive +stages: + - test + - build + - deploy + +.docker: &docker + image: docker:1.11 + services: + - docker:dind + .before_script: &before_script before_script: # Install dependencies @@ -28,6 +38,7 @@ variables: local-dune-job: <<: *before_script + stage: test script: - vendors/opam-repository-tools/rewrite-local-opam-repository.sh - opam repository add localrepo "file://$PWD/vendors/ligo-opam-repository-local-generated/" @@ -42,6 +53,7 @@ local-dune-job: local-repo-job: <<: *before_script + stage: test script: - vendors/opam-repository-tools/rewrite-local-opam-repository.sh - opam repository add localrepo "file://$PWD/vendors/ligo-opam-repository-local-generated/" @@ -50,6 +62,7 @@ local-repo-job: remote-repo-job: <<: *before_script + stage: test script: # Add repository - opam repository add ligo-repository https://gitlab.com/ligolang/ligo.git @@ -61,9 +74,24 @@ remote-repo-job: #- opam install -y ocp-indent #- opam user-setup install -build-docker-image: - image: docker:1.11 - services: - - docker:dind +# Run a docker build on the ligo image, to see if the current +# commit does not break it +build-current-docker-image: + stage: build + <<: *docker script: - - docker build -t marigold/ligo ./docker + - docker build -t $CI_REGISTRY_IMAGE -f ./docker/Dockerfile . + +# When a MR/PR is merged to master +# take the previous build and publish it to Docker Hub +build-and-publish-latest-docker-image: + stage: deploy + <<: *docker + dependencies: + - build-current-docker-image + before_script: + - docker login -u $CI_REGISTRY_USER -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker push $CI_REGISTRY_IMAGE:latest + only: + - master diff --git a/docker/Dockerfile b/docker/Dockerfile index 17bcd147c..5cedfcd58 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,31 +1,31 @@ # We could use one of the nomadiclab's docker images as a base instead -# We're using 4.06 instead of 4.06.1, if this causes problems built a custom 4.06.1 image instead +# We're using 4.06 instead of 4.06.1, if this causes problems build a custom 4.06.1 image instead FROM ocaml/opam2:4.06 USER root +# Add contents of the current directory to /ligo where it can be +# accessed when building the image. +# +# This is useful when building either locally, or on the CI +# because the currently checkout out version (from git) will be used +# to build the image +ADD . /ligo + +# Set the current working directory to /ligo for +# the upcoming scripts +WORKDIR /ligo + # Setup a custom opam repository where ligo is published -RUN git clone https://gitlab.com/ligolang/ligo.git -RUN (cd ligo; vendors/opam-repository-tools/rewrite-local-opam-repository.sh) -RUN opam repo add ligo-opam-repository ./ligo/vendors/ligo-opam-repository-local-generated/ -RUN opam update ligo-opam-repository +RUN sh scripts/setup_ligo_opam_repository.sh # Install required native dependencies -RUN apt-get -y install \ - libev-dev \ - perl \ - pkg-config \ - libgmp-dev \ - libhidapi-dev \ - m4 +RUN sh scripts/install_native_dependencies.sh -# Install ligo RUN opam update -RUN cd ligo/src && \ - opam install . --yes - -RUN eval $(opam env) +# Install ligo +RUN sh scripts/install_ligo_with_dependencies.sh # Use the ligo binary as a default command ENTRYPOINT [ "/home/opam/.opam/4.06/bin/ligo" ] diff --git a/docker/ligo.sh b/docker/ligo.sh deleted file mode 100644 index 246a2f08d..000000000 --- a/docker/ligo.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -docker run -it -v $PWD:$PWD -w $PWD marigold/ligo $@ \ No newline at end of file diff --git a/scripts/build_docker_image.sh b/scripts/build_docker_image.sh new file mode 100755 index 000000000..eb2bdb611 --- /dev/null +++ b/scripts/build_docker_image.sh @@ -0,0 +1 @@ +docker build -t ligolang/ligo -f docker/Dockerfile . \ No newline at end of file diff --git a/scripts/install_ligo_with_dependencies.sh b/scripts/install_ligo_with_dependencies.sh new file mode 100755 index 000000000..9ad969f3f --- /dev/null +++ b/scripts/install_ligo_with_dependencies.sh @@ -0,0 +1 @@ +cd src && opam install . --yes \ No newline at end of file diff --git a/scripts/install_native_dependencies.sh b/scripts/install_native_dependencies.sh new file mode 100755 index 000000000..04d4ce17f --- /dev/null +++ b/scripts/install_native_dependencies.sh @@ -0,0 +1,7 @@ +apt-get -y install \ + libev-dev \ + perl \ + pkg-config \ + libgmp-dev \ + libhidapi-dev \ + m4 \ No newline at end of file diff --git a/docker/installer.sh b/scripts/installer.sh old mode 100644 new mode 100755 similarity index 59% rename from docker/installer.sh rename to scripts/installer.sh index 698207b94..437fc31c3 --- a/docker/installer.sh +++ b/scripts/installer.sh @@ -1,11 +1,12 @@ #!/bin/bash # You can run this installer like this: -# curl https://gitlab.com/gabriel.alfour/ligo/blob/master/docker/installer.sh | bash -# Make sure the marigold/ligo image is published at docker hub first +# curl https://gitlab.com/gabriel.alfour/ligo/blob/master/scripts/installer.sh | bash +# Make sure the marigold/ligo image is published at docker hub first +set -euET -o pipefail echo "Installing LIGO" # Install the ligo.sh from master -wget https://gitlab.com/gabriel.alfour/ligo/blob/master/docker/ligo.sh +wget https://gitlab.com/gabriel.alfour/ligo/blob/master/scripts/ligo.sh # Copy the exucutable to the appropriate directory sudo cp ligo.sh /usr/local/bin/ligo @@ -13,4 +14,4 @@ sudo chmod +x /usr/local/bin/ligo rm ligo.sh # Installation finished, try running 'ligo' from your CLI -echo "Installation successfull, try running 'ligo' now. \n" \ No newline at end of file +echo "Installation successful, try running 'ligo' now. \n" diff --git a/scripts/ligo.sh b/scripts/ligo.sh new file mode 100755 index 000000000..24a7bf0c9 --- /dev/null +++ b/scripts/ligo.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker run -it -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo "$@" \ No newline at end of file diff --git a/scripts/setup_ligo_opam_repository.sh b/scripts/setup_ligo_opam_repository.sh new file mode 100755 index 000000000..e07eac487 --- /dev/null +++ b/scripts/setup_ligo_opam_repository.sh @@ -0,0 +1,3 @@ +vendors/opam-repository-tools/rewrite-local-opam-repository.sh +opam repo add ligo-opam-repository ./vendors/ligo-opam-repository-local-generated +opam update ligo-opam-repository \ No newline at end of file From f5da4b8a884bc127f3430b5914165acef0d7bf68 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 12:21:01 +0200 Subject: [PATCH 02/17] Swap CI stages for temporary docker testing --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27ef64802..0b0697bc7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,9 +2,10 @@ variables: GIT_SUBMODULE_STRATEGY: recursive stages: - - test - build - deploy + - test + .docker: &docker image: docker:1.11 From f6a340417231f5a85c03cd263312afe256398ea4 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 12:43:56 +0200 Subject: [PATCH 03/17] Update CI variable for docker registry url --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b0697bc7..72ab03758 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,7 +91,7 @@ build-and-publish-latest-docker-image: dependencies: - build-current-docker-image before_script: - - docker login -u $CI_REGISTRY_USER -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker login -u $CI_REGISTRY_USER -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY_URL script: - docker push $CI_REGISTRY_IMAGE:latest only: From d423fa8e849377f539d3b2692d1a7745614bbc21 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 12:50:11 +0200 Subject: [PATCH 04/17] Add 'latest' tag to the built docker image --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72ab03758..7d094c880 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,7 +81,7 @@ build-current-docker-image: stage: build <<: *docker script: - - docker build -t $CI_REGISTRY_IMAGE -f ./docker/Dockerfile . + - docker build -t $CI_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . # When a MR/PR is merged to master # take the previous build and publish it to Docker Hub From 214044942bbc63be1ecb5cea0f32b2ddcc26370f Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 13:11:00 +0200 Subject: [PATCH 05/17] Remove redundant quotes from docker login CI command --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d094c880..2db2fadab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,7 +91,7 @@ build-and-publish-latest-docker-image: dependencies: - build-current-docker-image before_script: - - docker login -u $CI_REGISTRY_USER -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY_URL + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY_URL script: - docker push $CI_REGISTRY_IMAGE:latest only: From a4ee2007d0b7228b2719111e65bae7447e6d78ac Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 14:09:13 +0200 Subject: [PATCH 06/17] Persist docker image as an artifact --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2db2fadab..bf5a728b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,6 +82,10 @@ build-current-docker-image: <<: *docker script: - docker build -t $CI_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . + - docker save $CI_REGISTRY_IMAGE:latest > $CI_REGISTRY_IMAGE:latest + artifacts: + paths: + - $CI_REGISTRY_IMAGE:latest # When a MR/PR is merged to master # take the previous build and publish it to Docker Hub @@ -91,8 +95,9 @@ build-and-publish-latest-docker-image: dependencies: - build-current-docker-image before_script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY_URL + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD script: + - docker load -i $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest only: - master From 002a320b4c98ec1af63d063af40c3a9885780601 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 14:37:02 +0200 Subject: [PATCH 07/17] Change artifact name for built docker image --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf5a728b4..84fbf772c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,7 +82,7 @@ build-current-docker-image: <<: *docker script: - docker build -t $CI_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . - - docker save $CI_REGISTRY_IMAGE:latest > $CI_REGISTRY_IMAGE:latest + - docker save $CI_REGISTRY_IMAGE:latest > image artifacts: paths: - $CI_REGISTRY_IMAGE:latest @@ -97,7 +97,7 @@ build-and-publish-latest-docker-image: before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD script: - - docker load -i $CI_REGISTRY_IMAGE:latest + - docker load -i image - docker push $CI_REGISTRY_IMAGE:latest only: - master From 76027dea9c5878575baae3d818c5c4b0902abd0e Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 15:07:55 +0200 Subject: [PATCH 08/17] Rename CI variables for docker build & deploy --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84fbf772c..a2ac7ebb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,11 +81,11 @@ build-current-docker-image: stage: build <<: *docker script: - - docker build -t $CI_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . - - docker save $CI_REGISTRY_IMAGE:latest > image + - docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . + - docker save $LIGO_REGISTRY_IMAGE:latest > image artifacts: paths: - - $CI_REGISTRY_IMAGE:latest + - image # When a MR/PR is merged to master # take the previous build and publish it to Docker Hub @@ -95,7 +95,7 @@ build-and-publish-latest-docker-image: dependencies: - build-current-docker-image before_script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD + - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD script: - docker load -i image - docker push $CI_REGISTRY_IMAGE:latest From 866bf7b5520fabefd35c7a316f9dc704a0473a17 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 16:31:57 +0200 Subject: [PATCH 09/17] Remove image caching as artifacts due to size limitations, introduce separate master / feature jobs instead --- .gitlab-ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2ac7ebb5..fe20bb22b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,10 @@ stages: image: docker:1.11 services: - docker:dind + +.docker_build: &docker_build + script: + - docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . .before_script: &before_script before_script: @@ -77,27 +81,23 @@ remote-repo-job: # Run a docker build on the ligo image, to see if the current # commit does not break it -build-current-docker-image: - stage: build - <<: *docker - script: - - docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . - - docker save $LIGO_REGISTRY_IMAGE:latest > image - artifacts: - paths: - - image +# build-current-docker-image: +# stage: build +# <<: *docker +# <<: *docker_build +# except: +# - master # When a MR/PR is merged to master # take the previous build and publish it to Docker Hub build-and-publish-latest-docker-image: stage: deploy <<: *docker + <<: *docker_build dependencies: - build-current-docker-image - before_script: + post_script: - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD - script: - - docker load -i image - - docker push $CI_REGISTRY_IMAGE:latest - only: - - master + - docker push $LIGO_REGISTRY_IMAGE:latest + # only: + # - master From 871fae2bf123113c67ad9402d0a91429a8dc16c9 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 16:41:59 +0200 Subject: [PATCH 10/17] Rename post_script to after_script --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe20bb22b..9f9ed3fbe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-and-publish-latest-docker-image: <<: *docker_build dependencies: - build-current-docker-image - post_script: + after_script: - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD - docker push $LIGO_REGISTRY_IMAGE:latest # only: From 3f4eff7ac71152f1dd8965e04faf5512af1047a7 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 16:49:19 +0200 Subject: [PATCH 11/17] Remove redundant job dependency on CI --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f9ed3fbe..e482eaeb6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,8 +94,6 @@ build-and-publish-latest-docker-image: stage: deploy <<: *docker <<: *docker_build - dependencies: - - build-current-docker-image after_script: - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD - docker push $LIGO_REGISTRY_IMAGE:latest From 32150e79a5b8f04a3011dd9873dd5fe59dd2f16d Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 17:36:08 +0200 Subject: [PATCH 12/17] Bring back non-publishing docker build --- .gitlab-ci.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e482eaeb6..7a7e37249 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,23 +79,22 @@ remote-repo-job: #- opam install -y ocp-indent #- opam user-setup install -# Run a docker build on the ligo image, to see if the current -# commit does not break it -# build-current-docker-image: -# stage: build -# <<: *docker -# <<: *docker_build -# except: -# - master +# Run a docker build without publishing to the registry +build-current-docker-image: + stage: build + <<: *docker + <<: *docker_build + except: + - master # When a MR/PR is merged to master # take the previous build and publish it to Docker Hub build-and-publish-latest-docker-image: stage: deploy <<: *docker - <<: *docker_build + <<: *docker_build after_script: - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD - docker push $LIGO_REGISTRY_IMAGE:latest - # only: - # - master + only: + - master From 81a22846c1ab347031181037e95e949c4312fcb0 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 18:00:46 +0200 Subject: [PATCH 13/17] Rename CI stages --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a7e37249..700f3c44b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ variables: stages: - build - - deploy + - build_and_deploy - test @@ -90,7 +90,7 @@ build-current-docker-image: # When a MR/PR is merged to master # take the previous build and publish it to Docker Hub build-and-publish-latest-docker-image: - stage: deploy + stage: build_and_deploy <<: *docker <<: *docker_build after_script: From 15d1e0e580f25ac6da429a25088c49bfb0a564c8 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 18:04:26 +0200 Subject: [PATCH 14/17] Update paths to from gabriel.alfour to ligolang, add example ligo run with --help --- scripts/installer.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/installer.sh b/scripts/installer.sh index 437fc31c3..0ba024dad 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -1,12 +1,12 @@ #!/bin/bash # You can run this installer like this: -# curl https://gitlab.com/gabriel.alfour/ligo/blob/master/scripts/installer.sh | bash +# curl https://gitlab.com/ligolang/ligo/blob/master/scripts/installer.sh | bash # Make sure the marigold/ligo image is published at docker hub first set -euET -o pipefail echo "Installing LIGO" # Install the ligo.sh from master -wget https://gitlab.com/gabriel.alfour/ligo/blob/master/scripts/ligo.sh +wget https://gitlab.com/ligolang/ligo/blob/master/scripts/ligo.sh # Copy the exucutable to the appropriate directory sudo cp ligo.sh /usr/local/bin/ligo @@ -14,4 +14,5 @@ sudo chmod +x /usr/local/bin/ligo rm ligo.sh # Installation finished, try running 'ligo' from your CLI -echo "Installation successful, try running 'ligo' now. \n" +echo "Installation successful, trying to run 'ligo' now. \n" +ligo --help From b5f175f6c112d416dd7c2f431bb719bddb762d0f Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 18:10:25 +0200 Subject: [PATCH 15/17] Add pulling of the docker image used by the CLI wrapper, nicer comments & messages --- scripts/installer.sh | 9 ++++++--- scripts/ligo.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/installer.sh b/scripts/installer.sh index 0ba024dad..29dd04742 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -6,13 +6,16 @@ set -euET -o pipefail echo "Installing LIGO" # Install the ligo.sh from master -wget https://gitlab.com/ligolang/ligo/blob/master/scripts/ligo.sh +# wget https://gitlab.com/ligolang/ligo/blob/master/scripts/ligo.sh +wget localhost:8080/scripts/ligo.sh # Copy the exucutable to the appropriate directory sudo cp ligo.sh /usr/local/bin/ligo sudo chmod +x /usr/local/bin/ligo rm ligo.sh +# Pull the docker image used by ligo.sh +docker pull ligolang/ligo:latest + # Installation finished, try running 'ligo' from your CLI -echo "Installation successful, trying to run 'ligo' now. \n" -ligo --help +echo "Installation successful, try to run 'ligo --help' now. \n" \ No newline at end of file diff --git a/scripts/ligo.sh b/scripts/ligo.sh index 24a7bf0c9..8ccadad8e 100755 --- a/scripts/ligo.sh +++ b/scripts/ligo.sh @@ -1,2 +1,2 @@ #!/bin/bash -docker run -it -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo "$@" \ No newline at end of file +docker run -it -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:latest "$@" \ No newline at end of file From efa3255c0ce385ad09a1a5f898491fe52ffb0562 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 18:10:58 +0200 Subject: [PATCH 16/17] Fix leftover debug URL --- scripts/installer.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/installer.sh b/scripts/installer.sh index 29dd04742..eb56165ca 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -6,8 +6,7 @@ set -euET -o pipefail echo "Installing LIGO" # Install the ligo.sh from master -# wget https://gitlab.com/ligolang/ligo/blob/master/scripts/ligo.sh -wget localhost:8080/scripts/ligo.sh +wget https://gitlab.com/ligolang/ligo/blob/master/scripts/ligo.sh # Copy the exucutable to the appropriate directory sudo cp ligo.sh /usr/local/bin/ligo From d83d8a54491c6c3a015eef7ad1a358f22f35db18 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Mon, 27 May 2019 18:47:10 +0200 Subject: [PATCH 17/17] Add only 'master' to docker image deployment job --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f0ef0832..66f6bf0f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,6 +98,9 @@ build-and-publish-latest-docker-image: after_script: - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD - docker push $LIGO_REGISTRY_IMAGE:latest + only: + - master + pages: stage: build_and_deploy_website