From 5d3706b6fc615e5bb2c0f03d68501f4b408cd858 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 16 Mar 2022 04:52:56 -0400 Subject: [PATCH] Delete .gitlab-ci.yml --- .gitlab-ci.yml | 81 -------------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 0326726..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- - -image: docker:19.03.12 - -services: - - docker:19.03.12-dind - -variables: - ASSET_NAME: metacall-tarball-linux-amd64.tar.gz - GHR_VERSION: 0.12.0 - # GH_TOKEN - from settings/ci_cd variables - # GH_REPO - from settings/ci_cd variables - -stages: - - prep - - test - - publish - -build: - stage: prep - script: - # This seems to be needed by GitLab CI - - chmod 1777 /tmp - # Build the base image - - docker build -t metacall/distributable_linux -f Dockerfile . - # Install the additional channels and pull (can't be cached) - - docker run --privileged --name tmp metacall/distributable_linux sh -c 'guix pull' - # Commit changes - - docker commit tmp metacall/distributable_linux && docker rm -f tmp - # Build dependencies - - docker run -d --privileged --name tmp metacall/distributable_linux /metacall/scripts/deps.sh - # Commit changes - - docker commit tmp metacall/distributable_linux && docker rm -f tmp - # Build tarball - - docker run --rm -v $PWD/out:/metacall/pack --privileged metacall/distributable_linux /metacall/scripts/build.sh - only: - - tags - artifacts: - paths: - - out/ - expire_in: 3h - -test: - stage: test - script: - # Generate a unique id for invalidating the cache of test layers - - CACHE_INVALIDATE=$(date +%s) - - docker build --build-arg CACHE_INVALIDATE=${CACHE_INVALIDATE} -t metacall/distributable_linux_test:cli -f tests/cli/Dockerfile . - - docker build --build-arg CACHE_INVALIDATE=${CACHE_INVALIDATE} -t metacall/distributable_linux_test:c -f tests/c/Dockerfile . - - docker build --build-arg CACHE_INVALIDATE=${CACHE_INVALIDATE} -t metacall/distributable_linux_test:python -f tests/python/Dockerfile . - - docker build --build-arg CACHE_INVALIDATE=${CACHE_INVALIDATE} -t metacall/distributable_linux_test:node -f tests/node/Dockerfile . - - docker build --build-arg CACHE_INVALIDATE=${CACHE_INVALIDATE} -t metacall/distributable_linux_test:typescript -f tests/typescript/Dockerfile . - only: - - tags - needs: - - job: build - artifacts: true - -publish-github: - stage: publish - script: - - apk --no-cache add curl git - - curl -sL https://github.com/tcnksm/ghr/releases/download/v${GHR_VERSION}/ghr_v${GHR_VERSION}_linux_amd64.tar.gz | tar zx - - chmod +x ghr_v${GHR_VERSION}_linux_amd64/ghr - - mv ghr_v${GHR_VERSION}_linux_amd64/ghr /usr/local/bin - - export GH_REPO_OWNER=${GH_REPO%/*} - - export GH_REPO_NAME=${GH_REPO#*/} - - export PREVIOUS_TAG=`git describe HEAD^1 --abbrev=0 --tags` - - export GIT_HISTORY=`git log --no-merges --format="- %s" ${PREVIOUS_TAG}..HEAD` - - if [[ "${PREVIOUS_TAG}" == "" ]]; then export GIT_HISTORY=`git log --no-merges --format="- %s"`; fi - - if [[ "${CI_COMMIT_TAG}" == "" ]]; then export CI_COMMIT_TAG=${PREVIOUS_TAG}; fi - - export RELEASE_DATE=`date '+%Y-%m-%d'` - - mv ${PWD}/out/tarball.tar.gz ${PWD}/out/${ASSET_NAME} - - echo "MetaCall Distributable Linux ${CI_COMMIT_TAG} [${RELEASE_DATE}] - ${GH_REPO_OWNER}/${GH_REPO_NAME}:${CI_COMMIT_SHA}" && echo "${GIT_HISTORY}" - - ghr -t "${GH_TOKEN}" -u "${GH_REPO_OWNER}" -r "${GH_REPO_NAME}" -c "${CI_COMMIT_SHA}" -n "MetaCall Distributable Linux ${CI_COMMIT_TAG} [${RELEASE_DATE}]" -b "${GIT_HISTORY}" -replace "${CI_COMMIT_TAG}" ${PWD}/out/${ASSET_NAME} - only: - - tags - needs: - - job: build - artifacts: true - - job: test