continuous-integration

Trigger Gitlab-CI Pipeline only when there is a new tag

陌路散爱 提交于 2020-04-29 14:51:27
问题 I have following gitlab-ci conf. file: before_script: - echo %CI_BUILD_REF% - echo %CI_PROJECT_DIR% stages: - createPBLs - build - package create PBLs: stage: createPBLs script: - xcopy /y /s "%CI_PROJECT_DIR%" "C:\Bauen\" - cd "C:\Bauen\" - ./run_orcascript.cmd build: stage: build script: - cd "C:\Bauen\" - ./run_pbc.cmd except: - master build_master: stage: build script: - cd "C:\Bauen\" - ./run_pbcm.cmd only: - master package: stage: package script: - cd "C:\Bauen\" - ./cpfiles.cmd

docker build was failed due to “COPY failed: no such file or directory” error

会有一股神秘感。 提交于 2020-04-18 07:38:49
问题 I'm setting up travis-ci to build & push docker images when they are committed to github. But client docker image is not built & pushed to docker hub even though api & nginx images are succeeded. Sorce code is here: https://github.com/jpskgc/article client: react api: golang ci: travis-ci This is .travis.yml language: generic sudo: required services: - docker before_install: - docker build -t jpskgc/react-test -f ./client/Dockerfile.dev ./client script: - docker run -e CI=true jpskgc/react

Gitlab CI: create dist folder inside repository?

孤者浪人 提交于 2020-04-18 06:12:54
问题 I just recently started using gitlab CI to automate some build/deploy steps. It works perfectly to build docker images etc, but I was wondering if it's possible to create a folder in the repository during a build step? For example I'm now making an npm utility package, but I'm just importing it in my other projects via a private gitlab repo (using deploy token), but the code of the util package is written in es6 and needs to be transpiled to commonJS to be used in the other packages. Manually

Concourse Can't Connect to Docker Repository

社会主义新天地 提交于 2020-04-18 03:49:32
问题 I'm new to concourse and trying to set it up in my environment. I'm running Ubuntu 18.04 on Virtualbox 6.1.4 r136177 on Windows machine. I managed to get the node running and concourse worker set up, and I was able to access my concourse dashboard successfully. The problem occurred when I was trying to run a simple hello world pipeline as outlined on this page : https://concourse-ci.org/hello-world-example.html The error says : [31mERRO [0m[0004] check failed: get remote image: Get https:/

How to automatically start, execute and stop EC2?

寵の児 提交于 2020-04-17 22:05:14
问题 I want to test my Python library in GPU machine once a day. I decided to use AWS EC2 for testing. However, the fee of gpu machine is very high, so I want to stop the instance after the test ends. Thus, I want to do the followings once a day automatically Start EC2 instance (which is setup manually) Execute command (test -> push logs to S3) Stop EC2 (not remove) How to do this? 回答1: It is very simple... Run script on startup To run a script automatically when the instance starts ( every time

How can I securely push from a GitLab Runner KubernetesExecutor pod to a private container registry?

青春壹個敷衍的年華 提交于 2020-03-23 12:04:54
问题 Goal Build a CI/CD pipeline multiple GitLab repositories with a certain project structure can make use of. For this, a Docker container with Python code is built and subsequently securely pushed to Google Cloud's Container Registry. Set up KubernetesExecutor is installed on Kubernetes Engine using the Helm chart as provided by GitLab. The base image for the build process ( runners.image in the values.yaml ) is a custom one as this helps automatically containerising the provided repository.

How can I securely push from a GitLab Runner KubernetesExecutor pod to a private container registry?

旧城冷巷雨未停 提交于 2020-03-23 12:04:21
问题 Goal Build a CI/CD pipeline multiple GitLab repositories with a certain project structure can make use of. For this, a Docker container with Python code is built and subsequently securely pushed to Google Cloud's Container Registry. Set up KubernetesExecutor is installed on Kubernetes Engine using the Helm chart as provided by GitLab. The base image for the build process ( runners.image in the values.yaml ) is a custom one as this helps automatically containerising the provided repository.

Is there a way to set a date and time (timezone) in Azure DevOps CI/CD build pipeline

。_饼干妹妹 提交于 2020-03-22 06:47:07
问题 I have automated test running in my CI/CD build pipeline, but the time in DevOps is UTC and my assertions tests check the local time. Is there a way to set a time zone in my build pipeline? 回答1: Yes. For example this simple BASH script run using a Microsoft Hosted Agent: echo "checking date" date echo "setting date to Asia/Kolkata" sudo timedatectl set-timezone "Asia/Kolkata" date The results as seen in the log: 2019-07-05T20:26:48.5992486Z checking date 2019-07-05T20:26:48.5992954Z Fri Jul 5

How to check jest coverage in console?

半城伤御伤魂 提交于 2020-03-21 06:54:38
问题 I have some jest tests and I can determine the coverage with jest --coverage Also see Code coverage for Jest I automatically execute the tests on a build server (gitlab runner) and want that my tests fail if the coverage is below a certain limit . In python there is a flag --cov-fail-under that can be used with pytest, e.g. pytest --cov src --cov-fail-under=90 --cov-report=term Unfortunately, I could not find a corresponding option for jest. =>What is the recommended way to check the total

AWS CodeBuild - How to skip a build

懵懂的女人 提交于 2020-03-19 07:53:10
问题 My build is triggered on every push to the repo and on every pull request. So CODEBUILD_SOURCE_VERSION looks like "pr/8" or "4570d2e7158cfef687af8da31d1ffec7b02e5ca3". I only want the build to execute for pr branches and pushes to master. What is the best way to achieve this? I don't want to use CodeDeploy as I am just deploying lambdas. I could write a bash function that checks CODEBUILD_SOURCE_VERSION on the install phase and does an exit 1. But this will create a lot of false positives in