how do I setup 2 export_methods for flutter/iOS distribution? - code-signing

I am trying to make a Flutter-App testable on some iOS devices with Firebase App Distribution.
Currently my fastlane file looks like this:
default_platform(:ios)
platform :ios do
desc "Distribute iOS to firebase"
lane :distribute do
build_app(
scheme: "Runner",
archive_path: "./build/Runner.xcarchive",
export_method: "app-store",
export_options: {
provisioningProfiles: {
"com.companyname.appname" => "App Profile (App-Store)",
}
},
output_directory: "./build/Runner"
)
branch = git_branch
commit = last_git_commit
commit_message = commit[:message]
firebase_app_distribution(
app: ENV["APP_ID"],
service_credentials_file: ENV["CREDENTIALS"],
ipa_path: "./build/Runner/Runner.ipa",
release_notes: "{#{branch}}: " + commit_message,
groups: ENV["GROUPS"]
)
end
end
I guess I can't just add another build_app() with different parameters like such:
build_app(
scheme: "Runner",
archive_path: "./build/Runner.xcarchive",
export_method: "ad-hoc",
export_options: {
provisioningProfiles: {
"com.companyname.appname" => "App Profile (Ad-hoc)",
}
},
output_directory: "./build/Runner"
)
Also: When I go only for the second build I am getting the following line in Codemagic during a "Set up code signing identities"- step:
"Found 2 Profiles for Bundle ID VU23SJKS28 matching specified filters: profileState=ACTIVE, profileType=IOS_APP_STORE."
How can I change these filters. I assume I need profileType "ad-hoc"
Thanks for any help.

Related

How to show favorite project using pivot in vue and laravel

This is the all projects, and favorite button to show the favorite project only:
This is how I show all project:
<project v-for="(project, index) in projects" :key="project.id" :index="index" :details="project"></project>
This is the button favorite method:
toggleFavorite () {
this.favoriteShown = !this.favoriteShown
this.allProjectShown = !this.allProjectShown
},
I import the project from the other vue file
import project from './project'
And this is the whole favorite method in project.vue
And maybe you need to see the project.vue export default:
So, what should I add in this code to show the favorite projects only
<project v-for="(project, index) in projects" :key="project.id" :index="index" :details="project"></project>
Define a computed property that filters your projects returning just the objects that have a true value for the favorite property.
I'm making some assumptions regarding the structure of your project object, however, the principle will remain the same.
An example of how you could filter results below:
let projects = [
{
id: 1,
favorite: true
},
{
id: 2,
favorite: false
},
{
id: 3,
favorite: false
},
{
id: 4,
favorite: true
}
];
let filteredProjects = projects.filter(p => p.favorite);
Obviously, you're not using a static array as I have in the example so you will need to alter it for your use case (e.g. state.projects.filter(p => p.favorite)). You could also use lodash filter if you're already using that library.

Spaceship::UnexpectedResponse: [!] Missing required information to submit for external testing - Missing requied data

I'm facing this issue, while running fastlane pilot command in terminal. How should i use this " beta_app_review_info" as a parameter? what value need's to be added?
Here's the command i've tried to run but getting failed with "beta_app_review_info' value must be a Hash! Found String instead."
fastlane pilot upload --username="XXX#gmail.com" --verbose --changelog "$(cat changelog1.txt)" --distribute_external true --groups="Users" --ipa="build/Release-iphoneos/some.ipa" --beta_app_review_info “contact_email: "XXXXX#gmail.com",contact_first_name: "test",contact_last_name: "user",contact_phone: "XXXXXX",demo_account_name: "testuser#gmail.com",demo_account_password: "XXXX"
looks like beta_app_review_info is not included as parameter in Fastlane pilot. Can someone help me to sort out this issue?
Had the same issue. Probably, AppStore start to require extra meta data. Adding beta_app_review_info did fix the problem.
Sample:
upload_to_testflight(
beta_app_review_info: {
contact_email: "email#email.com",
contact_first_name: "Connect",
contact_last_name: "API",
contact_phone: "5558675309",
demo_account_name: "demo#email.com",
demo_account_password: "connectapi",
notes: "this is review note for the reviewer <3 thank you for reviewing"
},
localized_app_info: {
"default": {
feedback_email: "default#email.com",
marketing_url: "https://example.com/marketing-defafult",
privacy_policy_url: "https://example.com/privacy-defafult",
description: "Default description",
},
"en-GB": {
feedback_email: "en-gb#email.com",
marketing_url: "https://example.com/marketing-en-gb",
privacy_policy_url: "https://example.com/privacy-en-gb",
description: "en-gb description",
}
},
localized_build_info: {
"default": {
whats_new: "Default changelog",
},
"en-GB": {
whats_new: "en-gb changelog",
}
}
)
Reference: https://docs.fastlane.tools/actions/upload_to_testflight/

