我正在尝试使用以下配置在bitbucket平台上运行测试:
image: node:6.8.0
pipelines:
default:
- step:
script:
- echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
- ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
- npm --version
- npm install
- npm test
Run Code Online (Sandbox Code Playgroud)
那是输出:
> ng test
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
13 10 2016 15:26:57.937:WARN [karma]: No captured …Run Code Online (Sandbox Code Playgroud) 我对Bitbucket Pipelines的 CI完全不熟悉,目前正在本文的帮助下建立管道.由于此错误,我的构建失败
"在带有前缀的ABI的NDK工具链文件夹中找不到工具链:aarch64-linux-android"
谁能帮我解决这个问题?
我正在尝试通过适用于Bitbucket的AWS CodeDeploy部署我的sampleApplication代码
我使用过这个教程,我已经完成了所有步骤.信任关系角色是这样的
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::accountId:root"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "connectionId"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
当我创建一个部署组时,当我选择上述角色作为服务角色ARN*时,我收到了"无法承担角色"的错误.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com",
"codedeploy.amazonaws.com"
]
},
"Action": "sts:AssumeRole"
}
]
}
Run Code Online (Sandbox Code Playgroud)
但是当我添加上面的信任关系时,我可以创建部署组但是然后在bitbucket上的aws集成不起作用并抛出错误以添加足够的权限.
我正在尝试使用 gradle、jdk 8 构建一个项目并使用 ansible 进行部署。
我找不到包含所有这些的最新 docker 映像,因此我正在即时安装 ansible。
据称 Bitbucket 管道能够创建自定义缓存,但它似乎没有缓存 apt 目录
image: java:8
pipelines:
default:
- step:
caches:
- gradle
- apt
script:
- echo 'deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main' >> /etc/apt/sources.list
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
- apt-get update && apt-get install -y ansible
- bash ./gradlew clean bootJar
definitions:
caches:
apt: /var/cache/apt/archives
Run Code Online (Sandbox Code Playgroud)
结果是
Dependency caches
gradle: ~/.gradle/caches 158.37 MB 06 Apr 2018
apt: /var/cache/apt/archives 151 Bytes 06 Apr 2018
Run Code Online (Sandbox Code Playgroud)
编辑:我添加了一个步骤来列出目录,不仅那里什么都没有,我在整个系统上找不到任何 deb 文件
find …Run Code Online (Sandbox Code Playgroud) 我正在将 gitbucket 用于我的存储库和管道。我有一个配置了远程状态的 terraform 配置文件,它在我的本地机器上运行良好,但是在 gitbucket 中运行时失败。我不断收到拒绝访问错误。这是main.tf:
terraform {
backend "s3" {
bucket = "zego-terraform-test"
key = "test/terraform.tfstate"
region = "eu-west-1"
}
}
data "terraform_remote_state" "remote_state" {
backend = "s3"
config {
bucket = "zego-terraform-test"
key = "test/terraform.tfstate"
region = "eu-west-1"
}
}
variable "region" {}
provider "aws" {
region = "${var.region}"
access_key = {}
secret_key = {}
token = {}
}
module "vpc" {
source = "./modules/vpc"
}
Run Code Online (Sandbox Code Playgroud)
这是我的 gitbucket-pipelines.yml:
image: python:3.5.1
pipelines:
default:
- step:
caches:
- pip …Run Code Online (Sandbox Code Playgroud) 正如标题所说,有什么方法可以将dotenv与 Bitbucket Pipelines 一起用于 CI 目的,同时仍将(可能是多个)添加(.stage).env到 .gitignore?
我知道 Pipeline 支持环境变量,并且可以在 bitbucket-pipelines.yml 中引用它们,但我无法弄清楚如何使用dotenv文件,并根据 ie 分支模式改变要使用的文件。
例如,我希望提交develop使用.test.env变量,而提交master使用来自.prod.env.
也许我走错了路?尽管其他网站使用多个.env文件的示例,但库作者不鼓励这种方法。我正在使用 Zeit Now 进行托管,因此我不能仅通过 SSH 将.env文件传输到服务器上。
非常欢迎任何建议:-)
continuous-integration bitbucket environment-variables bitbucket-pipelines
我在BitBucket中设置了一个管道,以自动将我项目的主分支部署到Azure Web App实例.
该应用程序部署文件并按composer update预期运行(虽然它确实警告它以root身份运行),但php artisan migrate --force返回:
Illuminate\Database\QueryException:SQLSTATE [HY000] [1045]拒绝访问用户'forge'@'127.0.0.1'(使用密码:NO)(SQL:select*from information_schema.tables where table_schema = forge and table_name = migrations)
我已经创建了该.env文件,当我php artisan migrate在shell中运行时,它成功运行并创建了表.
由于部署脚本触发了命令,因此'forge'是database.php我图中的默认用户.env.
有没有明显的东西我错过了导致这个问题,或者我应该以某种方式将其设置为不以root身份运行?我可以替换数据库细节,database.php但我觉得这是错误的.
编辑
.env内容(某些数据替换为********):
APP_NAME=Laravel
APP_ENV=local
APP_KEY=********
APP_DEBUG=true
APP_URL=********
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=********
DB_DATABASE=********
DB_USERNAME=********
DB_PASSWORD=********
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Run Code Online (Sandbox Code Playgroud)
编辑2
我意识到我还没有发布我的bitbucket-pipelines.yml文件:
image: php:7.2-fpm
pipelines: …Run Code Online (Sandbox Code Playgroud) amazonlinux:2018.03.0.20190212在bitbucket管道中的docker映像上构建R时遇到错误。奇怪的是,如果我运行EC2(Amazon Linux 2018),则可以运行完全相同的命令而不会出错。
有谁知道如何解决这个问题?
make[6]: Entering directory `/opt/R/src/library/graphics/src'
mkdir -p -- ../../../../library/graphics/libs
make[6]: Leaving directory `/opt/R/src/library/graphics/src'
make[5]: Leaving directory `/opt/R/src/library/graphics/src'
make[4]: Leaving directory `/opt/R/src/library/graphics'
make[4]: Entering directory `/opt/R/src/library/graphics'
byte-compiling package 'graphics'
Error : .onLoad failed in loadNamespace() for 'utils', details:
call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
error: error in running command
Error: unable to load R code in package 'graphics'
Execution halted
Run Code Online (Sandbox Code Playgroud)
在EC2上手动进行:
make[6]: Leaving directory `/opt/R/src/library/graphics/src'
make[5]: Leaving directory `/opt/R/src/library/graphics/src'
make[4]: Leaving directory `/opt/R/src/library/graphics'
make[4]: …Run Code Online (Sandbox Code Playgroud) 如果我想在一个管道步骤中构建一个 docker 映像,然后在以下步骤中使用它 - 我该怎么做?
例如
default:
- step:
name: Build
image:
script:
- docker build -t imagename:local .
- docker images
- step:
name: Deploy
image:
script:
- docker images
Run Code Online (Sandbox Code Playgroud)
在这个例子中,图像出现在第一步,但没有出现在第二步
我是 BitBucket 管道的新手,因为我使用 Webhook 将我的更改部署到 FTP。
我已经设置了 reccommended atlassian/ftp-deploy:0.2.0 管道并且它工作正常,但我想设置只获取更改的文件并将其发送到 FTP。
image: node:10.15.3
pipelines:
default:
- step:
name: FTP Deploy
script: # Modify the commands below to build your repository.
- pipe: atlassian/ftp-deploy:0.2.0
variables:
USER: 'myFTPusername'
PASSWORD: 'myFTPpass'
SERVER: 'myFTPserver'
REMOTE_PATH: 'myFTPpath'
- step:
name: Deploy message
deployment: test
script:
- echo "Deploying to main environment"
Run Code Online (Sandbox Code Playgroud)
任何帮助如何设置它以便它只将更改的文件发送到 FTP?
预期输出是bitbucket-pipelines.yml 的代码
bitbucket ×4
docker ×2
amazon-linux ×1
amazon-s3 ×1
android ×1
android-ndk ×1
angular ×1
angular-cli ×1
apt ×1
artisan ×1
azure ×1
bash ×1
dockerfile ×1
ftp ×1
gitbucket ×1
laravel ×1
r ×1
terraform ×1