You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
We have a pipeline that has not changed in months, worked 100% fine & today suddenly it is getting stuck.
Any ideas please. Does BitBucket have an issue or should we update or change our image
we have:
image: atlassian/default-image:3
script:
- apt-get update && apt-get install -y mysql-client openjdk-11-jdk maven
The log file get's stuck at the apt-get line. here is the log file
Get:67 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client-core-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [4423 kB]
Get:68 http://archive.ubuntu.com/ubuntu focal/main amd64 mysql-common all 5.8+1.0.5ubuntu2 [7496 B]
Get:69 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [22.0 kB]
Get:70 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client all 8.0.27-0ubuntu0.20.04.1 [9424 B]
Get:71 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre amd64 11.0.13+8-0ubuntu1~20.04 [175 kB]
Get:72 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jdk-headless amd64 11.0.13+8-0ubuntu1~20.04 [223 MB]
This step normally tales about ~40 seconds. Now it never completes.
# Template maven-build
# This template allows you to test and build your Java project with Maven.
# The workflow allows running tests, code checkstyle and security scans on the default branch.
# Prerequisites: pom.xml and appropriate project structure should exist in the repository.
image: atlassian/default-image:3
definitions:
services:
mysql:
image: mysql:5.7
variables:
MYSQL_DATABASE: 'portal2_test'
MYSQL_USER: 'ptportalapp'
MYSQL_PASSWORD: 'let_me_in'
MYSQL_ROOT_PASSWORD: 'let_me_in'
steps:
- step: &GenericBuildAndTest
name: Build and Test
image: atlassian/default-image:3
caches:
- maven
script:
- apt-get update && apt-get install -y mysql-client openjdk-11-jdk maven
- mysql --user=root --password=let_me_in --host=127.0.0.1 portal2_test < src/test/resources/test_schema-bitbucket.sql
- mvn package -Dspring.profiles.active=local-bitbucket -Dnet.sf.ehcache.disabled=true
artifacts:
- target/pt-portal-*jar
services:
- mysql
- step: &GenericUploadToS3
name: Upload to s3
script:
- source set_env.sh
- echo Will Upload to environment:$S3_TARGET_LOCATION
- mkdir -p artifacts
- mv target/pt-portal-*jar artifacts
- pipe: atlassian/aws-s3-deploy:0.3.8
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-west-1'
S3_BUCKET: $S3_TARGET_LOCATION
LOCAL_PATH: artifacts
- echo Upload complete for branch $BITBUCKET_BRANCH
artifacts:
- artifacts/**
- step: &GenericGetDockerVersion
name: Get Docker Version
script:
- docker version
services:
- docker
- step: &GenericBuildAndTestWithRestictedListOfTests
name: Build and no Test
image: atlassian/default-image:3
caches:
- maven
script:
- apt-get update && apt-get install -y mysql-client openjdk-11-jdk maven
- mysql --user=root --password=let_me_in --host=127.0.0.1 portal2_test < src/test/resources/test_schema-bitbucket.sql
- mvn package -Dspring.profiles.active=local-bitbucket -Dtest=$RESTRICTED_LIST_OF_TESTS -Dnet.sf.ehcache.disabled=true
artifacts:
- target/pt-portal-*jar
services:
- mysql
- step: &GenericGetDockerVersion
name: Get Docker Version
script:
- docker version
services:
- docker
- step: &GenericSecurityScan
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.4.3
pipelines:
default:
- step:
name: setup env to upload to branch
script:
- S3_TARGET_LOCATION=$S3_BUCKET_LOCATION/$BITBUCKET_BRANCH
- echo "export S3_TARGET_LOCATION=$S3_TARGET_LOCATION" > set_env.sh
artifacts:
- set_env.sh
- step: *GenericBuildAndTest
- step: *GenericSecurityScan
- step: *GenericUploadToS3
branches:
master:
- step: *GenericBuildAndTest
- step: *GenericSecurityScan
- step:
name: setup env to upload to branch
script:
- S3_TARGET_LOCATION=$S3_BUCKET_LOCATION/$BITBUCKET_BRANCH
- echo "export S3_TARGET_LOCATION=$S3_TARGET_LOCATION" > set_env.sh
artifacts:
- set_env.sh
- step: *GenericUploadToS3
- step:
name: setup env to upload to PROD
script:
- S3_TARGET_LOCATION=$S3_PROD_BUCKET_LOCATION
- echo "export S3_TARGET_LOCATION=$S3_TARGET_LOCATION" > set_env.sh
artifacts:
- set_env.sh
- step: *GenericUploadToS3
custom:
build_and_run_restricted_list_test:
- step: *GenericBuildAndTestWithRestictedListOfTests
well whatever it was it has fixed itself with us doing nothing.
The step I mentioned above finished in 38seconds at the last attempt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.