Playwright parallel execution is not working with BDD tests (But it is working without BDD)

I am working with Playwright run-workers for parallel execution in chromium and sample BDD script when executed, i found Playwright is executing same scenario multiple times in different browser instances.
Ex: I created TWO simple BDD scenarios and performed parallel execution using below command, it instantiated two chromium browser But unfortunately it executed each scenario 3 times in each instance of chromium instead of executing for two times.
npx codeceptjs run-workers 2
**Command line execution details:**
\projectwork\codeceptjs>npx codeceptjs run-workers 2
CodeceptJS v2.5.0
Running tests in 2 workers...
[2] Brand - US/EN --
[1] Brand - US/EN --
[1] √ Scenario ONE #tag1 in 30315ms
[1] Brand - US/EN --
[2] √ Scenario TWO #tag2 in 48655ms
[2] Brand - US/EN --
[1] √ Scenario ONE #tag1 in 21992ms
[2] √ Scenario ONE #tag1 in 25305ms
[1] √ Scenario TWO #tag2 in 39238ms
[2] √ Scenario TWO #tag2 in 32938ms
FAIL | 6 passed, -4 failed // 125.4s
*Below is the feature file used:*
Feature: Brand - US/EN
As a QA, I expect that Brabd brand en/us locale is working fine.
#tag1
Scenario: Scenario ONE
Given the "Brand" brand "homepage" of "us/en" locale has been built
And i click on "signup.popup.crossbutton" if present
When i see the structure of the "homepage"
And I verify that country selector image is present in the footer
And I verify that brand logo is appearing in the footer
And I verify that copyright icon is appearing in the footer
#tag2
Scenario: Scenario TWO
Given the "Brand" brand "homepage" of "us/en" locale has been built
And i click on "signup.popup.crossbutton" if present
When i see the structure of the "homepage"
And i click on the site map link of global footer
Then it should take me to site map page
below is the config file used:
const { setWindowSize } = require('#codeceptjs/configure');
setWindowSize(1366, 960)
exports.config = {
output: './output',
helpers: {
Playwright: {
url: '',
show: true,
waitForAction: 2000,
windowSize: '1366x960',
chromium: {
args: ['--no-sandbox', '--window-size=1366,960', '--start-maximize'],
defaultViewport: null
}
},
ChaiWrapper: {
require: "codeceptjs-chai"
}
},
include: {
I: './steps_file.js'
},
mocha: {},
bootstrap: null,
teardown: null,
hooks: [],
gherkin: {
features: './features/*.feature',
steps: ['./step_definitions/steps.js']
},
plugins: {
screenshotOnFail: {
enabled: false
},
autoDelay: {
enabled: true
},
allure: {
enabled: true
}
},
// tests: './*_test.js',
// multiple: {
// basic: {
// browsers: ['chrome']
// }
// },
// name: 'codeceptjsdemo'
}
can someone help me on this
Moon support parallel Playwright tests execution out of the box. Documentation: https://aerokube.com/moon/latest/#_using_playwright

Jenkins declarative pipe, download latest upload (build) from Artifactory and get properties

