androidfluttergitlabgitlab-cipipeline

Flutter android pipeline Docker cirrusci/flutter:stable image was not found


I'm trying to create my pipeline on gitlab for my android flutter project however I'm having problems right away regarding dart image, could anyone give me some advice on how to solve this problem? great thanks in advance

Pipeline code:

 image: cirrusci/flutter:stable

stages:
  - build
  - test
 

before_script:
  - flutter --version  
  - flutter pub get    

build-job:
  stage: build
  script:
    - echo "Building the Flutter app..."
    - flutter build apk --release  
  artifacts:
    paths:
      - build/app/outputs/flutter-apk/app-release.apk  

unit-test-job:
  stage: test
  script:
    - echo "Running unit tests..."
    - flutter test integration_test

lint-test-job:
  stage: test
  script:
    - echo "Running lint checks..."
    - flutter analyze  

Error log:

$ flutter --version
Flutter 3.7.7 • channel unknown • unknown source
Framework • revision 2ad6cd72c0 (1 year, 3 months ago) • 2023-03-08 09:41:59 -0800
Engine • revision 1837b5be5f
Tools • Dart 2.19.4 • DevTools 2.20.1
$ flutter pub get
Running "flutter pub get" in lab-di-progettazione...
Resolving dependencies...
The current Dart SDK version is 2.19.4.
Because cobol_lab requires SDK version >=3.3.1 <4.0.0, version solving failed.
pub get failed
command: "/sdks/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"
pub env: {
  "FLUTTER_ROOT": "/sdks/flutter",
  "PUB_ENVIRONMENT": "flutter_bot:flutter_cli:get",
  "PUB_CACHE": "/root/.pub-cache",
}
exit code: 1
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

Solution

  • Try change to different image:

     image: instrumentisto/flutter:latest