Any sugesstions on this litle problem is very welcome! :)
It works fine to download the latest build but the object does not contain any properties.
Is it possible to get the properties from a downloaded build?
The gool is to get an inputbox with a predefined value displaying previous version i.e. "R1G" and give the user the option to edit the value to i.e. R2A or any other value or only abort (abort meaning there will be no version).
The user also have the option to do nothing withch will led to a timeoute and finaly an abort.
I want to
download latest build from Artifactory repo
store the build.number in "def prev_build"
display the prev_build in an input for the user to be updated (a customized number)
'''some code
echo 'Publiching Artifact.....'
script{
def artifactory_server_down=Artifactory.server 'Artifactory'
def downLoad = """{
"files":
[
{
"pattern": "reponame/",
"target": "${WORKSPACE}/prev/",
"recursive": "false",
"flat" : "false"
}
]
}"""
def buildInfodown=artifactory_server_down.download(downLoad)
//Dont need to publish because I only need the properties
//Grab the latest revision name here and use it again
echo 'Retriving revision from last uploaded build.....'
env.LAST_BUILD_NAME=buildInfodown.build.number
//Yes its a map and I have tried with ['build.number'] but the map is empty
}
echo "Previous build name is $env.LAST_BUILD_NAME" //Will not contain the old (latest)
''' End of snipet
The output is null or the default value I have given the var, not the expected version number.
Yes, firstly the properties should be present in the artifacts you are trying to download.
The build.number etc are part of the buildinfo.json file of the artifacts. these are not properties but metadata of some kind. this info would be visible under "Builds" menu in artifactory. Select the repo and build number.
At the last column/tab there would be buildinfo. Click on that - this file will hold all the info you need corresponding to the artifacts.
The build.number and other info will be pushed/uploaded to artifactory by the CI.
For example in case of Jenkins there is an option available when trying to push to artifactory "Capture and publish build info" --> this step does the work
Thanks a lot for your help.
I see your suggestion works but I had when I got your answer already implemented another solution that also works well
I am using the available query language.
https://www.jfrog.com/confluence/display/RTF/Artifactory+Query+Language
Just before my pipeline declaration in the pipeline file I added
def artifactory_url = 'https://lote.corp.saab.se:8443/artifactory/api/search/aql'
def artifactory_search = 'items.find({ "repo":"my_repo"},{"#product.productNumber":
{"$match":"produktname"}}).sort({"$desc":["created"]})'
pipeline
{
and ...
stage('Get latest revision') {
steps {
script {
def json_text = sh(script: "curl -H 'X-JFrog-Art-Api:${env.RECIPE_API_KEY}' -X POST '${artifactory_url}' -d '${artifactory_search}' -H 'Content-Type: text/plain' -k", returnStdout: true).trim()
def response = readJSON text: json_text
VERSION = response.results[0].path;
echo "${VERSION}"
println 'using each & entry'
response[0].each{ entry ->
println 'Key:' + entry.key + ', Value:' +
entry.value
}
}
}
}
stage('Do relesase on master')
{
when
{
branch "master"
}
options {
timeout(time: 1, unit: 'HOURS')
}
steps {
script{
RELEASE_SCOPE = input message: 'User input
required', ok: 'Ok to go?!',
parameters: [
choice(name: 'RELEASE_TYPE', choices:
'Artifactory\nClearCaseAndArtifactory\nAbort',
description: 'What is the release scope?'),
string(name: 'VERSION', defaultValue:
VERSION, description: '''Edit release name please!!''',
trim: false)
]
}
echo 'Build both RPM and Zip packages'
... gradlew -Pversion=${RELEASE_SCOPE['VERSION']} clean buildPackages"
script {
def artifactory_server = Artifactory.server 'Artifactory'
def buildInfo = Artifactory.newBuildInfo()
def uploadSpec = """{
"files":[
{
"pattern": "${env.WORKSPACE}/prodname/release/build/distributions/prodname*.*",
"target": "test_repo/${RELEASE_SCOPE['VERSION']}/",
"props": "product.name=ProdName;build.name=${JOB_NAME};build.number=${env.BUILD_NUMBER};product.revision=${RELEASE_SCOPE['VERSION']};product.productNumber=produktname"
}
]
}"""
println(uploadSpec)
artifactory_server.upload(uploadSpec)
}
}
}

how to speed up docpad rendering?

I am changing only a couple of pages but docpad seems to render everything again. I'm not using any fancy plugins or dynamic components - just the basic ghost template. Are there some techniques to make less pages render?
maybe its something to do with the timestamp format in the docpad.coffee ?
moment = require('moment')
docpadConfig = {
templateData:
vars:
appserver: 'http://xxx'
site:
title: 'Pocket Tutor'
tagline: 'English language chat tutor'
description: 'Learn english by chatting'
logo: '/uploads/images/corpid/comiceng/96/logo-96.png'
url: 'http://app:9005'
cover: '/img/cover.jpg'
navigation: [
{
name: 'Home',
href: '/',
section: 'home'
},
{
name: 'About',
href: '/about.html',
section: 'about'
},
{
name: 'Lessons',
href: '/tags/lessons.html',
section: 'tag-lessons'
},
{
name: 'Grammar',
href: '/tags/grammar.html',
section: 'tag-grammar'
}
{
name: 'Teachers',
href: '/tags/tech.html',
section: 'tag-tech'
},
]
author:
name: 'Rikai Labs'
img: ''
url: 'http://rikai.co'
website: 'http://RIKAI.co'
location: 'space',
bio: 'we build chat apps'
getPreparedTitle: -> if #document.title then "#{#document.title} | #{#site.title}" else #site.title
getDescription: -> if #document.description then "#{#document.description} | #{#site.description}" else #site.description
bodyClass: -> if #document.isPost then "post-template" else "home-template"
masthead: (d) ->
d = d || #document
if d.cover then d.cover else #site.cover
isCurrent: (l) ->
if #document.section is l.section then ' nav-current'
else if #document.url is l.href then ' nav-current'
else ''
excerpt: (p,w) ->
w = w || 26
if p.excerpt then p.excerpt else p.content.replace(/<%.+%>/gi, '').split(' ').slice(0, w).join(' ')
encode: (s) -> encodeURIComponent(s)
slug: (s) -> return s.toLowerCase().replace(' ', '-')
currentYear: -> new Date().getFullYear()
time: (ts, format) ->
format = format || 'MMMM DO, YYYY'
ts = new Date(ts) || new Date()
moment(ts).format(format)
collections:
posts: ->
#getCollection("html").findAllLive({active:true, isPost: true, isPagedAuto: {$ne: true}}, {postDate: -1}).on "add", (model) ->
model.setMetaDefaults({layout:"post"})
plugins:
tags:
extension: '.html'
injectDocumentHelper: (doc) ->
doc.setMeta { layout: 'tag' }
rss:
default:
collection: 'posts'
url: '/rss.xml'
marked:
gfm: true
environments: # default
development: # default
# Always refresh from server
maxAge: false # default
# Only do these if we are running standalone via the `docpad` executable
checkVersion: process.argv.length >= 2 and /docpad$/.test(process.argv[1]) # default
welcome: process.argv.length >= 2 and /docpad$/.test(process.argv[1]) # default
prompts: process.argv.length >= 2 and /docpad$/.test(process.argv[1]) # default
# Listen to port 9005 on the development environment
port: 9005 # example
production:
port: 9005
maxAge: false # default
}
module.exports = docpadConfig
update: stubbing out the date and time methods
time: -> 'time'
currentYear: -> 'year'
gives a little speed up but still making one edit to one file gives info:
Generated 40/150 files in 7.364 seconds
update2: added
standalone: true
to some pages to test, but still takes
info: Generated 40/150 files in 7.252 seconds
so even a single standalone page triggers a bunch of other stuff.
It is possible to handle the Docpad regeneration process manually. To do this you need to turn off Docpad's watch. That is, run Docpad with the docpad server command. What will happen here is that it doesn't matter how many times you edit a document it will not be loaded into the docpad collection. You will then have to load any updates manually. That is, have some code to load the document.
model = #docpad.getCollection('posts').findOne({someValue: someValue})
model.load()
Following that trigger the regeneration.
#docpad.action 'generate', reset: false, (err) ->
if err
#docpad.log "warn", "GENERATE ERROR"
This is what I do in my posteditor plugin
I suspect this is not really what you are asking for but it does give you full control over the regeneration process.

Resources